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

Replace cgi.escape by html.escape. #396

Merged
merged 1 commit into from
Sep 14, 2020
Merged

Replace cgi.escape by html.escape. #396

merged 1 commit into from
Sep 14, 2020

Conversation

gouttegd
Copy link
Contributor

@gouttegd gouttegd commented Jul 7, 2020

The escape function in the cgi module has been deprecated since
Python 3.2 [1] and has finally been removed in Python 3.8 [2],
resulting in the Figure_To_Pdf.py script failing to run under
Python 3.8.

This patch replaces the call to cgi.escape by html.escape, as
recommended by the Python developers.

[1] https://docs.python.org/3.7/library/cgi.html#cgi.escape
[2] https://docs.python.org/3.8/whatsnew/3.8.html#api-and-feature-removals

The escape function in the cgi module has been deprecated since
Python 3.2 [1] and has finally been removed in Python 3.8 [2],
resulting in the Figure_To_Pdf.py script failing to run under
Python 3.8.

This patch replaces the call to cgi.escape by html.escape, as
recommended by the Python developers.

[1] https://docs.python.org/3.7/library/cgi.html#cgi.escape
[2] https://docs.python.org/3.8/whatsnew/3.8.html#api-and-feature-removals
@will-moore
Copy link
Member

Thanks - looks good.
cc @knabar

NB: we haven't looked at supporting Python 3.8 yet (see https://docs.openmicroscopy.org/omero/5.6.1/sysadmins/version-requirements.html#python) but happy to receive any help in that direction.

@gouttegd
Copy link
Contributor Author

gouttegd commented Jul 8, 2020

For what it’s worth, I’ve been running OMERO under Python 3.8 for a little bit more than one month, and the problem with the Figure_To_Pdf.py script is the only issue I’ve run into so far.

@jburel jburel merged commit 632f387 into ome:master Sep 14, 2020
@gouttegd gouttegd deleted the fix-cgi-escape branch September 23, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants