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

Fix python 3.13 compatibility #3728

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ap--
Copy link

@ap-- ap-- commented Feb 23, 2025

Issue and/or context:

Closes #3704
Replaces #3703
XRef conda-forge/tiledbsoma-feedstock#6

Changes:

Fixes the tiledbsome.io._util._FSPathWrapper implementation to be compatible with changes in Python 3.13 pathlib.

Notes for Reviewer:

Since 3.12 it's a lot easier to subclass pathlib.Path, which is why the version check in the _FSPathWrapper class is targeting 3.12 now. Your previous implementation worked on 3.12 but used the current working directory as path for all pathlib operations. (It's not used in the 'hack' within anndata, but just so you're aware).

I believe your hack will continue to work with Python 3.14, if anndata does not start to use more pathlib API features for the provided filename, or refactors the AnnDataFileManager.filename property.
In general, it would be a much better solution to contribute support upstream to anndata to allow reading directly from file-like objects. I'll see if I can find some time to do so.

Also let me know if more changes to the workflow configurations are needed. I just copied from #3703

Cheers,
Andreas 😃

Copy link

codecov bot commented Feb 23, 2025

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Project coverage is 86.30%. Comparing base (5f32537) to head (4ce7d10).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3728      +/-   ##
==========================================
- Coverage   86.34%   86.30%   -0.05%     
==========================================
  Files          55       55              
  Lines        6392     6336      -56     
==========================================
- Hits         5519     5468      -51     
+ Misses        873      868       -5     
Flag Coverage Δ
python 86.30% <53.84%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 86.30% <70.00%> (-0.05%) ⬇️
libtiledbsoma ∅ <ø> (∅)

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

Successfully merging this pull request may close these issues.

[python/ci] Try Python 3.13 in CI
1 participant