Просмотр исходного кода

Fixes #5254 - Require plugin authors to set zip_safe=False

Daniel Sheppard 5 лет назад
Родитель
Сommit
dac93b9840
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      docs/plugins/development.md

+ 4 - 0
docs/plugins/development.md

@@ -63,11 +63,15 @@ setup(
     install_requires=[],
     install_requires=[],
     packages=find_packages(),
     packages=find_packages(),
     include_package_data=True,
     include_package_data=True,
+    zip_safe=False,
 )
 )
 ```
 ```
 
 
 Many of these are self-explanatory, but for more information, see the [setuptools documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html).
 Many of these are self-explanatory, but for more information, see the [setuptools documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html).
 
 
+!!! note
+    `zip_safe=False` is **required** as the current plugin iteration is not zip safe due to upstream python issue [issue19699](https://bugs.python.org/issue19699)  
+
 ### Define a PluginConfig
 ### Define a PluginConfig
 
 
 The `PluginConfig` class is a NetBox-specific wrapper around Django's built-in [`AppConfig`](https://docs.djangoproject.com/en/stable/ref/applications/) class. It is used to declare NetBox plugin functionality within a Python package. Each plugin should provide its own subclass, defining its name, metadata, and default and required configuration parameters. An example is below:
 The `PluginConfig` class is a NetBox-specific wrapper around Django's built-in [`AppConfig`](https://docs.djangoproject.com/en/stable/ref/applications/) class. It is used to declare NetBox plugin functionality within a Python package. Each plugin should provide its own subclass, defining its name, metadata, and default and required configuration parameters. An example is below: