-
Notifications
You must be signed in to change notification settings - Fork 9
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
PyXB is not longer under development and is preventing us from upgrading from Python 3.8 #40
Comments
Actually it seems that rdf has fixed this problem but the PyXB library has this same problem. It also seems that PyXB is not currenlty under development. The last commit was in 2017. Do you have any plans to address this?
|
The author of PyXB is looking for someone to take over maintenance. pabigot/pyxb#100 |
@mbjones @datadavev @csjx After building a local version of d1_python with the PyXB-X fork (of pyxb), I confirmed that the collections.abc issue has been resolved as described here. Since the main pyxb repo will not be continuing forward, these are a couple of options:
Are there other options to consider? |
I think migrating to PyxB-X makes sense, as it is simply a better-maintained version of the same library. We may at some point in the future have to jettison PyxB altogether, but it would be a large undertaking. The other alternative is to stick to versions of Python that the old PyxB still works on, as there isn't a very large practical difference in the capabilities of the python versions involved. But if we must use the latest python, PyxB-X seems like a reasonable path to me. Have all of the tests passed for both PyxB-X and our d1-python stack? |
I don't think PyXB has any automated testing. d1_python has all
tests passing on master.
https://travis-ci.org/github/DataONEorg/d1_python/builds/716449984.
A diff between PyXB and PyXB-X shows more changes than I expected.
Looks like someone is putting in more than just the minimal effort
required for keeping it alive. But, while old PyXB gets 40,000
downloads per month on PyPI (which seems like a healthy number to
me), PyXB-X gets only 100. Combine that with the lack of tests, and
that there's so little to gain by moving to latest Python, I think
I'd just stay on old PyXB. Or, if looking for another version of
PyXB, maybe it's better to use one that makes only the minimal
changes required for keeping it working.
https://pypistats.org/packages/pyxb
https://pypistats.org/packages/pyxb-x
Since it would be a good indicator, I thought I'd do a quick check
to see how many Python packages have PyXB as a dependency, but
that's apparently still not possible due to Python's subpar package
management infrastructure.
d1_python does a lot of the XML processing without PyXB, just with
XPath and ElementTree (a sort of lightweight DOM). PyXB handles
serialization, deserialization and validation only for the D1 XML
types. That's convenient, but the types aren't complex, and they're
limited in number (on the MN side anyway), so moving that part over
to ElementTree and separate validation may not be so bad.
On 4/13/21 5:38 PM, Matt Jones wrote:
I think migrating to PyxB-X makes sense, as it is simply a
better-maintained version of the same library. We may at some
point in the future have to jettison PyxB altogether, but it
would be a large undertaking. The other alternative is to stick
to versions of Python that the old PyxB still works on, as there
isn't a very large practical difference in the capabilities of
the python versions involved. But if we must the latest python,
PyxB-X seems like a reasonable path to me. Have all of the tests
passed for both PyxB-X and our d1-python stack?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#40 (comment)",
"url": "#40 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
Thanks @rogerdahl that is really helpful. But it does muddy the water as to our choice a little. Seems like we have the following options:
Are there other options, or pros/cons I missed? I think I still prefer option 2, but any of those could work. And we could change our mind if the situation shifts. I would love to get people's votes/input, especially @datadavev and other users of the python library like @vchendrix. Would ESS-DIVE want to support this maintenance work? |
I'll think? these are also valid options, correct me if I'm wrong:
I'll add that the con to both approaches (increased maintenance burden on us) is already on us as we've having repeated conversations about PyXB and have been for quite some time. |
After reading all of the comments, I think removing the PyXB dependency from d1_python all together seems to be better for the long term. Especially, if the only thing it is being used for is a few D1 xml data structures. Our only dependency on d1_python is to build SystemMetacata and ResourceMap XML. |
Thanks for the thoughts, @vchendrix. One note is that its not just a few XML data structures, the types library generates 61 of them under Java using jaxb, and 61 type classes under python using PyxB. That's a fair number of manually maintained classes (each needing a serializer/deserializer and validity checking in both directions). See the listings below. JaxB classes from d1_common
PyxB classes from d1_common
|
I'll add a point here and say that if we want to support running |
Circling back to see if this issue has any traction. |
Traction but no resources for it. Did you have any comments on the 61 classes that would need to be manually rewritten and maintained if we eliminated PyxB? We have a similar situation on the java side with JaxB. |
The 61 classes is overwhelming to me. We currently use all the classes related to Maybe the following option mentioned by @amoeba? I think this means that pyxb would be forked and added as a submodule to d1_python which would get packaged together and published in pypi? Option 5: Vendor pyxb in d1_python
|
Now that there is a real need to move to a more recent version of Python, I think the way to go would be to fork the last version of PyXB, and update it. When I looked at this a few years ago, only a few one-line changes were required in order to get PyXB working on the current version of Python, probably 3.9. I'd take a look through the many forks of PyXB to see which tweaks may be required: https://github.com/pabigot/pyxb/network/members |
The GeoScienceAustralia for of PyXB-X looks promising. https://github.com/GeoscienceAustralia/PyXB-X |
Is this fixed by #78? |
yes, @srstsavage -- it is. On my superficial look, it seems like it was not tagged as a release, so we need to update the docs and tag the release as 3.6.0, and publish to pypi. cc @iannesbitt @rogerdahl @datadavev |
@mbjones We're looking at reinvigorating the effort to dockerize GMN. Any chance of getting that 3.6.0 release in the near future? |
@mbjones I've tagged the 3.5.2 release on GH now. This release is already on PyPI. I think you're good to go on containerizing, @srstsavage. |
thanks @rogerdahl -- that's so appreciated. In terms of docker, I'm sure there would be others that would be interested in running this via docker, so @srstsavage please do consider contributing such changes. We should track dockerization work in issue #77 |
rdflib is pinned to v4.2.2 which has a DeprecationWarning
rdflib should be upgraded to v5.0.0
The text was updated successfully, but these errors were encountered: