-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add python 3.13, Remove python 3.8 #345
base: main
Are you sure you want to change the base?
Conversation
Done. Can this get merged? Would be nice to support python 3.13 and not need to keep rebasing/deconflicting this and the upstream PR |
@sneakers-the-rat I've approved this PR but I don't have the rights to merge it. |
@amc-corey-cox ran into this recently when trying to run schema automator under Python 3.13 @sneakers-the-rat I almost made an issue pretty similar to linkml/linkml#2370, but noticed you'd already done the lifting!- Thanks |
@sneakers-the-rat @ptgolden - can you please fix the failing tests and then carry this through the finish line? |
The test failures are because upstream linkml still advertises support for python 3.8. It seems that those failures will continue until linkml/linkml#2358 is merged. |
Unfortunately, I don't think we want to merge the upstream one until it has passing tests or at least a comment on why they can't/won't be passable. But I trust @sneakers-the-rat is already on fixing those and we'll have this out in no time. Alternatively, if you have some cycles @ptgolden, and you want to fix the forked PR upstream, that would be wonderful. |
This should be the first PR that should be merged out of the two. When a new version is tagged here for a release that supports 3.13, that new version can be pinned in the I think the fix here is to change the linkml-runtime/.github/workflows/test-upstream.yaml Lines 73 to 85 in c0d73b1
To run something like:
This would mean that there would be a Poetry lockfile that doesn't represent the state of the virtual environment, but it would allow installing the local version of I'd push a commit here but I'll wait to hear thoughts from @sneakers-the-rat |
To be clear, the dilemma here was caused by two things (both totally understandable on their own):
Because upstream Upstream (that cycles back and forth forever) In retrospect, the order could have been:
The solution I proposed above is just a kludge to break out of the cyclical trap these two PRs are in, while still being able to run the |
from dev call:
|
I mean it's really not a big deal we just need to merge at the same time, but sure if yall want to redo this be my guest I guess |
This is how it used to work, but the current version also testing compatibility of dependencies is a feature not a bug. It could be two steps, checking for dep compatibility and running tests, but it's like that for a reason |
@sierra-moxon Maybe important: who is expected to merge? I could do it from the permissions but don't really know where to use the power without making you upset. See also https://github.com/orgs/linkml/discussions/2518 |
this is not really possible, since the major thing these PRs do is update the code to remove 3.8 features ( |
You could remove 3.8 first and then add 3.13 (so the opposite order). Maybe next time for 3.9 / 3.14 😉 |
Hey @sneakers-the-rat, I understand your frustration and I wasn't trying to create more work for you. I really appreciate all the work you've done here and the paired PR. I stumbled upon the problem because I came across the monkeypatch of It looks like you've pushed a commit to fake 3.8 compat, which I think is the best thing to do to save a bunch of time splitting this up into multiple chunks while satiating the automated checks. (To be clear, I would have been happy to have taken up that cherry picking/rebasing, but I didn't want to do so without checking with you). This was an exceptional situation where both libraries were raising the floor and bumping the ceiling of Python at the same time, but I imagine this situation has/does/will pop up when doing the same process with dependencies. If I'm not mistaken, it's what you're talking about here: #361 (comment) This seems to be an issue that's inherent to updating dependencies for tightly-coupled-but-separate libraries in different repos while also being strict about automated testing between them. The choices seem to be either the 3/4 step dance we've been discussing, or synced PRs and overlooking tests that are expected to fail because of incompatibilities. The former sounds nice and will result in nice green checks, but, depending on what's being updated, could result in a lot of unnecessary nasty work of the sort that we remember from the python 2->3 upgrade. |
Hang on I think I can fix this by allowing one to specify an upstream branch to test against, one sec |
【"here we go"】 |
@sneakers-the-rat I took a crack at fixing the merge conflicts and I think they were straightforward enough I got them right. Would you prefer to manage the conflicts yourself or should I push these up? Also, do you think we should just fix these and merge or does it need a new PR to re-run against the correct upstream branch? Let me know how you want to proceed. I'm motivated to get these related PRs finished up. |
… bunch of actually used imports
…cation warning we actually have no way of keeping track of that.
…r those sweet sweet green checks
…lConfig, ignore unused imports in tests, update ruff config format, still removing dict calls, fix old percent string interpolation
0846eb0
to
2892e08
Compare
rebased again. same problem with the updated shexc version not being published yet, and some bugs with arrays that i'll fix in a bit |
generated python dataclass models use isodate. previously isodate was used as an implicit dependency via rdflib. did not check to see if there are any other implicit dependencies but that would be worth it to check. we also need to do regular updates of the lockfile here like in main repo (or not use the lockfile in tests, which would be my preference) because this should actually mean that anyone who installs added isodate as a dependency |
@sneakers-the-rat This still has test failures. Were you expecting that? Do we have a strategy for getting these tests to pass? If you mentioned where this is at earlier I apologize if I didn't understand. Thanks for getting back to this. please let me know what I can do to help get this finished up! |
basically it just keeps taking more work the longer it takes to merge. idk i put in >24h on this, it has been mergeable at several points through its history, i've got relatively little time left for it. |
upstream_repo: sneakers-the-rat/linkml
upstream_branch: python-3.13
Sibling of: linkml/linkml#2358
Fix: linkml/linkml#2370
Fix: linkml/linkml#2378
does what it says on the tin.
Currently linkml/linkml#2358 is failing because there's a
from typing import re
statement in here, so i also removed that.I added the upgrade ruff rules and one to check for unused imports just to automate the update, and i figure why the heck not leave them in here i would actually really like to at least isort stuff in here if not give it the same linting rules as upstream.
Other stuff
kwargs
in dataclasses - if we want to keep this in then someone else re-implement it, but the basis for doing that was removed in python 3.13 and it seems like the thing it was supposed to do (report line numbers from instantiation errors) is better done at yaml loading time rather than object instantiation time to me, since the only time it would work anyway is after yaml has been loaded with the loader that would be able to report the error in the first place.whitelist_externals
rather thanallowlist_externals
) so i fixed them to just work with normal standards-compliant installation rather than wrestle with accursed poetry, but i can take that out if it's not wanted.__all__
tolinkml_runtime.linkml_model
because importing'*'
from it makes linters complain.dict -> model_dump
andparse_obj -> model_validate
, which i swear i have done like 20 times but it keeps showing up somehow lol__test__ = False
flag toTestEnvironment
so pytest doesn't try to treat it like a test.