Re: F39 Change Proposal: Allow Removal of tzdata (System-Wide)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



JDK will behave similarly. We ave (small) advantage that we have also
in-jdk-bundled tzdata.  However fallback in case of removed system
tzdata is not automatic, and requires human touch. Long ago we have a
patch in jdk which looked to system tzdata - if they were present,
they were used.  If not, the bundled copy was used.  Also user could
set up on startup which to use. But it had not prooved itself, as it
was casue of weird missonfigurations.

If this proposal will come live, we may introduce this patch again, or
leave it as it is now - on human touch.

TY!

 J.

On Tue, 27 Jun 2023 at 11:00, Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:
>
> On 26. 06. 23 20:24, Fabio Valentini wrote:
> > On Mon, Jun 26, 2023 at 8:10 PM Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:
> >>
> >
> > (snip)
> >
> >> ---
> >>
> >> The current problem with Python without tzdata is:
> >>
> >> =======================================================================
> >>   >>> from zoneinfo import ZoneInfo
> >>   >>> ZoneInfo("Europe/Prague")
> >> Traceback (most recent call last):
> >>     ...
> >> zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Europe/Prague'
> >> =======================================================================
> >>
> >> Not that ZoneInfo("UTC") also fails:
> >>
> >> =======================================================================
> >>   >>> ZoneInfo("UTC")
> >> Traceback (most recent call last):
> >> ...
> >> zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key UTC'
> >> =======================================================================
> >>
> >> So we would need to patch Python to detect missing tzdata and report something
> >> like:
> >>
> >>    ZoneInfoNotInstalledError: 'No time zone information installed on the system,
> >> you can only use UTC'
> >>
> >> We would also need to ensure UTC work even without tzdata installed.
> >>
> >> I would be reluctant to carry this as a downstream-only patch. And the upstream
> >> window for changes like this has already closed for Python 3.12.
> >
> > Does this mean that tzdata needs to be present for doing datetime /
> > timezone calculations at runtime with the zoneinfo module?
>
> Yes. That's why it is Required and not Recommended.
>
> > Would this Change require that all Python programs that use this
> > module add "Requires: tzdata"? I don't think that would be a
> > reasonable change.
>
> Either that or adapt their code to fail in a reasonable way. Both sound quite
> unreasonable to me.
>
> > There's a similar issue with some Rust libraries (and probably other
> > language-specific timezone handling libraries), where they explicitly
> > assume that the timezone database is available, and will either fail
> > (bad case) or fall back to UTC (less bad case). Similar to the Python
> > case, I don't think adding "Requires: tzdata" to all packages like
> > these (either to the library in the case of dynamically linked /
> > scripting languages, or to all affected *applications* in the case of
> > statically linked languages) would be reasonable.
>
> Thanks for sharing a similar concern.
>
> --
> Miro Hrončok
> --
> Phone: +420777974800
> IRC: mhroncok
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux