Python 3.12 compatibility (#5157)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by GitHub · parents 367e1df, ed8ddb6 · Browse files · 6 files·+12 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+12 added−8 removed
- other:+12 added−8 removed
Provenance
- Commit
9930b0f- Tree
ea3d8dd- Author
David Lord <davidism@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
367e1df- Parent 2
ed8ddb6
6 files changed+12 added−8 removed
modified:requirements/tests-pallets-min.in+1 added-1 removed
1-Werkzeug==2.3.31+Werkzeug==2.3.52 Jinja2==3.1.23 MarkupSafe==2.1.14 itsdangerous==2.1.25 click==8.1.31 unmodified linemodified:requirements/tests-pallets-min.txt+2 added-2 removed
1-# SHA1:0b58503b99aabc227b7f39357216d676d9987a121+# SHA1:c4bfd085a9d4e81c583daf70671803d5e388c6562 #3 # This file is autogenerated by pip-compile-multi4 # To update, run:5 #11 unmodified lines17 # via18 # -r requirements/tests-pallets-min.in19 # jinja220 # werkzeug21-werkzeug==2.3.321+werkzeug==2.3.522 # via -r requirements/tests-pallets-min.inmodified:src/flask/helpers.py+3 added-2 removed
1 from __future__ import annotations2 3+import importlib.util4 import os4-import pkgutil5 import socket6 import sys7 import typing as t8 import warnings565 unmodified lines574 if mod is not None and hasattr(mod, "__file__") and mod.__file__ is not None:575 return os.path.dirname(os.path.abspath(mod.__file__))576 577 # Next attempt: check the loader.578- loader = pkgutil.get_loader(import_name)578+ spec = importlib.util.find_spec(import_name)579+ loader = spec.loader if spec is not None else None580 581 # Loader does not exist or we're referring to an unloaded main582 # module or a main module without path (interactive sessions), go583 # with the current working directory.111 unmodified linesmodified:src/flask/scaffold.py+2 added-2 removed
1 unmodified line2 3 import importlib.util4 import os5 import pathlib6-import pkgutil6 import sys7 import typing as t8 from collections import defaultdict9 from datetime import timedelta844 unmodified lines854 else:855 return os.path.dirname(root_spec.origin)856 857 # we were unable to find the `package_path` using PEP 451 loaders859- loader = pkgutil.get_loader(root_mod_name)858+ spec = importlib.util.find_spec(root_mod_name)859+ loader = spec.loader if spec is not None else None860 861 if loader is None or root_mod_name == "__main__":862 # import name is not found, or interactive/main module863 return os.getcwd()60 unmodified linesmodified:CHANGES.rst+3 added
1 unmodified line2 -------------3 4 Unreleased5 6+- Python 3.12 compatibility.7+- Update Werkzeug requirement to >=2.3.5.8 9+10 Version 2.3.211 -------------12 13 Released 2023-05-011501 unmodified linesmodified:pyproject.toml+1 added-1 removed
17 unmodified lines1819202122222324252670 unmodified lines17 unmodified lines "Topic :: Software Development :: Libraries :: Application Frameworks",]requires-python = ">=3.8"dependencies = [ "Werkzeug>=2.3.3", "Werkzeug>=2.3.5", "Jinja2>=3.1.2", "itsdangerous>=2.1.2", "click>=8.1.3", "blinker>=1.6.2",70 unmodified lines