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

tostring method of array has been deprecated since python 3.2 and removed in python 3.9 #641

Closed
fgregg opened this issue Jul 14, 2021 · 0 comments · Fixed by #700
Closed

Comments

@fgregg
Copy link

fgregg commented Jul 14, 2021

Bug report

The ccit.py module has call to the method tostring of Python's array.array. This method has been deprecated since Python 3.2 and was removed altogether in Python 3.9.

This means that if the this module is used, the library will fail due to AttributeError if using Python 3.9 or higher.

The method call should be replaced with a call to tobytes

The ccit module is the only place where this method is called.

fgregg added a commit to datamade/pdfminer.six that referenced this issue Jul 14, 2021
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
@pietermarsman pietermarsman added this to new in pdfminer.six via automation Sep 27, 2021
@pietermarsman pietermarsman moved this from new to in progress in pdfminer.six Sep 27, 2021
pdfminer.six automation moved this from in progress to done Jan 23, 2022
pietermarsman added a commit that referenced this issue Jan 23, 2022
* array.array.tostring -> array.array.tobytes

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 #641

* changelog entry

* test for tobytes

* Fix CHANGELOG.md

* Update CHANGELOG.md to PR that I can push on

* Simplify tests

Co-authored-by: Forest Gregg <fgregg@uchicago.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
pdfminer.six
  
done
1 participant