From 328a9cdf206c3e62247443b507b7bd93986c7ee4 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 2 Dec 2024 08:04:53 -0600 Subject: [PATCH 1/2] Test that Unicode filenames can be imported --- .../20241202_080501_kurtmckee_unicode_filenames.rst | 4 ++++ .../RECORD | 3 ++- .../direct_url.json | 2 +- .../package_resources_filesystem/\343\201\202.py" | 1 + .../package_resources_sqlite-2.2.2.dist-info/RECORD | 3 ++- .../direct_url.json | 2 +- .../package_resources_sqlite/\343\201\202.py" | 1 + .../package_resources_filesystem/\343\201\202.py" | 1 + .../src/package_resources_sqlite/\343\201\202.py" | 1 + tests/test_importing.py | 13 +++++++++++++ 10 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 changelog.d/20241202_080501_kurtmckee_unicode_filenames.rst create mode 100644 "tests/installed-projects/filesystem/package_resources_filesystem/\343\201\202.py" create mode 100644 "tests/installed-projects/sqlite/package_resources_sqlite/\343\201\202.py" create mode 100644 "tests/source-projects/package-resources/filesystem/src/package_resources_filesystem/\343\201\202.py" create mode 100644 "tests/source-projects/package-resources/sqlite/src/package_resources_sqlite/\343\201\202.py" diff --git a/changelog.d/20241202_080501_kurtmckee_unicode_filenames.rst b/changelog.d/20241202_080501_kurtmckee_unicode_filenames.rst new file mode 100644 index 0000000..633e09d --- /dev/null +++ b/changelog.d/20241202_080501_kurtmckee_unicode_filenames.rst @@ -0,0 +1,4 @@ +Added +----- + +* Test that Unicode filenames can be imported. diff --git a/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/RECORD b/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/RECORD index dc6cf1d..4ebe9ab 100644 --- a/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/RECORD +++ b/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/RECORD @@ -6,4 +6,5 @@ package_resources_filesystem-1.1.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmM package_resources_filesystem-1.1.1.dist-info/direct_url.json,, package_resources_filesystem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 package_resources_filesystem/resource.txt,sha256=UzUTwTl8uMzsBYUrUlFL7NX9jJwhUJ97wvXUYMYUPdg,9 -package_resources_filesystem/shift_jis.py,sha256=s5AYdLUzNAUliEPKSpJzWaVSJ8MopnN1YtP_gBXOFqs,31 \ No newline at end of file +package_resources_filesystem/shift_jis.py,sha256=s5AYdLUzNAUliEPKSpJzWaVSJ8MopnN1YtP_gBXOFqs,31 +package_resources_filesystem/あ.py,sha256=hudcY6c59JQOUKDM1e7HT-ZDoMzaQ38C40TaJgBLcBA,29 \ No newline at end of file diff --git a/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/direct_url.json b/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/direct_url.json index aa0ef26..c487f17 100644 --- a/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/direct_url.json +++ b/tests/installed-projects/filesystem/package_resources_filesystem-1.1.1.dist-info/direct_url.json @@ -1 +1 @@ -{"archive_info": {"hash": "sha256=c5903564d2dbca50f343d541bf606a6b91e3a933c3c36bc5ec59473cac43ae50", "hashes": {"sha256": "c5903564d2dbca50f343d541bf606a6b91e3a933c3c36bc5ec59473cac43ae50"}}, "url": "file:///package_resources_filesystem-1.1.1-py3-none-any.whl"} \ No newline at end of file +{"archive_info": {"hash": "sha256=29858c6073d50a06dcab1ce39df0f36c0df5eea57d9d3ef28eb6fcd3a6192278", "hashes": {"sha256": "29858c6073d50a06dcab1ce39df0f36c0df5eea57d9d3ef28eb6fcd3a6192278"}}, "url": "file:///package_resources_filesystem-1.1.1-py3-none-any.whl"} \ No newline at end of file diff --git "a/tests/installed-projects/filesystem/package_resources_filesystem/\343\201\202.py" "b/tests/installed-projects/filesystem/package_resources_filesystem/\343\201\202.py" new file mode 100644 index 0000000..160336a --- /dev/null +++ "b/tests/installed-projects/filesystem/package_resources_filesystem/\343\201\202.py" @@ -0,0 +1 @@ +success = "unicode-filename" diff --git a/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/RECORD b/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/RECORD index d10db50..7fc0199 100644 --- a/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/RECORD +++ b/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/RECORD @@ -6,4 +6,5 @@ package_resources_sqlite-2.2.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb- package_resources_sqlite-2.2.2.dist-info/direct_url.json,, package_resources_sqlite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 package_resources_sqlite/resource.txt,sha256=UzUTwTl8uMzsBYUrUlFL7NX9jJwhUJ97wvXUYMYUPdg,9 -package_resources_sqlite/shift_jis.py,sha256=s5AYdLUzNAUliEPKSpJzWaVSJ8MopnN1YtP_gBXOFqs,31 \ No newline at end of file +package_resources_sqlite/shift_jis.py,sha256=s5AYdLUzNAUliEPKSpJzWaVSJ8MopnN1YtP_gBXOFqs,31 +package_resources_sqlite/あ.py,sha256=hudcY6c59JQOUKDM1e7HT-ZDoMzaQ38C40TaJgBLcBA,29 \ No newline at end of file diff --git a/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/direct_url.json b/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/direct_url.json index fb1f490..e524887 100644 --- a/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/direct_url.json +++ b/tests/installed-projects/sqlite/package_resources_sqlite-2.2.2.dist-info/direct_url.json @@ -1 +1 @@ -{"archive_info": {"hash": "sha256=8adcb1c657ba451c03b120af114dc1a2eca436fbfcbdb5fb2f0a052356ce4c1e", "hashes": {"sha256": "8adcb1c657ba451c03b120af114dc1a2eca436fbfcbdb5fb2f0a052356ce4c1e"}}, "url": "file:///package_resources_sqlite-2.2.2-py3-none-any.whl"} \ No newline at end of file +{"archive_info": {"hash": "sha256=eebf5eb000800954469f01c19ab705a38909685abfb3ec287a1b5e978505c612", "hashes": {"sha256": "eebf5eb000800954469f01c19ab705a38909685abfb3ec287a1b5e978505c612"}}, "url": "file:///package_resources_sqlite-2.2.2-py3-none-any.whl"} \ No newline at end of file diff --git "a/tests/installed-projects/sqlite/package_resources_sqlite/\343\201\202.py" "b/tests/installed-projects/sqlite/package_resources_sqlite/\343\201\202.py" new file mode 100644 index 0000000..160336a --- /dev/null +++ "b/tests/installed-projects/sqlite/package_resources_sqlite/\343\201\202.py" @@ -0,0 +1 @@ +success = "unicode-filename" diff --git "a/tests/source-projects/package-resources/filesystem/src/package_resources_filesystem/\343\201\202.py" "b/tests/source-projects/package-resources/filesystem/src/package_resources_filesystem/\343\201\202.py" new file mode 100644 index 0000000..160336a --- /dev/null +++ "b/tests/source-projects/package-resources/filesystem/src/package_resources_filesystem/\343\201\202.py" @@ -0,0 +1 @@ +success = "unicode-filename" diff --git "a/tests/source-projects/package-resources/sqlite/src/package_resources_sqlite/\343\201\202.py" "b/tests/source-projects/package-resources/sqlite/src/package_resources_sqlite/\343\201\202.py" new file mode 100644 index 0000000..160336a --- /dev/null +++ "b/tests/source-projects/package-resources/sqlite/src/package_resources_sqlite/\343\201\202.py" @@ -0,0 +1 @@ +success = "unicode-filename" diff --git a/tests/test_importing.py b/tests/test_importing.py index 6416e18..c91d461 100644 --- a/tests/test_importing.py +++ b/tests/test_importing.py @@ -104,3 +104,16 @@ def test_package_resources_shift_jis(database, import_name): module = importlib.import_module(import_name) assert module.a == "あ" + + +@pytest.mark.parametrize( + "import_name", + ( + "package_resources_filesystem.あ", + "package_resources_sqlite.あ", + ), +) +def test_package_resources_unicode_filename(database, import_name): + module = importlib.import_module(import_name) + + assert module.success == "unicode-filename" From 07cb2d8a05ecb33519ef81103a23643f14581aac Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 2 Dec 2024 09:04:26 -0600 Subject: [PATCH 2/2] Drop support for PyPy 3.9 --- .github/workflows/test.yaml | 1 - changelog.d/20241202_090256_kurtmckee_unicode_filenames.rst | 4 ++++ tox.ini | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelog.d/20241202_090256_kurtmckee_unicode_filenames.rst diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0bdcc29..297592c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -33,7 +33,6 @@ jobs: - "3.13" cpython-beta: "3.14" pypys: - - "3.9" - "3.10" cache-key-hash-files: - "pyproject.toml" diff --git a/changelog.d/20241202_090256_kurtmckee_unicode_filenames.rst b/changelog.d/20241202_090256_kurtmckee_unicode_filenames.rst new file mode 100644 index 0000000..e0b2884 --- /dev/null +++ b/changelog.d/20241202_090256_kurtmckee_unicode_filenames.rst @@ -0,0 +1,4 @@ +Python support +-------------- + +* Drop support for PyPy 3.9. diff --git a/tox.ini b/tox.ini index ef106f5..d6fd951 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = coverage-erase py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9} - pypy{3.10, 3.9} + pypy{3.10} coverage-report mypy docs @@ -14,7 +14,7 @@ package = wheel wheel_build_env = build_wheel depends = - py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9}, pypy{3.10, 3.9}: coverage-erase + py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9}, pypy{3.10}: coverage-erase deps = -rrequirements/test/requirements.txt commands = @@ -30,7 +30,7 @@ commands = [testenv:coverage-report{,-ci}] depends = py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9} - pypy{3.10, 3.9} + pypy{3.10} deps = coverage[toml] skip_install = true