Bug 1792985 - python-ipmi fails to build with Python 3.9: 'array.array' object has no attribute 'fromstring'/'tostring'
Summary: python-ipmi fails to build with Python 3.9: 'array.array' object has no attri...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ipmi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Luis Bazan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1841725 (view as bug list)
Depends On:
Blocks: PYTHON39 F33FTBFS F33FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2020-01-20 13:16 UTC by Miro Hrončok
Modified: 2020-06-16 23:06 UTC (History)
5 users (show)

Fixed In Version: python-ipmi-0.4.2-4.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-16 23:06:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-20 13:16:43 UTC
python-ipmi fails to build with Python 3.9.0a2.

ERROR: tests.test_utils.test_bytebuffer_push_string
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_utils.py", line 61, in test_bytebuffer_push_string
    buf.push_string(b'0123')
  File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 77, in push_string
    self.array.fromstring(value)
AttributeError: 'array.array' object has no attribute 'fromstring'
======================================================================
ERROR: tests.test_utils.test_bytebuffer_pop_string
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_utils.py", line 75, in test_bytebuffer_pop_string
    eq_(buf.pop_string(2), b'01')
  File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
    return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

See https://docs.python.org/3.9/whatsnew/3.9.html#removed

"array.array: tostring() and fromstring() methods have been removed. They were aliases to tobytes() and frombytes(), deprecated since Python 3.2."


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01161525-python-ipmi/

For all our attempts to build python-ipmi with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-ipmi/

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.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
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 Victor Stinner 2020-01-20 14:32:03 UTC
I proposed a fix upstream: https://github.com/kontron/python-ipmi/pull/73

It's more intrusive than what I expected. It's unclear to me if the project still supports Python 2.7 or not.

Comment 2 Ben Cotton 2020-02-11 16:33:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 3 Victor Stinner 2020-04-20 14:32:58 UTC
> I proposed a fix upstream: https://github.com/kontron/python-ipmi/pull/73

It has been merged upstream: https://github.com/kontron/python-ipmi/commit/aca3528d1f1b8ed88e54cbbf2fbfaa0621985224

Comment 4 Miro Hrončok 2020-05-25 13:02:14 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Comment 5 Miro Hrončok 2020-05-29 07:12:03 UTC
Python 3.9 update: The f33-python side tag is currently being merged.

New builds in f33-python are no longer possible, but python3 is not yet updated to Python 3.9 in rawhide. You can check when Python is Python 3.9 with:

    $ koji wait-repo f33-build --build python3.9-3.9.0~b1-3.fc3

And build the packages normally after that.

Comment 6 Tomáš Hrnčiar 2020-06-10 10:33:44 UTC
*** Bug 1841725 has been marked as a duplicate of this bug. ***

Comment 7 Charalampos Stratakis 2020-06-16 23:06:59 UTC
Applied the upstream patch and built in rawhide.


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