Conversation
6ce599a to
46378b5
Compare
46378b5 to
79fa1e4
Compare
8c8f2c5 to
d37aae3
Compare
d37aae3 to
c71fcf2
Compare
|
|
||
| SparseNDCoord = Union[ | ||
| None, | ||
| Tuple[int, ...], |
There was a problem hiding this comment.
If this is necessary that’s fine, I guess, but this should already be covered under ValSliceOrSequence[int], since that includes a Sequence[int], which is a supertype of Tuple[int, ...].
| @property | ||
| def __orig_bases__(self) -> Any: | ||
| # Only exists in Python 3.12 and above | ||
| from types import get_original_bases | ||
|
|
||
| return get_original_bases(int) | ||
| # return get_original_bases(_T_co) |
There was a problem hiding this comment.
This is a typeguard bug—it’s checking too many built-in attributes of the protocol that don’t actually matter. (See, for example, a case where it rejects objects with a completely empty protocol that I found.
That said, if implementing this makes typeguard stop complaining for now, I would do two things:
- Add a comment to that effect, and that it should be removed at some point
- Make this function instead raise
AssertionError, since it should never be called.
513963b to
98c2c41
Compare
|
I believe this PR is no longer necessary; tests+lint have passed on 3.12 in this repo since #186, and single-cell-data/TileDB-SOMA#3001 has 3.12 passing without requiring any somacore changes. |
|
Awesome, thanks @ryan-williams ! |
TL;DR we are trying to support Python 3.12 in TileDB-SOMA
Solved challenge:
As tracked from parent issue single-cell-data/TileDB-SOMA#1849
mainbranch TileDB-SOMA#2734Current unsolved challenges:
typeguardversion is 4.2.0evaluate_forward_refwithin Python's built-intypingmodule which broke many packages includingtypeguardTypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'typeguard4.3.0 contains a fix for this problemThe current PR is an attempt to deal with this.
Once this works, we'll need to:
somacore)somacorewithin the TileDB-SOMA repoI've currently got the following setup on an EC2 instance:
somacorelocally withpip install -ewith this PR checked outtiledbsomalocally withpip install -ewith [python] Python 3.12 support TileDB-SOMA#3001 checked out