Remove Python 3.9 __subclasscheck__
workaround
#240
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code dates to Feb '23, doesn't seem to be necessary for tests/CI (including Typeguard and mypy) to pass, and seems to be causing issues in TileDB-SOMA CI (e.g. single-cell-data/TileDB-SOMA#3246).
Here's a sweep of:
test_dataframe_index_columns.py::test_types_no_errors[soma_joinid-py-slice-index_column_names4-domain4-coords4-expecteds4]
(started failing on Python 3.9, ca. typeguard#496 / 4.4.0)Notes:
__orig_bases__
.main
, everything passes on this branch.I've been unable to find a situation where the
__subclasscheck__
block here is necessary; my best guess (and from discussing with @jp-dark) is that it was relevant to older Typeguard versions (TileDB-SOMA would have been on 2.x when this code was added, in Feb '23). I've locally tested Python versions 3.9.{4,7,10,11,13,19}, they all seem to have the same behavior (failure with Typeguard 4.4.0 and this code present, OK without this code, OK on 4.2.1 with and without this code).Here's TileDB-SOMA CI passing when pointed at this branch (single-cell-data/TileDB-SOMA#3250).