13 ms·
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
by noirscape 3y ago
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 https://docs.python.org/3/library/zoneinfo.html
- jwilk 3y ago> New in version 3.9.
- lexicality 3y agoAvailable to all in a backport: https://pypi.org/project/backports.zoneinfo/ https://pypi.org/project/backports.zoneinfo/
- 8organicbits 3y agoBut 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/ https://www.python.org/downloads/ and https://pypi.org/project/backports.zoneinfo/ https://pypi.org/project/backports.zoneinfo/
- mark-r 3y agoI 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.
- maleldil 3y agoWindows 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?
- mark-r 3y agoSure, 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.
- maleldil 3y agoThese might be interesting to you: https://github.com/indygreg/python-build-standalone/releases https://github.com/indygreg/python-build-standalone/releases
- hddqsb 3y agoThere 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-9-or-3-10-without-a-fork/13842 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 https://github.com/adang1345/PythonWin7 (it uses an unofficial implementation of api-ms-win-core-path-l1-1-0.dll).
- mark-r 3y agoThanks for that insight. The part about not being able to do testing doesn't surprise me, it's to be expected.