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

Install breaks with typing-extensions >= 4.6.0 #10

Closed
makkus opened this issue May 31, 2023 · 12 comments
Closed

Install breaks with typing-extensions >= 4.6.0 #10

makkus opened this issue May 31, 2023 · 12 comments

Comments

@makkus
Copy link

makkus commented May 31, 2023

It looks like the typing-extensions package released version 4.6.x on May 23rd, and this breaks multiformats for me on any Python version older than 3.11.

Stacktrace is:

  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/multiformats/multibase/__init__.py", line 22, in <module>
    from bases import (base2, base16, base8, base10, base36, base58btc, base58flickr, base58ripple,
  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/bases/__init__.py", line 40, in <module>
    from . import encoding as encoding
  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/bases/encoding/__init__.py", line 293, in <module>
    base8 = FixcharBaseEncoding(alphabet.base8, pad_char="=", padding="include")
  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/bases/encoding/fixchar.py", line 106, in __init__
    validate(char_nbits, Union[int, Literal["auto"]])
  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/typing_validation/validation.py", line 635, in validate
    _validate_union(val, t)
  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/typing_validation/validation.py", line 515, in _validate_union
    validate(val, member_t)
  File "/home/markus/.local/share/micromamba/envs/kiara-mono/lib/python3.10/site-packages/typing_validation/validation.py", line 691, in validate
    raise unsupported_type_error
ValueError: Unsupported validation for type typing_extensions.Literal['auto'].

Pinning typing-extensions to 4.5.0 makes it work again...

@sg495
Copy link
Contributor

sg495 commented Jun 8, 2023

The core issue appears to be with the typing-validation dependency (cf. hashberg-io/typing-validation#1). We'll fix it shortly 😃.

LefterisJP added a commit to LefterisJP/ContentHashPy that referenced this issue Jun 15, 2023
Basically replaces py-multicodec and py-multihash with multiformats
and adds base58check for base58 encoding/decoding and pysha3 so that
keccak-256 decoding can work.

Also temporarily pins typing extensions to 4.5.0 due to
hashberg-io/multiformats#10

All tests now pass again
LefterisJP added a commit to LefterisJP/ContentHashPy that referenced this issue Jun 15, 2023
Basically replaces py-multicodec and py-multihash with multiformats
and adds base58check for base58 encoding/decoding and pysha3 so that
keccak-256 decoding can work.

Also temporarily pins typing extensions to 4.5.0 due to
hashberg-io/multiformats#10

All tests now pass again
LefterisJP added a commit to LefterisJP/ContentHashPy that referenced this issue Jun 15, 2023
Basically replaces py-multicodec and py-multihash with multiformats
and adds base58check for base58 encoding/decoding and pysha3 so that
keccak-256 decoding can work.

Also temporarily pins typing extensions to 4.5.0 due to
hashberg-io/multiformats#10

All tests now pass again
@MarshalX
Copy link

The core issue appears to be with the typing-validation dependency (cf. hashberg-io/typing-validation#1). We'll fix it shortly 😃.

any updates?

dbluhm added a commit to decentralized-identity/did-peer-4 that referenced this issue Aug 25, 2023
@Aviksaikat
Copy link

any update ?

@Aviksaikat
Copy link

Looks like we have to wait for a long time. I have created a fork here & published a pip package. feel free to open PRs 😄
https://github.com/aviksaikat/multiformats
https://pypi.org/project/multiformats-fix/

@makkus
Copy link
Author

makkus commented Nov 9, 2023

Ha, funny, I also created one two days ago ( https://github.com/makkus ):

Available also via conda (dharpa channel). I forked all 4 projects because otherwise you end up with two 'typing-validation' packages ('bases' also pulls it in).

@sg495
Copy link
Contributor

sg495 commented Dec 18, 2023

This has now been fixed upstream, with my apologies for the long delay 🙏. A new version of typing_validation will be released shortly, after which I will proceed to close the remaining issues on this package and make a new release.

This package is now again in active development, so I welcome any PRs to include changes/fixed/improvements you may have made in your forks.

@sg495
Copy link
Contributor

sg495 commented Dec 18, 2023

Update: typing_extensions==1.1.0 has now been released on PyPI. Will now run tests for bases and multiformats.
Update: bases==0.3.0 has now been released on PyPI. Will now run tests for multiformats.

@snarfed
Copy link

snarfed commented Dec 18, 2023

Woo, these new releases are working great for me. Thank you @sg495! Hope you're doing ok. Welcome back!

@sg495
Copy link
Contributor

sg495 commented Dec 18, 2023

Update: multiformats-config==0.3.0 has now been released on PyPI. Will now run tests for core multiformats package.

@sg495 sg495 closed this as completed in 9806e2c Dec 18, 2023
sg495 added a commit that referenced this issue Dec 18, 2023
@sg495
Copy link
Contributor

sg495 commented Dec 18, 2023

Thank you for your patience, everybody: multiformats==0.3.1 has now been released, closing all issues 🎉.

@sg495
Copy link
Contributor

sg495 commented Dec 18, 2023

For those who were impacted on the DAG-CBOR side of things, dag-cbor==0.3.3 has now been released, closing a small validation issue and setting the minimum multiformats version to 0.3.1. This issue is now fully solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants