-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Description
Some licenses, in this specific example, LGPL-2.1, contains Unicode characters. In case of LGPL 2.1 it is U+000c
- Form Feed character.
In pyproject.toml
having a license file with those characters silently breaks package dependencies installation.
Expected behavior
pip install -e .
installs package dependenciespip install -e .[dev]
installs optionaldev
dependencies group
pip version
23.2.1
Python version
3.10, 3.11
OS
Fedora Linux 38
How to Reproduce
- Create
pyproject.toml
[project]
name = "unicode-bug"
version = "0.1.0"
requires-python = ">=3.10"
license = {file = "LICENSE"}
dependencies = [
"requests"
]
[project.optional-dependencies]
dev = [
"pytest"
]
- Create
LICENSE
file with unicode character
$ echo -e '\U000b' > LICENSE
- Try to install the package and optional dependencies - doesn't install dependencies
$ pip install -e .
...
Successfully built unicode-bug
Installing collected packages: unicode-bug
Attempting uninstall: unicode-bug
Found existing installation: unicode-bug 0.1.0
Uninstalling unicode-bug-0.1.0:
Successfully uninstalled unicode-bug-0.1.0
Successfully installed unicode-bug-0.1.0
$ pip install -e .[dev]
...
WARNING: unicode-bug 0.1.0 does not provide the extra 'dev'
...
- Remove unicode character
$ echo "" > LICENSE
- Try to install the package and optional dependencies - installation works
$ pip install -e .
...
Successfully built unicode-bug
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests, unicode-bug
Attempting uninstall: unicode-bug
Found existing installation: unicode-bug 0.1.0
Uninstalling unicode-bug-0.1.0:
Successfully uninstalled unicode-bug-0.1.0
Successfully installed certifi-2023.7.22 charset-normalizer-3.2.0 idna-3.4 requests-2.31.0 unicode-bug-0.1.0 urllib3-2.0.4
$ pip install -e .[dev]
Successfully built unicode-bug
Installing collected packages: pluggy, packaging, iniconfig, unicode-bug, pytest
Attempting uninstall: unicode-bug
Found existing installation: unicode-bug 0.1.0
Uninstalling unicode-bug-0.1.0:
Successfully uninstalled unicode-bug-0.1.0
Successfully installed iniconfig-2.0.0 packaging-23.1 pluggy-1.3.0 pytest-7.4.0 unicode-bug-0.1.0
Output
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Metadata
Metadata
Assignees
Labels
No labels