Skip to content

Conversation

living180
Copy link
Contributor

Remove some obsolete compatibility code from the stack trace recording code.

living180 added 4 commits May 29, 2022 15:35
inspect.Traceback has existed since Python 2.6.
linecache uses tokenize.open() to detect and use the encoding of the
file since Python 3.4.
@matthiask matthiask merged commit 66a767d into django-commons:main May 29, 2022
@matthiask
Copy link
Member

Thank you! Makes sense.

I haven't researched if the coding= line is still supported in Python 3 but even if it were it surely wouldn't be widely used.

@living180 living180 deleted the stacktrace_cleanups branch May 29, 2022 13:20
@living180
Copy link
Contributor Author

I haven't researched if the coding= line is still supported in Python 3 but even if it were it surely wouldn't be widely used.

From the documentation, it looks like it still is: https://docs.python.org/3.10/howto/unicode.html#unicode-literals-in-python-source-code

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.

2 participants