Bug 2280811 - python-ipyparallel fails to build with Python 3.13: DeprecationWarning treated as error: Parsing dates involving a day of month without a year specified is ambiguious and fails to parse leap day
Summary: python-ipyparallel fails to build with Python 3.13: DeprecationWarning treate...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ipyparallel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-05-16 11:45 UTC by Karolina Surma
Modified: 2024-06-10 13:58 UTC (History)
3 users (show)

Fixed In Version: python-ipyparallel-8.8.0-2.fc41
Clone Of:
Environment:
Last Closed: 2024-06-09 05:29:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github jupyter jupyter_client issues 1020 0 None open DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious 2024-05-16 12:10:25 UTC

Description Karolina Surma 2024-05-16 11:45:19 UTC
python-ipyparallel fails to build with Python 3.13.0b1.

+ /usr/bin/pytest -v --color=no -W 'ignore:datetime.datetime.utcnow() is deprecated:DeprecationWarning'
ImportError while loading conftest '/builddir/build/BUILD/ipyparallel-8.8.0/ipyparallel/tests/conftest.py'.
ipyparallel/__init__.py:15: in <module>
    from .client.asyncresult import *  # noqa
ipyparallel/client/asyncresult.py:23: in <module>
    from ipyparallel.util import _parse_date, compare_datetimes, progress, utcnow
ipyparallel/util.py:27: in <module>
    from jupyter_client import session
/usr/lib/python3.13/site-packages/jupyter_client/__init__.py:3: in <module>
    from .asynchronous import AsyncKernelClient
/usr/lib/python3.13/site-packages/jupyter_client/asynchronous/__init__.py:1: in <module>
    from .client import AsyncKernelClient  # noqa
/usr/lib/python3.13/site-packages/jupyter_client/asynchronous/client.py:11: in <module>
    from ..channels import AsyncZMQSocketChannel, HBChannel
/usr/lib/python3.13/site-packages/jupyter_client/channels.py:16: in <module>
    from .session import Session
/usr/lib/python3.13/site-packages/jupyter_client/session.py:53: in <module>
    from .jsonutil import extract_dates, json_clean, json_default, squash_dates
/usr/lib/python3.13/site-packages/jupyter_client/jsonutil.py:31: in <module>
    datetime.strptime("1", "%d")  # noqa
/usr/lib64/python3.13/_strptime.py:573: in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
/usr/lib64/python3.13/_strptime.py:336: in _strptime
    format_regex = _TimeRE_cache.compile(format)
/usr/lib64/python3.13/_strptime.py:282: in compile
    return re_compile(self.pattern(format), IGNORECASE)
/usr/lib64/python3.13/_strptime.py:270: in pattern
    warnings.warn("""\
E   DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
E   and fails to parse leap day. The default behavior will change in Python 3.15
E   to either always raise an exception or to use a different default year (TBD).
E   To avoid trouble, add a specific year to the input & format.
E   See https://github.com/python/cpython/issues/70647.

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07449588-python-ipyparallel/

For all our attempts to build python-ipyparallel with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-ipyparallel/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2024-05-16 12:08:23 UTC
This comes from jupyter-client:

/usr/lib/python3.13/site-packages/jupyter_client/jsonutil.py:31: in <module>
    datetime.strptime("1", "%d")  # noqa

Comment 2 Miro Hrončok 2024-05-16 12:10:26 UTC
  # holy crap, strptime is not threadsafe.
  # Calling it once at import seems to help.
  datetime.strptime("1", "%d")  # noqa

https://github.com/jupyter/jupyter_client/blob/v8.6.1/jupyter_client/jsonutil.py


This seems easily fixable. Already reported as https://github.com/jupyter/jupyter_client/issues/1020

Comment 3 Mattias Ellert 2024-06-09 05:29:24 UTC
The build in f41-pythin side tag failed due to dependencies not built for Python 3.13:

- python3-ipython
- python3-ipykernel
- python3-jupyter-client

But the copr build worked.
And there is a build for rawhide.

Comment 4 Miro Hrončok 2024-06-10 13:58:08 UTC
Another build in f41-pythin side tag suceeded.

I also opened https://src.fedoraproject.org/rpms/python-jupyter-client/pull-request/28 and https://github.com/jupyter/jupyter_client/pull/1027


Note You need to log in before you can comment on or make changes to this bug.