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

[python3] let PdfFileReader handle file opening #5878

Merged
merged 1 commit into from
Jul 27, 2018
Merged

[python3] let PdfFileReader handle file opening #5878

merged 1 commit into from
Jul 27, 2018

Conversation

sagarvora
Copy link
Collaborator

In Python 3, file() is deprecated.
PdfFileReader can internally handle file opening and closing, so file() is no longer necessary.

See description of stream parameter here:
https://pythonhosted.org/PyPDF2/PdfFileReader.html#PyPDF2.PdfFileReader

Alternatively, open() can be used.

In Python 3, file() is deprecated. 
PdfFileReader can internally handle file opening and closing, so file() no longer necessary.

See description of stream parameter here:
https://pythonhosted.org/PyPDF2/PdfFileReader.html#PyPDF2.PdfFileReader

Alternatively, open() can be used.
@rmehta
Copy link
Member

rmehta commented Jul 27, 2018

Does it work in Python2 too?

@sagarvora
Copy link
Collaborator Author

Yes, proof:

test

@rmehta rmehta merged commit 5ddcf40 into frappe:hotfix Jul 27, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants