From f6cd60e6ea17a00754ae145491e70a817bdda84e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Jul 2023 16:40:46 -0400 Subject: [PATCH] [3.12] gh-106752: Move zipfile._path into its own package (GH-106753) * gh-106752: Move zipfile._path into its own package so it may have supplementary behavior. * Add blurb. (cherry picked from commit 03185f0c150ebc52d41dd5ea6f369c7b5ba9fc16) Co-authored-by: Jason R. Coombs --- .github/CODEOWNERS | 2 +- Lib/test/test_zipfile/_path/__init__.py | 0 Lib/test/test_zipfile/{ => _path}/_functools.py | 0 Lib/test/test_zipfile/{ => _path}/_itertools.py | 0 Lib/test/test_zipfile/{ => _path}/_support.py | 0 Lib/test/test_zipfile/{ => _path}/_test_params.py | 0 Lib/test/test_zipfile/{ => _path}/test_complexity.py | 0 Lib/test/test_zipfile/{ => _path}/test_path.py | 0 Lib/zipfile/{_path.py => _path/__init__.py} | 0 Makefile.pre.in | 3 ++- .../next/Tests/2023-07-14-16-20-06.gh-issue-106752.gd1i6D.rst | 2 ++ 11 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Lib/test/test_zipfile/_path/__init__.py rename Lib/test/test_zipfile/{ => _path}/_functools.py (100%) rename Lib/test/test_zipfile/{ => _path}/_itertools.py (100%) rename Lib/test/test_zipfile/{ => _path}/_support.py (100%) rename Lib/test/test_zipfile/{ => _path}/_test_params.py (100%) rename Lib/test/test_zipfile/{ => _path}/test_complexity.py (100%) rename Lib/test/test_zipfile/{ => _path}/test_path.py (100%) rename Lib/zipfile/{_path.py => _path/__init__.py} (100%) create mode 100644 Misc/NEWS.d/next/Tests/2023-07-14-16-20-06.gh-issue-106752.gd1i6D.rst diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 32ba5355a5853f..95fd51b743cd33 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -164,4 +164,4 @@ Lib/ast.py @isidentical **/*pathlib* @barneygale # zipfile.Path -**/*zipfile/*_path.py @jaraco +**/*zipfile/_path/* @jaraco diff --git a/Lib/test/test_zipfile/_path/__init__.py b/Lib/test/test_zipfile/_path/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/Lib/test/test_zipfile/_functools.py b/Lib/test/test_zipfile/_path/_functools.py similarity index 100% rename from Lib/test/test_zipfile/_functools.py rename to Lib/test/test_zipfile/_path/_functools.py diff --git a/Lib/test/test_zipfile/_itertools.py b/Lib/test/test_zipfile/_path/_itertools.py similarity index 100% rename from Lib/test/test_zipfile/_itertools.py rename to Lib/test/test_zipfile/_path/_itertools.py diff --git a/Lib/test/test_zipfile/_support.py b/Lib/test/test_zipfile/_path/_support.py similarity index 100% rename from Lib/test/test_zipfile/_support.py rename to Lib/test/test_zipfile/_path/_support.py diff --git a/Lib/test/test_zipfile/_test_params.py b/Lib/test/test_zipfile/_path/_test_params.py similarity index 100% rename from Lib/test/test_zipfile/_test_params.py rename to Lib/test/test_zipfile/_path/_test_params.py diff --git a/Lib/test/test_zipfile/test_complexity.py b/Lib/test/test_zipfile/_path/test_complexity.py similarity index 100% rename from Lib/test/test_zipfile/test_complexity.py rename to Lib/test/test_zipfile/_path/test_complexity.py diff --git a/Lib/test/test_zipfile/test_path.py b/Lib/test/test_zipfile/_path/test_path.py similarity index 100% rename from Lib/test/test_zipfile/test_path.py rename to Lib/test/test_zipfile/_path/test_path.py diff --git a/Lib/zipfile/_path.py b/Lib/zipfile/_path/__init__.py similarity index 100% rename from Lib/zipfile/_path.py rename to Lib/zipfile/_path/__init__.py diff --git a/Makefile.pre.in b/Makefile.pre.in index 12788d11d1d145..8dacb570ccafab 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2110,7 +2110,7 @@ LIBSUBDIRS= asyncio \ wsgiref \ $(XMLLIBSUBDIRS) \ xmlrpc \ - zipfile \ + zipfile zipfile/_path \ zoneinfo \ __phello__ TESTSUBDIRS= idlelib/idle_test \ @@ -2220,6 +2220,7 @@ TESTSUBDIRS= idlelib/idle_test \ test/test_warnings \ test/test_warnings/data \ test/test_zipfile \ + test/test_zipfile/_path \ test/test_zoneinfo \ test/test_zoneinfo/data \ test/tracedmodules \ diff --git a/Misc/NEWS.d/next/Tests/2023-07-14-16-20-06.gh-issue-106752.gd1i6D.rst b/Misc/NEWS.d/next/Tests/2023-07-14-16-20-06.gh-issue-106752.gd1i6D.rst new file mode 100644 index 00000000000000..ba7257e3610808 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2023-07-14-16-20-06.gh-issue-106752.gd1i6D.rst @@ -0,0 +1,2 @@ +Moved tests for ``zipfile.Path`` into ``Lib/test/test_zipfile/_path``. Made +``zipfile._path`` a package.