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

Removal of _unicodefun from the recently 8.1.0 breaks dependees #2232

Closed
kilemensi opened this issue Mar 29, 2022 · 4 comments
Closed

Removal of _unicodefun from the recently 8.1.0 breaks dependees #2232

kilemensi opened this issue Mar 29, 2022 · 4 comments

Comments

@kilemensi
Copy link

kilemensi commented Mar 29, 2022

The recently released 8.1.0 seem to have removed _unicodefun. This causes dependees that expect _unicodefun to be there to break.

Any code that uses the current version of black will break. See log from our CI build below:

 Traceback (most recent call last):
  File "/root/.cache/pre-commit/repoxd97m0e9/py_env-python3/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/root/.cache/pre-commit/repoxd97m0e9/py_env-python3/lib/python3.10/site-packages/black/__init__.py", line 1423, in patched_main
    patch_click()
  File "/root/.cache/pre-commit/repoxd97m0e9/py_env-python3/lib/python3.10/site-packages/black/__init__.py", line 1409, in patch_click
    from click import _unicodefun
ImportError: cannot import name '_unicodefun' from 'click' (/root/.cache/pre-commit/repoxd97m0e9/py_env-python3/lib/python3.10/site-packages/click/__init__.py)

Also this issue on distributed is caused by the same bug.

Going from 8.0.4 to 8.1.0 being a minor release upgrade, I expect _unicodefun to be there.

Environment:

  • Python version: 3.10
  • Click version: 8.1.0
@kilemensi kilemensi changed the title Removal of _unicodefun from the recently 8.10 breaks dependees Removal of _unicodefun from the recently 8.1.0 breaks dependees Mar 29, 2022
@roskakori
Copy link

This also breaks spaCy (#10564).

@leiserfg
Copy link

Codespell is also affected.

lachmanfrantisek added a commit to lachmanfrantisek/packit-service that referenced this issue Mar 29, 2022
Upstream issue: pallets/click#2232

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
softwarefactory-project-zuul bot added a commit to packit/packit-service that referenced this issue Mar 29, 2022
Update black version in pre-commit to fix the CI failures

Upstream issue: pallets/click#2232
Signed-off-by: Frantisek Lachman flachman@redhat.com

RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: Tomas Tomecek <tomas@tomecek.net>
@graingert
Copy link

_unicodefun was removed here 0ccada0 due to #2198 see:

click/CHANGES.rst

Lines 24 to 26 in f467dd3

- Rely on :pep:`538` and :pep:`540` to handle selecting UTF-8 encoding
instead of ASCII. Click's locale encoding detection is removed.
:issue:`2198`

@davidism
Copy link
Member

Duplicate of #2225

@davidism davidism marked this as a duplicate of #2225 Mar 29, 2022
softwarefactory-project-zuul bot added a commit to packit/deployment that referenced this issue Apr 1, 2022
Update black version in pre-commit to fix the CI failures

Upstream issue: pallets/click#2232
Signed-off-by: Frantisek Lachman flachman@redhat.com

Reviewed-by: Maja Massarini <None>
lachmanfrantisek added a commit to lachmanfrantisek/specfile that referenced this issue Apr 4, 2022
Upstream issue: pallets/click#2232

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
lachmanfrantisek added a commit to lachmanfrantisek/requre that referenced this issue Apr 4, 2022
Upstream issue: pallets/click#2232

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
majamassarini added a commit to majamassarini/hardly that referenced this issue Apr 6, 2022
lachmanfrantisek added a commit to lachmanfrantisek/research that referenced this issue Apr 11, 2022
Upstream issue: pallets/click#2232

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants