Closed sagitter closed 3 years ago
We first need support from https://github.com/jackmaney/python-stdlib-list. Python 3.10 is not scheduled to be released until the 4th of October.
Yes, but since it'll be included in the next Fedora release (35), we tend to start testing it early in our release cycle so we can inform upstream projects if their tools run into issues with the new version. More information on this here:
https://fedoraproject.org/wiki/Changes/Python3.10
I opened a PR here for pydeps: https://github.com/jackmaney/python-stdlib-list/pull/49. It'll hopefully be merged soon.
There shouldn't be any changes needed in pydeps to support Python 3.10.
I changed stdlib_list by copying lists/3.9.txt to lists/3.10.txt and added "3.10"
to long_versions:
(pydeps310) go|c:\srv\lib\code\pydeps> pytest -xvv
========================================================================= test session starts =========================================================================
platform win32 -- Python 3.10.0rc1, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- c:\srv\venv\pydeps310\scripts\python.exe
cachedir: .pytest_cache
rootdir: c:\srv\lib\code\pydeps
plugins: cov-2.12.1
collected 39 items
tests/test_cli.py::test_output PASSED [ 2%]
tests/test_cli.py::test_rankdir_default PASSED [ 5%]
tests/test_cli.py::test_error PASSED [ 7%]
tests/test_colors.py::test_rgb2css PASSED [ 10%]
tests/test_colors.py::test_brightness PASSED [ 12%]
tests/test_colors.py::test_colordiff PASSED [ 15%]
tests/test_colors.py::test_foreground PASSED [ 17%]
tests/test_colors.py::test_name2rgb PASSED [ 20%]
tests/test_cycles.py::test_cycle PASSED [ 23%]
tests/test_dep2dot.py::test_dep2dot PASSED [ 25%]
tests/test_dot.py::test_svg PASSED [ 28%]
tests/test_dot.py::test_svg_str PASSED [ 30%]
tests/test_dot.py::test_boolopt PASSED [ 33%]
tests/test_dot.py::test_obj PASSED [ 35%]
tests/test_dot.py::test_cmd2args PASSED [ 38%]
tests/test_externals.py::test_relative_imports PASSED [ 41%]
tests/test_file.py::test_file PASSED [ 43%]
tests/test_file.py::test_file_pylib PASSED [ 46%]
tests/test_file.py::test_file_pyliball PASSED [ 48%]
tests/test_funny_names.py::test_from_html5lib PASSED [ 51%]
tests/test_json.py::test_dep2dot PASSED [ 53%]
tests/test_py2dep.py::test_py2depgraph PASSED [ 56%]
tests/test_relative_imports.py::test_relative_imports PASSED [ 58%]
tests/test_relative_imports.py::test_relative_imports2 PASSED [ 61%]
tests/test_relative_imports.py::test_relative_imports3 PASSED [ 64%]
tests/test_relative_imports.py::test_relative_imports_same_name_with_std PASSED [ 66%]
tests/test_relative_imports.py::test_relative_imports_same_name_with_std_future PASSED [ 69%]
tests/test_relative_imports.py::test_pydeps_colors PASSED [ 71%]
tests/test_relative_imports.py::test_hierarchy PASSED [ 74%]
tests/test_render_context.py::test_render_context PASSED [ 76%]
tests/test_render_context.py::test_render_context_reverse PASSED [ 79%]
tests/test_render_context.py::test_render_context_rankdir PASSED [ 82%]
tests/test_skinny_package.py::test_from_html5lib PASSED [ 84%]
tests/test_skip.py::test_no_skip PASSED [ 87%]
tests/test_skip.py::test_skip_module_pattern PASSED [ 89%]
tests/test_skip.py::test_skip_exact_pattern PASSED [ 92%]
tests/test_skip.py::test_skip_exact PASSED [ 94%]
tests/test_skip.py::test_skip_modules PASSED [ 97%]
tests/test_skip.py::test_rawdeps PASSED [100%]
========================================================================= 39 passed in 18.81s =========================================================================
(pydeps310) go|c:\srv\lib\code\pydeps> cdsitepackages
(pydeps310) go|c:\srv\venv\pydeps310\Lib\site-packages> cd stdlib_list
(pydeps310) go|c:\srv\venv\pydeps310\Lib\site-packages\stdlib_list> git diff
diff --git a/base.py b/base.py
index 0cde17a..68aaedd 100644
--- a/base.py
+++ b/base.py
@@ -10,7 +10,7 @@ except ImportError:
from functools32 import lru_cache
long_versions = ["2.6.9", "2.7.9", "3.2.6", "3.3.6", "3.4.3", "3.5", "3.6",
- "3.7", "3.8", "3.9"]
+ "3.7", "3.8", "3.9", "3.10"]
short_versions = [".".join(x.split(".")[:2]) for x in long_versions]
(pydeps310) go|c:\srv\venv\pydeps310\Lib\site-packages\stdlib_list>
I.e. when stlib_list supports 3.10 (e.g. through https://github.com/jackmaney/python-stdlib-list/pull/49), pydeps will too :-)
I've implemented a "hack" that essentially does what I did in the previous comment (uses the last available version from stdlib_list). It is on PyPI as v1.10.0.
it looks like stdlib-list is just part of base python now. Pydeps should probably use the standard library version and free up a dependancy: https://github.com/jackmaney/python-stdlib-list/issues/55#issuecomment-1297020414
@ryanneilyoung pydeps supports older python versions, so unfortunately there wouldn't be any freeing up of dependencies :-(
It would probably be a good idea to change pydeps/pydeps/pystdlib.py to use the suggested
builtin_modules = list(set(list(sys.stdlib_module_names) + list(sys.builtin_module_names)))
as the initial source of modules with py > 3.10. I haven't checked what the snippet returns very deeply, but I'm pretty sure we still need to keep our own extras list (and maybe even merge in the stdlib_list data to prevent surprises..?).
The current code-path must stay in place for users of older Pythons.
Hi all.
Please, support
Python-3.10
if you can (Fedora bugzilla ticket #1897245):Thanks!