From 3e6dfef6a90c4a6c7376378c47d6cf4e9e51d845 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 16:49:37 +0000 Subject: [PATCH 01/12] Rename 'table.md' to 'legacy_table.md' This opens space for more up-to-date results. --- table.md => legacy_table.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename table.md => legacy_table.md (100%) diff --git a/table.md b/legacy_table.md similarity index 100% rename from table.md rename to legacy_table.md From cafdc2e8e4b528ea924701e6ee27e540a9b1e1fe Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 16:51:20 +0000 Subject: [PATCH 02/12] Migrate the report_to_table.py file to Python 3 syntax --- report_to_table.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/report_to_table.py b/report_to_table.py index 17c3927..638d6e2 100644 --- a/report_to_table.py +++ b/report_to_table.py @@ -9,18 +9,18 @@ data = json.load(f) with io.open('table.md', 'w') as f: - f.write(u'| Type | Interpreter | Package A command | Package B command | Status |\n') - f.write(u'| --- | --- | --- | --- | --- |\n') + f.write('| Type | Interpreter | Package A command | Package B command | Status |\n') + f.write('| --- | --- | --- | --- | --- |\n') for session in data['sessions']: session_name = session['name'] session_detailled_name = session['signatures'][-1] session_interpreter = session_detailled_name.replace(session_name + "-", "python") session_name = session_name.replace("session_", "") - f.write(u'| {} | {} | {} | {} | {} |\n'.format( + f.write('| {} | {} | {} | {} | {} |\n'.format( session_name, session_interpreter, ' '.join(session['args']['command_a']), ' '.join(session['args']['command_b']), - u'✅' if session['result_code'] else u'❌' + '✅' if session['result_code'] else '❌' )) From 6e7727df6c3a1ffea5c0e6238b8970ac6645eb8a Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 16:58:48 +0000 Subject: [PATCH 03/12] Update test matrix --- noxfile.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/noxfile.py b/noxfile.py index a4f18c2..5163b8d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -29,20 +29,15 @@ def install_packages(session, package_a, package_b, command_a, command_b): - session.install( - "--upgrade", - "setuptools", - "pip", - "wheel", - env={"PIP_CONSTRAINT": f"{HERE}/constraints.txt"}, - ) + env = {**os.environ, "PIP_CONSTRAINT": f"{HERE}/constraints.txt"} + session.install("--upgrade", "pip", env=env) session.chdir(package_a) session.run("rm", "-rf", "dist", "build", "*.egg-info") - session.run(*command_a) + session.run(*command_a, env=env) session.chdir(HERE) session.chdir(package_b) session.run("rm", "-rf", "dist", "build", "*.egg-info") - session.run(*command_b) + session.run(*command_b, env=env) session.chdir(HERE) @@ -89,3 +84,23 @@ def session_cross_pkg_resources_pkgutil(session, command_a, command_b): def session_cross_pep420_pkgutil(session, command_a, command_b): install_packages(session, "native/pkg_a", "pkgutil/pkg_b", command_a, command_b) session.run("python", "verify_packages.py") + + +@nox.session(python=USE_PYTHON_VERSIONS) +@nox.parametrize('command_a', install_commands) +@nox.parametrize('command_b', install_commands) +def session_cross_pep420_pkg_resources(session, command_a, command_b): + install_packages( + session, 'native/pkg_a', 'pkg_resources/pkg_b', command_a, command_b + ) + session.run("python", "verify_packages.py") + + +@nox.session(python=USE_PYTHON_VERSIONS) +@nox.parametrize('command_a', install_commands) +@nox.parametrize('command_b', install_commands) +def session_cross_pkg_resources_pep420(session, command_a, command_b): + install_packages( + session, 'pkg_resources/pkg_a', 'native/pkg_b', command_a, command_b + ) + session.run("python", "verify_packages.py") From 5d763cc4cc8ab55a360291d5d9755d3d6bedc012 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 17:37:11 +0000 Subject: [PATCH 04/12] Add updated table --- table.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 table.md diff --git a/table.md b/table.md new file mode 100644 index 0000000..f01bffb --- /dev/null +++ b/table.md @@ -0,0 +1,86 @@ +| Type | Interpreter | Package A command | Package B command | Status | +| --- | --- | --- | --- | --- | +| pkgutil | python3.7 | pip install . | pip install . | ✅ | +| pkgutil | python3.7 | pip install . | pip install -e . | ✅ | +| pkgutil | python3.7 | pip install -e . | pip install . | ✅ | +| pkgutil | python3.7 | pip install -e . | pip install -e . | ✅ | +| pkgutil | python3.9 | pip install . | pip install . | ✅ | +| pkgutil | python3.9 | pip install . | pip install -e . | ✅ | +| pkgutil | python3.9 | pip install -e . | pip install . | ✅ | +| pkgutil | python3.9 | pip install -e . | pip install -e . | ✅ | +| pkgutil | python3.11 | pip install . | pip install . | ✅ | +| pkgutil | python3.11 | pip install . | pip install -e . | ✅ | +| pkgutil | python3.11 | pip install -e . | pip install . | ✅ | +| pkgutil | python3.11 | pip install -e . | pip install -e . | ✅ | +| pkg_resources | python3.7 | pip install . | pip install . | ✅ | +| pkg_resources | python3.7 | pip install . | pip install -e . | ✅ | +| pkg_resources | python3.7 | pip install -e . | pip install . | ✅ | +| pkg_resources | python3.7 | pip install -e . | pip install -e . | ✅ | +| pkg_resources | python3.9 | pip install . | pip install . | ✅ | +| pkg_resources | python3.9 | pip install . | pip install -e . | ✅ | +| pkg_resources | python3.9 | pip install -e . | pip install . | ✅ | +| pkg_resources | python3.9 | pip install -e . | pip install -e . | ✅ | +| pkg_resources | python3.11 | pip install . | pip install . | ✅ | +| pkg_resources | python3.11 | pip install . | pip install -e . | ✅ | +| pkg_resources | python3.11 | pip install -e . | pip install . | ✅ | +| pkg_resources | python3.11 | pip install -e . | pip install -e . | ✅ | +| pep420 | python3.7 | pip install . | pip install . | ✅ | +| pep420 | python3.7 | pip install . | pip install -e . | ✅ | +| pep420 | python3.7 | pip install -e . | pip install . | ✅ | +| pep420 | python3.7 | pip install -e . | pip install -e . | ✅ | +| pep420 | python3.9 | pip install . | pip install . | ✅ | +| pep420 | python3.9 | pip install . | pip install -e . | ✅ | +| pep420 | python3.9 | pip install -e . | pip install . | ✅ | +| pep420 | python3.9 | pip install -e . | pip install -e . | ✅ | +| pep420 | python3.11 | pip install . | pip install . | ✅ | +| pep420 | python3.11 | pip install . | pip install -e . | ✅ | +| pep420 | python3.11 | pip install -e . | pip install . | ✅ | +| pep420 | python3.11 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.7 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pkgutil | python3.7 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pkgutil | python3.7 | pip install -e . | pip install . | ❌ | +| cross_pkg_resources_pkgutil | python3.7 | pip install -e . | pip install -e . | ❌ | +| cross_pkg_resources_pkgutil | python3.9 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pkgutil | python3.9 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pkgutil | python3.9 | pip install -e . | pip install . | ❌ | +| cross_pkg_resources_pkgutil | python3.9 | pip install -e . | pip install -e . | ❌ | +| cross_pkg_resources_pkgutil | python3.11 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pkgutil | python3.11 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pkgutil | python3.11 | pip install -e . | pip install . | ❌ | +| cross_pkg_resources_pkgutil | python3.11 | pip install -e . | pip install -e . | ❌ | +| cross_pep420_pkgutil | python3.7 | pip install . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.7 | pip install . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.7 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.7 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.9 | pip install . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.9 | pip install . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.9 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.9 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.11 | pip install . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.11 | pip install . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.11 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.11 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkg_resources | python3.7 | pip install . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.7 | pip install . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.7 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.7 | pip install -e . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.9 | pip install . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.9 | pip install . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.9 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.9 | pip install -e . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.11 | pip install . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.11 | pip install . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.11 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.11 | pip install -e . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.7 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.7 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.7 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.7 | pip install -e . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.9 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.9 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.9 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.9 | pip install -e . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.11 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.11 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.11 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.11 | pip install -e . | pip install -e . | ❌ | From b3e01877054409b8dc3bfea763fc31eb5dcb298b Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 18:09:35 +0000 Subject: [PATCH 05/12] Update README.md to mention staggered migration --- README.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 68143d8..2669080 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,34 @@ markdown-friendly table. # Current status -To see the status since the last time the scenarios were run open [table.md](table.md). +To see the status since the last time the scenarios were run open [table.md](table.md)[^1]. Please note: -* Mixing package types within a single namespace is not supported. While it may work in some cases, it may also break depending on the software versions used, the install commands issued, or the order of commands. Don't mix types. -* The `pkg_resources` method of namspacing is [no longer recommended](https://packaging.python.org/guides/packaging-namespace-packages/#pkg-resources-style-namespace-packages) and there is [the desire to deprecate it](https://github.com/pypa/python-packaging-user-guide/issues/265#issuecomment-290812581). It should only be used in legacy namespaces that already rely on it. +* Mixing package types within a single namespace is not supported. While it may work in some cases, it may also break depending on the software versions used, the install commands issued, or the order of commands. It is generally advisable to not mix types. +* The `pkg_resources` method of namspacing is [deprecated](https://setuptools.pypa.io/en/latest/pkg_resources.html). + Whenever possible, developers are encouraged to migrate away from it. * [PEP 420](https://www.python.org/dev/peps/pep-0420/) was accepted as part of Python 3.3. For wider compatibility (going back to Python 2.3), use the `pkgutil` method. -* Zipped eggs don't play nicely with namespace packaging, and may be implicitly installed by commands like `python setup.py install`. To prevent this, it is recommended that you set [`zip_safe=False`](http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag) in `setup.py`, as we do here. +* Zipped eggs don't play nicely with namespace packaging, and may be implicitly installed by commands like `python setup.py install`. To prevent this, it is recommended that you set [`zip_safe=False`](http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag) in `setup.py`, as we do here. Please also note that distributing packages via egg files is also considered deprecated. + +# Remarks on how to migrate away from `pkg_resources` + +It is difficult migrate away from deprecated `pkg_resources` namepaces in large projects. +Ideally, all packages sharing a namespace should coordinate and simultaneously drop `__init__.py` files to conform with PEP 420. +However, developers might be interested in carrying out a *staggered migration* plan and temporarily mix different namespacing techniques +to reduce spread the migration effort and workload in time. + +Based on the results for the scenarios mixing `pkg_resources` and other namespace methods reported in +[table.md](table.md) and [legacy_table.md](legacy_table.md), +we can see that (in principle) a staggered migration plan can be successful, +as long as the developers are willing to accept some limitations: + +- Deprecated installation methods will not be supported (e.g. `python setup.py install`), +- Editable installations will not be supported. + +Please note, however, that these are preliminary studies. +Developers should carry out an independent investigation, and check for the +specific use cases they are interested in supporting. + + +[^1]: If you would like to know about deprecated installation methods (e.g. via + `python setup.py install`) or Python 2.7, please have a look on [legacy_table.md](legacy_table.md). From 2d9a917639a8cea3cbd8348b04b6e2d42f95c52e Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 18:12:57 +0000 Subject: [PATCH 06/12] Change section title on README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2669080..0da202a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Please note: * [PEP 420](https://www.python.org/dev/peps/pep-0420/) was accepted as part of Python 3.3. For wider compatibility (going back to Python 2.3), use the `pkgutil` method. * Zipped eggs don't play nicely with namespace packaging, and may be implicitly installed by commands like `python setup.py install`. To prevent this, it is recommended that you set [`zip_safe=False`](http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag) in `setup.py`, as we do here. Please also note that distributing packages via egg files is also considered deprecated. -# Remarks on how to migrate away from `pkg_resources` +# Remarks on staggered migrations It is difficult migrate away from deprecated `pkg_resources` namepaces in large projects. Ideally, all packages sharing a namespace should coordinate and simultaneously drop `__init__.py` files to conform with PEP 420. From 094ce6ee5286d0427c3735f93417d472f766b693 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 15 Mar 2023 18:28:24 +0000 Subject: [PATCH 07/12] Rephrase confusing part in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0da202a..63e3821 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Please note: It is difficult migrate away from deprecated `pkg_resources` namepaces in large projects. Ideally, all packages sharing a namespace should coordinate and simultaneously drop `__init__.py` files to conform with PEP 420. However, developers might be interested in carrying out a *staggered migration* plan and temporarily mix different namespacing techniques -to reduce spread the migration effort and workload in time. +to mitigate the migration effort and spread the work load in time. Based on the results for the scenarios mixing `pkg_resources` and other namespace methods reported in [table.md](table.md) and [legacy_table.md](legacy_table.md), From d6452e1dc899942357ea20e05eb2aff25fcff4f2 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 27 Nov 2023 17:43:16 +0000 Subject: [PATCH 08/12] Add pyproject.toml to ensure PIP is using build isolation and modern backend APIS. --- native/pkg_a/pyproject.toml | 3 +++ native/pkg_b/pyproject.toml | 3 +++ pkg_resources/pkg_a/pyproject.toml | 3 +++ pkg_resources/pkg_b/pyproject.toml | 3 +++ pkgutil/pkg_a/pyproject.toml | 3 +++ pkgutil/pkg_b/pyproject.toml | 3 +++ 6 files changed, 18 insertions(+) create mode 100644 native/pkg_a/pyproject.toml create mode 100644 native/pkg_b/pyproject.toml create mode 100644 pkg_resources/pkg_a/pyproject.toml create mode 100644 pkg_resources/pkg_b/pyproject.toml create mode 100644 pkgutil/pkg_a/pyproject.toml create mode 100644 pkgutil/pkg_b/pyproject.toml diff --git a/native/pkg_a/pyproject.toml b/native/pkg_a/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/native/pkg_a/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/native/pkg_b/pyproject.toml b/native/pkg_b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/native/pkg_b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/pkg_resources/pkg_a/pyproject.toml b/pkg_resources/pkg_a/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pkg_resources/pkg_a/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/pkg_resources/pkg_b/pyproject.toml b/pkg_resources/pkg_b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pkg_resources/pkg_b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/pkgutil/pkg_a/pyproject.toml b/pkgutil/pkg_a/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pkgutil/pkg_a/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/pkgutil/pkg_b/pyproject.toml b/pkgutil/pkg_b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pkgutil/pkg_b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" From 826287a9730e50dbf47a0924b060291107e4917e Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 27 Nov 2023 18:59:42 +0000 Subject: [PATCH 09/12] Update table with newer results --- table.md | 168 +++++++++++++++++++++++++++---------------------------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/table.md b/table.md index f01bffb..0f33394 100644 --- a/table.md +++ b/table.md @@ -1,86 +1,86 @@ | Type | Interpreter | Package A command | Package B command | Status | | --- | --- | --- | --- | --- | -| pkgutil | python3.7 | pip install . | pip install . | ✅ | -| pkgutil | python3.7 | pip install . | pip install -e . | ✅ | -| pkgutil | python3.7 | pip install -e . | pip install . | ✅ | -| pkgutil | python3.7 | pip install -e . | pip install -e . | ✅ | -| pkgutil | python3.9 | pip install . | pip install . | ✅ | -| pkgutil | python3.9 | pip install . | pip install -e . | ✅ | -| pkgutil | python3.9 | pip install -e . | pip install . | ✅ | -| pkgutil | python3.9 | pip install -e . | pip install -e . | ✅ | -| pkgutil | python3.11 | pip install . | pip install . | ✅ | -| pkgutil | python3.11 | pip install . | pip install -e . | ✅ | -| pkgutil | python3.11 | pip install -e . | pip install . | ✅ | -| pkgutil | python3.11 | pip install -e . | pip install -e . | ✅ | -| pkg_resources | python3.7 | pip install . | pip install . | ✅ | -| pkg_resources | python3.7 | pip install . | pip install -e . | ✅ | -| pkg_resources | python3.7 | pip install -e . | pip install . | ✅ | -| pkg_resources | python3.7 | pip install -e . | pip install -e . | ✅ | -| pkg_resources | python3.9 | pip install . | pip install . | ✅ | -| pkg_resources | python3.9 | pip install . | pip install -e . | ✅ | -| pkg_resources | python3.9 | pip install -e . | pip install . | ✅ | -| pkg_resources | python3.9 | pip install -e . | pip install -e . | ✅ | -| pkg_resources | python3.11 | pip install . | pip install . | ✅ | -| pkg_resources | python3.11 | pip install . | pip install -e . | ✅ | -| pkg_resources | python3.11 | pip install -e . | pip install . | ✅ | -| pkg_resources | python3.11 | pip install -e . | pip install -e . | ✅ | -| pep420 | python3.7 | pip install . | pip install . | ✅ | -| pep420 | python3.7 | pip install . | pip install -e . | ✅ | -| pep420 | python3.7 | pip install -e . | pip install . | ✅ | -| pep420 | python3.7 | pip install -e . | pip install -e . | ✅ | -| pep420 | python3.9 | pip install . | pip install . | ✅ | -| pep420 | python3.9 | pip install . | pip install -e . | ✅ | -| pep420 | python3.9 | pip install -e . | pip install . | ✅ | -| pep420 | python3.9 | pip install -e . | pip install -e . | ✅ | -| pep420 | python3.11 | pip install . | pip install . | ✅ | -| pep420 | python3.11 | pip install . | pip install -e . | ✅ | -| pep420 | python3.11 | pip install -e . | pip install . | ✅ | -| pep420 | python3.11 | pip install -e . | pip install -e . | ✅ | -| cross_pkg_resources_pkgutil | python3.7 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pkgutil | python3.7 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pkgutil | python3.7 | pip install -e . | pip install . | ❌ | -| cross_pkg_resources_pkgutil | python3.7 | pip install -e . | pip install -e . | ❌ | -| cross_pkg_resources_pkgutil | python3.9 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pkgutil | python3.9 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pkgutil | python3.9 | pip install -e . | pip install . | ❌ | -| cross_pkg_resources_pkgutil | python3.9 | pip install -e . | pip install -e . | ❌ | -| cross_pkg_resources_pkgutil | python3.11 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pkgutil | python3.11 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pkgutil | python3.11 | pip install -e . | pip install . | ❌ | -| cross_pkg_resources_pkgutil | python3.11 | pip install -e . | pip install -e . | ❌ | -| cross_pep420_pkgutil | python3.7 | pip install . | pip install . | ✅ | -| cross_pep420_pkgutil | python3.7 | pip install . | pip install -e . | ✅ | -| cross_pep420_pkgutil | python3.7 | pip install -e . | pip install . | ✅ | -| cross_pep420_pkgutil | python3.7 | pip install -e . | pip install -e . | ✅ | -| cross_pep420_pkgutil | python3.9 | pip install . | pip install . | ✅ | -| cross_pep420_pkgutil | python3.9 | pip install . | pip install -e . | ✅ | -| cross_pep420_pkgutil | python3.9 | pip install -e . | pip install . | ✅ | -| cross_pep420_pkgutil | python3.9 | pip install -e . | pip install -e . | ✅ | -| cross_pep420_pkgutil | python3.11 | pip install . | pip install . | ✅ | -| cross_pep420_pkgutil | python3.11 | pip install . | pip install -e . | ✅ | -| cross_pep420_pkgutil | python3.11 | pip install -e . | pip install . | ✅ | -| cross_pep420_pkgutil | python3.11 | pip install -e . | pip install -e . | ✅ | -| cross_pep420_pkg_resources | python3.7 | pip install . | pip install . | ✅ | -| cross_pep420_pkg_resources | python3.7 | pip install . | pip install -e . | ❌ | -| cross_pep420_pkg_resources | python3.7 | pip install -e . | pip install . | ✅ | -| cross_pep420_pkg_resources | python3.7 | pip install -e . | pip install -e . | ❌ | -| cross_pep420_pkg_resources | python3.9 | pip install . | pip install . | ✅ | -| cross_pep420_pkg_resources | python3.9 | pip install . | pip install -e . | ❌ | -| cross_pep420_pkg_resources | python3.9 | pip install -e . | pip install . | ✅ | -| cross_pep420_pkg_resources | python3.9 | pip install -e . | pip install -e . | ❌ | -| cross_pep420_pkg_resources | python3.11 | pip install . | pip install . | ✅ | -| cross_pep420_pkg_resources | python3.11 | pip install . | pip install -e . | ❌ | -| cross_pep420_pkg_resources | python3.11 | pip install -e . | pip install . | ✅ | -| cross_pep420_pkg_resources | python3.11 | pip install -e . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.7 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.7 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.7 | pip install -e . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.7 | pip install -e . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.9 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.9 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.9 | pip install -e . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.9 | pip install -e . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.11 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.11 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.11 | pip install -e . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.11 | pip install -e . | pip install -e . | ❌ | +| pkgutil | python3.8 | pip install . | pip install . | ✅ | +| pkgutil | python3.8 | pip install . | pip install -e . | ✅ | +| pkgutil | python3.8 | pip install -e . | pip install . | ✅ | +| pkgutil | python3.8 | pip install -e . | pip install -e . | ✅ | +| pkgutil | python3.10 | pip install . | pip install . | ✅ | +| pkgutil | python3.10 | pip install . | pip install -e . | ✅ | +| pkgutil | python3.10 | pip install -e . | pip install . | ✅ | +| pkgutil | python3.10 | pip install -e . | pip install -e . | ✅ | +| pkgutil | python3.12 | pip install . | pip install . | ✅ | +| pkgutil | python3.12 | pip install . | pip install -e . | ✅ | +| pkgutil | python3.12 | pip install -e . | pip install . | ✅ | +| pkgutil | python3.12 | pip install -e . | pip install -e . | ✅ | +| pkg_resources | python3.8 | pip install . | pip install . | ✅ | +| pkg_resources | python3.8 | pip install . | pip install -e . | ✅ | +| pkg_resources | python3.8 | pip install -e . | pip install . | ✅ | +| pkg_resources | python3.8 | pip install -e . | pip install -e . | ✅ | +| pkg_resources | python3.10 | pip install . | pip install . | ✅ | +| pkg_resources | python3.10 | pip install . | pip install -e . | ✅ | +| pkg_resources | python3.10 | pip install -e . | pip install . | ✅ | +| pkg_resources | python3.10 | pip install -e . | pip install -e . | ✅ | +| pkg_resources | python3.12 | pip install . | pip install . | ✅ | +| pkg_resources | python3.12 | pip install . | pip install -e . | ✅ | +| pkg_resources | python3.12 | pip install -e . | pip install . | ✅ | +| pkg_resources | python3.12 | pip install -e . | pip install -e . | ✅ | +| pep420 | python3.8 | pip install . | pip install . | ✅ | +| pep420 | python3.8 | pip install . | pip install -e . | ✅ | +| pep420 | python3.8 | pip install -e . | pip install . | ✅ | +| pep420 | python3.8 | pip install -e . | pip install -e . | ✅ | +| pep420 | python3.10 | pip install . | pip install . | ✅ | +| pep420 | python3.10 | pip install . | pip install -e . | ✅ | +| pep420 | python3.10 | pip install -e . | pip install . | ✅ | +| pep420 | python3.10 | pip install -e . | pip install -e . | ✅ | +| pep420 | python3.12 | pip install . | pip install . | ✅ | +| pep420 | python3.12 | pip install . | pip install -e . | ✅ | +| pep420 | python3.12 | pip install -e . | pip install . | ✅ | +| pep420 | python3.12 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.8 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pkgutil | python3.8 | pip install . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.8 | pip install -e . | pip install . | ❌ | +| cross_pkg_resources_pkgutil | python3.8 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.10 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pkgutil | python3.10 | pip install . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.10 | pip install -e . | pip install . | ❌ | +| cross_pkg_resources_pkgutil | python3.10 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.12 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pkgutil | python3.12 | pip install . | pip install -e . | ✅ | +| cross_pkg_resources_pkgutil | python3.12 | pip install -e . | pip install . | ❌ | +| cross_pkg_resources_pkgutil | python3.12 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.8 | pip install . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.8 | pip install . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.8 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.8 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.10 | pip install . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.10 | pip install . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.10 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.10 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.12 | pip install . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.12 | pip install . | pip install -e . | ✅ | +| cross_pep420_pkgutil | python3.12 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkgutil | python3.12 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkg_resources | python3.8 | pip install . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.8 | pip install . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.8 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.8 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkg_resources | python3.10 | pip install . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.10 | pip install . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.10 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.10 | pip install -e . | pip install -e . | ✅ | +| cross_pep420_pkg_resources | python3.12 | pip install . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.12 | pip install . | pip install -e . | ❌ | +| cross_pep420_pkg_resources | python3.12 | pip install -e . | pip install . | ✅ | +| cross_pep420_pkg_resources | python3.12 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pep420 | python3.8 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.8 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.8 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.8 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pep420 | python3.10 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.10 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.10 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.10 | pip install -e . | pip install -e . | ✅ | +| cross_pkg_resources_pep420 | python3.12 | pip install . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.12 | pip install . | pip install -e . | ❌ | +| cross_pkg_resources_pep420 | python3.12 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.12 | pip install -e . | pip install -e . | ✅ | From 80b7f2161f67d57f9870e40d68abdc2ca74e091a Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 27 Nov 2023 19:06:08 +0000 Subject: [PATCH 10/12] Update README to mention build isolation --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 63e3821..118e5d9 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Please note: Whenever possible, developers are encouraged to migrate away from it. * [PEP 420](https://www.python.org/dev/peps/pep-0420/) was accepted as part of Python 3.3. For wider compatibility (going back to Python 2.3), use the `pkgutil` method. * Zipped eggs don't play nicely with namespace packaging, and may be implicitly installed by commands like `python setup.py install`. To prevent this, it is recommended that you set [`zip_safe=False`](http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag) in `setup.py`, as we do here. Please also note that distributing packages via egg files is also considered deprecated. +* The tests reported in [table.md](table.md) use `pip` with *build isolation* and build-backend APIs. + This is triggered by the presence of a `pyproject.toml` file in each package source directory. + If your package does not have a `pyproject.toml` file, + `pip` might select a legacy (and deprecated) installation procedure, which can behave differently. # Remarks on staggered migrations From 0a6d976bf7003e7a2a665d21f9fbfe75e6e32d80 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 5 Feb 2024 11:35:37 +0000 Subject: [PATCH 11/12] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) Co-authored-by: chrysle --- README.md | 6 +++--- report_to_table.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 118e5d9..4ffda8f 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ markdown-friendly table. To see the status since the last time the scenarios were run open [table.md](table.md)[^1]. Please note: -* Mixing package types within a single namespace is not supported. While it may work in some cases, it may also break depending on the software versions used, the install commands issued, or the order of commands. It is generally advisable to not mix types. +* Mixing package types within a single namespace is not supported. While it may work in some cases, it may also break depending on the software versions used, the install commands issued, or the order of commands. It is generally advisable not to mix types. * The `pkg_resources` method of namspacing is [deprecated](https://setuptools.pypa.io/en/latest/pkg_resources.html). Whenever possible, developers are encouraged to migrate away from it. * [PEP 420](https://www.python.org/dev/peps/pep-0420/) was accepted as part of Python 3.3. For wider compatibility (going back to Python 2.3), use the `pkgutil` method. -* Zipped eggs don't play nicely with namespace packaging, and may be implicitly installed by commands like `python setup.py install`. To prevent this, it is recommended that you set [`zip_safe=False`](http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag) in `setup.py`, as we do here. Please also note that distributing packages via egg files is also considered deprecated. +* Zipped eggs don't play nicely with namespace packaging, and may be implicitly installed by commands like `python setup.py install`. To prevent this, it is recommended that you set [`zip_safe=False`](http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag) in `setup.py`, as we do here. Please also note that distributing packages via egg files is considered deprecated. * The tests reported in [table.md](table.md) use `pip` with *build isolation* and build-backend APIs. This is triggered by the presence of a `pyproject.toml` file in each package source directory. If your package does not have a `pyproject.toml` file, @@ -57,4 +57,4 @@ specific use cases they are interested in supporting. [^1]: If you would like to know about deprecated installation methods (e.g. via - `python setup.py install`) or Python 2.7, please have a look on [legacy_table.md](legacy_table.md). + `python setup.py install`) or Python 2.7, please have a look at [legacy_table.md](legacy_table.md). diff --git a/report_to_table.py b/report_to_table.py index 638d6e2..891ded3 100644 --- a/report_to_table.py +++ b/report_to_table.py @@ -15,7 +15,8 @@ session_name = session['name'] session_detailled_name = session['signatures'][-1] session_interpreter = session_detailled_name.replace(session_name + "-", "python") - session_name = session_name.replace("session_", "") + # TODO: Replace with `str.removeprefix()` in Python 3.12 + session_name = session_name[len("session_") :] f.write('| {} | {} | {} | {} | {} |\n'.format( session_name, From a96b5dc60d0f2dda520399a3429f359e7ef49c37 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 5 Feb 2024 12:41:21 +0000 Subject: [PATCH 12/12] Update table --- table.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/table.md b/table.md index 0f33394..0804c45 100644 --- a/table.md +++ b/table.md @@ -73,14 +73,14 @@ | cross_pep420_pkg_resources | python3.12 | pip install -e . | pip install . | ✅ | | cross_pep420_pkg_resources | python3.12 | pip install -e . | pip install -e . | ✅ | | cross_pkg_resources_pep420 | python3.8 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.8 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.8 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.8 | pip install . | pip install -e . | ✅ | +| cross_pkg_resources_pep420 | python3.8 | pip install -e . | pip install . | ❌ | | cross_pkg_resources_pep420 | python3.8 | pip install -e . | pip install -e . | ✅ | | cross_pkg_resources_pep420 | python3.10 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.10 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.10 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.10 | pip install . | pip install -e . | ✅ | +| cross_pkg_resources_pep420 | python3.10 | pip install -e . | pip install . | ❌ | | cross_pkg_resources_pep420 | python3.10 | pip install -e . | pip install -e . | ✅ | | cross_pkg_resources_pep420 | python3.12 | pip install . | pip install . | ✅ | -| cross_pkg_resources_pep420 | python3.12 | pip install . | pip install -e . | ❌ | -| cross_pkg_resources_pep420 | python3.12 | pip install -e . | pip install . | ✅ | +| cross_pkg_resources_pep420 | python3.12 | pip install . | pip install -e . | ✅ | +| cross_pkg_resources_pep420 | python3.12 | pip install -e . | pip install . | ❌ | | cross_pkg_resources_pep420 | python3.12 | pip install -e . | pip install -e . | ✅ |