Closed Alessandro-Barbieri closed 2 years ago
Is this still an issue with the latest version of sqlalchemy-utils?
Same error with latest version
Thanks for the quick response! I'm not familiar with Gentoo's overlay guru CI system but let's try to figure this out!
~The first thing I notice is that sqlalchemy_utils isn't mentioned anywhere in the traceback.~ Whoops, that's not true. Found it. The second thing I notice is that the CI system is using the system-installed dateutil package.
Would you check the dateutil version that's installed at:
/usr/lib/python3.8/site-packages/dateutil/
There should be a ._version.py
file at that location that contains the version dateutil version number, if I'm reading the dateutil source code correctly.
Please also confirm that there IS actually a getzoneinfofile_stream()
function defined in /usr/lib/python3.8/site-packages/dateutil/zoneinfo/__init__.py
. I checked dateutil versions dating back to 2014 and that function has always existed, so I'd like confirmation that dateutil is installed correctly.
Thanks for checking on this!
I see that gentoo's dateutil apply a patch that removes that function https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch
That's the root cause. Whoever created that patch ripped out long-standing functionality in dateutil without replacing it.
It looks like sqlalchemy_utils could be modified to rely on dateutil.zoneinfo.get_zonefile_instance()
, but I recommend simultaneously working within the Gentoo ecosystem to fix that patch that's ripping out functionality instead of augmenting it for Gentoo systems.
I'll take a stab at a patch for sqlalchemy_utils later.
@mgorny since you made that patch
Restoring the function alone won't help unless we also install the redundant timezone copy which I'm strongly against. I mean, I can restore it but it would fail anyway, so you'd have to handle the failure gracefully.
Thank you both for your time and support! I've created a potential patch for this in PR #585. Would either of you be able to test this in an environment that has a patched dateutil?
Gentoo overlay guru CI fail tests with:
See https://bugs.gentoo.org/819021