Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
==========================================
+ Coverage 96.38% 97.43% +1.05%
==========================================
Files 2 3 +1
Lines 83 117 +34
==========================================
+ Hits 80 114 +34
Misses 3 3
🚀 New features to boost your workflow:
|
2691253 to
870748a
Compare
see discussion in scverse/mudata#131
870748a to
c1323f8
Compare
Zethson
left a comment
There was a problem hiding this comment.
Could also get inspired by https://github.com/laminlabs/lamin-utils/blob/d91d959dad4c3cd8717035ce64543dfcc840d3f4/lamin_utils/_compat.py
What you're building is great though.
| { name = "Ilia Kats" }, | ||
| ] | ||
| requires-python = ">=3.11" | ||
| requires-python = ">=3.10" |
There was a problem hiding this comment.
No need for that. We're following spec-0 so we're more or less already at Python 3.12+
There was a problem hiding this comment.
but mudata 0.3.x is still on 3.10+. I'll bump it for 0.4, but for now I'd prefer to keep it.
There was a problem hiding this comment.
I think MuData received so many changes, it's fine to just release 0.4.0 next. The current MuData main branch can already be 3.12+.
But this is not a big problem (unless you have to adapt it again - see Phil's Generics suggestion) so whatever you think makes sense.
Thanks!
There was a problem hiding this comment.
Everything so far has been backwards compatible, so my plan currently is to release 0.3.4 after the deprecation PR has been merged, this will be the last 0.3.x release.
flying-sheep
left a comment
There was a problem hiding this comment.
Apparently it's not really possible to add arguments to the
__init__ofstrsubclasses, so I'm using a dataclass instead.
if it’s not a str subclass, it won’t typecheck. __new__ works!
class Test(str):
def __new__(cls, version, msg):
obj = str.__new__(cls, f"{msg} (since {v})")
obj.version = Version(version)
return obj
Is it typechecked at all? I don't see |
|
Everything in the stdlib is typechecked! I guess you have the wrong file. |
|
Ah, found it. However, if I'm reading this right, your version also won't typecheck, since it wants a |
|
@flying-sheep Exactly, it's complaining about |
|
no problem, just do Also no |
Thanks, done.
As mentioned above, mudata 0.3.x is still Python 3.10+ and I'd like to avoid bumping the mudata requirements in the 0.3 series. I'll bump it for 0.4 and then also make a new scverse-misc version that is 3.12+. |
bec2a6a to
794ef34
Compare
flying-sheep
left a comment
There was a problem hiding this comment.
Please make the minimum version test job also run on 3.10 when you extend the support window, and simplify a bit using inspect otherwise this looks good!
- run tests on Python 3.10 - simplify warning message generation - LiteralString type hints
As per the discussion in scverse/mudata#131.
Apparently it's not really possible to add arguments to the
__init__ofstrsubclasses, so I'm using a dataclass instead.