Closed amotl closed 1 year ago
The reason why this croaks is because the sqlalchemy.compat.core14
adapter gets selected, while running on SA20. The reason for that again is, because distutils' LooseVersion
does not cope well and trips the version dispatcher.
>>> from distutils.version import LooseVersion as LV
>>> from distutils.version import StrictVersion as SV
>>> SV("2.0.0") >= SV("2.0.0b1")
True
>>> LV("2.0.0") >= LV("2.0.0b1")
False
Turtles all the way down, we had to use LooseVersion
over StrictVersion
with 9f1814318, in order to be able to parse 2.0.0rc1
, because StrictVersion
would croak on that.
>>> SV("2.0.0rc1")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/version.py", line 40, in __init__
self.parse(vstring)
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/version.py", line 137, in parse
raise ValueError("invalid version number '%s'" % vstring)
ValueError: invalid version number '2.0.0rc1'
Removing that commit will probably make things work again.
Removing that commit (9f181431) will probably make things work again.
It does, see crate/crate-python#488.
Observations
CI tripped over the SQLAlchemy 2.0 GA release last night [1]. The same thing can be observed at the recent PR build of crate/crate-python#488 [2].
[1] Latest nightly: https://github.com/crate/crate-python/actions/runs/4020995995 [2] PR: https://github.com/crate/crate-python/actions/runs/4023530229/jobs/6914508982#step:4:341
Analysis
Works
Croaks