1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-21 11:27:38 +03:00

PLUGINS.md: Update to mention using Python 3.8 post-4.1.x

* Also adjusted links to information/examples to not be the bad 'here'
  form.
This commit is contained in:
Athanasius 2020-10-05 16:47:48 +01:00
parent 095c45df8f
commit 8f721cf06e

@ -641,11 +641,13 @@ plugin folder to append ".disabled". Eg,
Disabled and enabled plugins are listed on the "Plugins" Settings tab
## Migration
## Migration from Python 2.7
Starting with pre-release 3.5 EDMC uses Python **3.7**. The first full
release under Python 3.7 was 4.0.0.0. This is a brief outline of the steps
required to migrate a plugin from earlier versions of EDMC:
Starting with pre-release 3.5 EDMC used Python 3.7. The first full
release under Python 3.7 was 4.0.0.0. The 4.1.x series was the last to use
Python 3.7, with releases moving on to latest Python 3.8.x after that.
This is a brief outline of the steps required to migrate a plugin from earlier
versions of EDMC:
- Rename the function `plugin_start` to `plugin_start3(plugin_dir)`.
Plugins without a `plugin_start3` function are listed as disabled on EDMC's
@ -658,12 +660,14 @@ required to migrate a plugin from earlier versions of EDMC:
the correct number of arguments. Older versions of this app were tolerant
of missing arguments in these function declarations.
- Port the code to Python 3.7. The [2to3](https://docs.python.org/3/library/2to3.html)
tool can automate much of this work.
- Port the code to Python 3.7 or 3.8 as appropriate. The
[2to3](https://docs.python.org/3/library/2to3.html)
tool can automate much of this work.
Depending on the complexity of the plugin it may be feasible to make it
compatible with both EDMC 3.4 + Python 2.7 and EDMC 3.5 + Python 3.7.
compatible with both EDMC 3.4 + Python 2.7 and EDMC 3.5 + Python 3.7/3.8.
[Here's](https://python-future.org/compatible_idioms.html) a guide on writing
Python 2/3 compatible code and [here's](https://github.com/Marginal/HabZone/commit/3c41cd41d5ad81ef36aab40e967e3baf77b4bd06)
an example of the changes required for a simple plugin.
You might find [compatible idioms](https://python-future.org/compatible_idioms.html),
a guide on writing Python 2/3 compatible code, useful. There's also [an
example of changes required for a simple plugin](https://github.com/Marginal/HabZone/commit/3c41cd41d5ad81ef36aab40e967e3baf77b4bd06)
.