Skip to content

Conversation

@MichaelCook
Copy link

As of Python 3.10 in collections:

  • MutableMapping is now abc.MutableMapping

  • Container is now abc.Container

Issue #56

@C0D3D3V
Copy link

C0D3D3V commented Nov 27, 2022

Looks fine to me :D But it looks like this package is dead, at least it has no maintainer, maybe @MichaelCook you could create a fork and ask Karoly Lorentey (karoly@lorentey.hu) if he could transfer the package to you. Or if he does not answer, you could create a "version 2" of it.

@ivhacks ivhacks mentioned this pull request Dec 2, 2023
def imghdr_what(file, h):
# imhdr.what was deprecated in PEP-0594
# See https://peps.python.org/pep-0594/#imghdr
return None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaves 2 tests failing:

FAILED test/friendly.py::FriendlyTestCase::testPicture22 - AssertionError: 'Other(0)::<60511 bytes of None data>' != 'Other(0)::<60511...
FAILED test/friendly.py::FriendlyTestCase::testPicture23_24 - AssertionError: 'Other(0)::<60511 bytes of None data>' != 'Other(0)::<60511...

The full messages:

________________________ FriendlyTestCase.testPicture22 ________________________
[…]
E       AssertionError: 'Other(0)::<60511 bytes of None data>' != 'Other(0)::<60511 bytes of jpeg data>'
E       - Other(0)::<60511 bytes of None data>
E       ?                           ^^^
E       + Other(0)::<60511 bytes of jpeg data>
E       ?                           ^^ +

test/friendly.py:292: AssertionError
______________________ FriendlyTestCase.testPicture23_24 _______________________
[…]
E           AssertionError: 'Other(0)::<60511 bytes of None data>' != 'Other(0)::<60511 bytes of jpeg data>'
E           - Other(0)::<60511 bytes of None data>
E           ?                           ^^^
E           + Other(0)::<60511 bytes of jpeg data>
E           ?                           ^^ +

test/friendly.py:318: AssertionError

One solution is to provide a fallback implementation of imghdr.what, as I did in macports/macports-ports 26385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants