skarim / vobject

A full-featured Python package for parsing and creating iCalendar and vCard files
https://vobject.sameenkarim.com
258 stars 93 forks source link

update for python 3.10 #184

Open allen-munsch opened 2 years ago

allen-munsch commented 2 years ago

vobject didn't quite work using 3.10.7

da4089 commented 9 months ago

@allen-munsch, when you found this problem, do you recall what kind of tzinfo you were using?

It looks like the code checks for tzinfo sub-classes from PyICU, pytz, and tzical. Perhaps it was datetime.timezone.utc?

allen-munsch commented 9 months ago

@da4089 i don't have access to the source code any longer, but it would have been something in the django defaults for 3.2 at the time, or, possibly pytz, perhaps something in the changelogs between 3.9/3.10.

I think it was in a custom localization function of some kind. The type it was though, i do not recall, whatever it was though definitely had a __str__/__repr__ method which returned the 'UTC' string.

I'd guess it might have been here, very likely, which aligns with your hypothesis: