Bug 1718356 - python-pydicom fails to build with Python 3.8
Summary: python-pydicom fails to build with Python 3.8
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pydicom
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
Reported: 2019-06-07 14:31 UTC by Petr Viktorin
Modified: 2019-08-22 08:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-22 08:24:44 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github pydicom pydicom issues 937 None None None 2019-08-21 22:17:22 UTC

Internal Links: 1742008

Description Petr Viktorin 2019-06-07 14:31:18 UTC
python-pydicom fails to build with Python 3.8.0b1.

It looks like the class pydicom.valuerep.IS is derived from `int`. Subclassing built-in types (or any types not explicitly designed to be subclasses) is fragile, as it implicitly makes the subclass dependent on the exact internal behavior of the superclass.
Here, the IS class redefines its __repr__ to call int.__str__, which now calls __repr__ (not int.__repr__), resulting in infinite recursion.

For the build logs, see:

For all our attempts to build python-pydicom with Python 3.8, see:

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.8:

Let us know here if you have any questions.

Comment 1 Miro Hrončok 2019-07-10 15:08:17 UTC

Comment 2 Ankur Sinha (FranciscoD) 2019-07-10 20:49:45 UTC
Looks like they're preparing a new release, could be worth waiting for it?


Comment 3 Ankur Sinha (FranciscoD) 2019-07-10 20:55:01 UTC
I could file an issue upstream too, Miro. How would I replicate the python3.8 build to get more info?

Comment 4 Miro Hrončok 2019-07-10 22:31:29 UTC
Either in mock with RPM packages: http://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Or something like this:

$ git clone https://github.com/pydicom/pydicom
$ cd pydicom/
$ python3.8 -m venv __venv__
$ . __venv__/bin/activate
$ python -m pip install -e .
$ python -m pip install numpy pytest
$ python -m pytest -r sx --pyargs pydicom

Comment 5 Ben Cotton 2019-08-13 16:49:14 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 6 Miro Hrončok 2019-08-14 22:24:31 UTC
The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag.

If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead:

    on branch master:
    $ fedpkg build --target=f32-python

To wait for a build to show up in the side tag, do:

    $ koji wait-repo f32-python --build=<nvr>

Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32.

An updated mock config is posted at:

Note that it will take a while before the essential packages are rebuilt, so don't expect all your dependencies to be available right away.

Thanks. Let us know if you need up to date info, or if you have any questions.

PS this message is mass posted to all the bugs that block the PYTHON38 bug. If this is also a Fedora 31 FTBFS bug and you manage to fix it, you can do a f31 build as usual:

    on branch f31:
    $ fedpkg build

Comment 7 Miro Hrončok 2019-08-21 16:35:17 UTC
The f32-python side tag has been merged. In order to rebuild the package, do it in regular rawhide, but please wait until python3-3.8 is tagged:

  $ koji wait-repo f32-build --build python3-3.8.0~b3-3.fc32

If your built already started in f32-python, after it is finished, please tag it to rawhide with:

  $ koji tag-build f32-pending <nvr>

For example:

  $ koji tag-build f32-pending libreoffice-


(This comment is mass posted to all bugzillas blocking the PYTHON38 tracking bug.)

Comment 8 Miro Hrončok 2019-08-21 17:29:19 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 9 Ankur Sinha (FranciscoD) 2019-08-21 22:17:22 UTC
They've recently begun supporting 3.7, not sure when they'll move to 3.8. We're just too quick :)

Reported upstream: https://github.com/pydicom/pydicom/issues/937

Comment 10 Ankur Sinha (FranciscoD) 2019-08-22 08:24:44 UTC
Cherry-picked the suggested patch. Builds fine:


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