Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test that Unicode filenames can be imported #29

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- "3.13"
cpython-beta: "3.14"
pypys:
- "3.9"
- "3.10"
cache-key-hash-files:
- "pyproject.toml"
Expand Down
4 changes: 4 additions & 0 deletions changelog.d/20241202_080501_kurtmckee_unicode_filenames.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Added
-----

* Test that Unicode filenames can be imported.
4 changes: 4 additions & 0 deletions changelog.d/20241202_090256_kurtmckee_unicode_filenames.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Python support
--------------

* Drop support for PyPy 3.9.
Original file line number Diff line number Diff line change
Expand Up @@ -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
package_resources_filesystem/shift_jis.py,sha256=s5AYdLUzNAUliEPKSpJzWaVSJ8MopnN1YtP_gBXOFqs,31
package_resources_filesystem/あ.py,sha256=hudcY6c59JQOUKDM1e7HT-ZDoMzaQ38C40TaJgBLcBA,29
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"archive_info": {"hash": "sha256=c5903564d2dbca50f343d541bf606a6b91e3a933c3c36bc5ec59473cac43ae50", "hashes": {"sha256": "c5903564d2dbca50f343d541bf606a6b91e3a933c3c36bc5ec59473cac43ae50"}}, "url": "file:///package_resources_filesystem-1.1.1-py3-none-any.whl"}
{"archive_info": {"hash": "sha256=29858c6073d50a06dcab1ce39df0f36c0df5eea57d9d3ef28eb6fcd3a6192278", "hashes": {"sha256": "29858c6073d50a06dcab1ce39df0f36c0df5eea57d9d3ef28eb6fcd3a6192278"}}, "url": "file:///package_resources_filesystem-1.1.1-py3-none-any.whl"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
success = "unicode-filename"
Original file line number Diff line number Diff line change
Expand Up @@ -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
package_resources_sqlite/shift_jis.py,sha256=s5AYdLUzNAUliEPKSpJzWaVSJ8MopnN1YtP_gBXOFqs,31
package_resources_sqlite/あ.py,sha256=hudcY6c59JQOUKDM1e7HT-ZDoMzaQ38C40TaJgBLcBA,29
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"archive_info": {"hash": "sha256=8adcb1c657ba451c03b120af114dc1a2eca436fbfcbdb5fb2f0a052356ce4c1e", "hashes": {"sha256": "8adcb1c657ba451c03b120af114dc1a2eca436fbfcbdb5fb2f0a052356ce4c1e"}}, "url": "file:///package_resources_sqlite-2.2.2-py3-none-any.whl"}
{"archive_info": {"hash": "sha256=eebf5eb000800954469f01c19ab705a38909685abfb3ec287a1b5e978505c612", "hashes": {"sha256": "eebf5eb000800954469f01c19ab705a38909685abfb3ec287a1b5e978505c612"}}, "url": "file:///package_resources_sqlite-2.2.2-py3-none-any.whl"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
success = "unicode-filename"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
success = "unicode-filename"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
success = "unicode-filename"
13 changes: 13 additions & 0 deletions tests/test_importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand All @@ -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
Expand Down