Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array.array.tostring -> array.array.tobytes #642

Closed
wants to merge 4 commits into from

Conversation

fgregg
Copy link

@fgregg fgregg commented Jul 14, 2021

Thanks for this great project!

The tostring method has been deprecated since Python 3.2 and was
removed altogether in 3.9. In Python 3.2 the method was renamed
to "tobytes"

Without this fix, using the ccit module will lead to an AttributeError and a crash on Python 3.9+.

Will close #641

How Has This Been Tested?

Ran locally with python 3.9

Checklist

  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added docstrings to newly created methods and classes not relevant
  • I have optimized the code at least one time after creating the initial
    version
  • I have updated the README.md or I am verified that this
    is not necessary
  • I have updated the readthedocs documentation or I
    verified that this is not necessary
  • I have added a consice human-readable description of the change to
    CHANGELOG.md

The tostring method has been deprecated since Python 3.2 and was
removed altogether in 3.9. In Python 3.2 the method was renamed
to "tobytes"

Will close pdfminer#641
Copy link
Member

@pietermarsman pietermarsman left a comment

Choose a reason for hiding this comment

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

Some small changes are nice before wrapping this up.

I can't commit on your branch so you have to do them yourself.

tests/test_pdfminer_ccitt.py Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@pietermarsman
Copy link
Member

Closing in favor of #700

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.

tostring method of array has been deprecated since python 3.2 and removed in python 3.9
2 participants