-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix cgi escape error python 3.8+ #37
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #37 +/- ##
=======================================
Coverage 51.60% 51.60%
=======================================
Files 6 6
Lines 500 500
=======================================
Hits 258 258
Misses 242 242
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is Karma :D
Thank you for the fix but I think it's not OK to drop support for Python 2 for such a minor thing. I know Python 2 is dead and I like it that way but I think the compatibility can be achieved by trying to import escape
from cgi
and if it fails then html
. Can you please change the PR so that it's compatible with both and Python 2 support is preserved please?
try:
from cgi import escape
except ImportError:
from HTML import escape
Thank you.
About the Python 2 support, I'm quite surprised but it's fine for me :) I drop the latest commit of my PR which modified the README and the setup.py about Python 2. I can update my PR with a |
@miso-belica I updated my PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that after a few more small tweaks it will be perfect :)
The 'cgi.escape' function was deprecated since Python 3.2. It has been removed from Python 3.8. Use 'html.escape' instead. fix miso-belica#36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you :)
related to #36