Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This article is correct, although slightly outdated - Python has been shipping its own timezone library called zoneinfo to solve this specific issue[0]. On the various *nix systems it just uses your systems timezone data, but it will fall back on the tzdata pypi package it that's not available (for example on Windows you need it if I'm not mistaken.)

[0]: https://docs.python.org/3/library/zoneinfo.html



> New in version 3.9.


But 3.9 is no longer new. If you're still on 3.8 you're running out of time to upgrade as official support is ending next year.

The project has also been backported to 3.6+, so you can still use it if you're stuck on a legacy/unsupported version.

See https://www.python.org/downloads/ and https://pypi.org/project/backports.zoneinfo/


I have no choice, because 3.9 isn't supported on Windows 7. I've always wondered what feature of Windows was so important that they had to drop compatibility with older versions, it's intentionally a very stable interface.


There is a discussion with some insight into the technical reasons why they don't support Windows 7: https://discuss.python.org/t/windows-7-support-for-python-3-... (summary: api-ms-win-core-path-l1-1-0.dll is not available on Windows 7, so they'd have to switch from static import to feature detection + dynamic import in several places; and the Python team don't have access to Windows 7 so they can't do testing).

An unofficial Python installer for Windows 7 exists: https://github.com/adang1345/PythonWin7 (it uses an unofficial implementation of api-ms-win-core-path-l1-1-0.dll).


Thanks for that insight. The part about not being able to do testing doesn't surprise me, it's to be expected.


Windows 7 support ended on 14 Jan 2020. It makes sense not to officially support it.

Have you tried building 3.9 from source to see if there's a particular API that's unsupported?


Sure, I wouldn't expect to get any help from the Python folks if I had some trouble. I was hoping for more of a don't care philosophy. But the installer goes out of its way to disallow installing it.

No, I haven't tried to build from source. That's a rabbit hole I'm not particularly interested in jumping down.



Available to all in a backport: https://pypi.org/project/backports.zoneinfo/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: