Cleanup Python 2 compatibility wrappers - #231
Merged
DifferentialOrange merged 7 commits intoOct 10, 2022
Merged
Conversation
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 9, 2022 11:56
2da0f00 to
f016dca
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
3 times, most recently
from
September 9, 2022 15:15
93051e9 to
9b2554c
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
from
September 9, 2022 15:59
406b2ef to
f5deabe
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 9, 2022 15:59
9b2554c to
fc2052e
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
2 times, most recently
from
September 21, 2022 12:37
0eb252d to
e8b1be0
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 21, 2022 12:47
fc2052e to
1bca525
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
from
September 21, 2022 13:46
e8b1be0 to
bd9aeba
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 21, 2022 13:46
1bca525 to
34df802
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
from
September 22, 2022 15:31
bd9aeba to
c629676
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 22, 2022 15:32
34df802 to
4f9b771
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
from
September 26, 2022 07:04
c629676 to
afa8107
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 26, 2022 07:05
4f9b771 to
cd475e1
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
from
September 26, 2022 07:10
afa8107 to
d4c577c
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
September 26, 2022 07:10
cd475e1 to
0936426
Compare
Merged
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-229-interval
branch
8 times, most recently
from
October 4, 2022 09:36
ac7a1e3 to
b121ac8
Compare
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
October 5, 2022 09:25
0936426 to
e9a4af6
Compare
DifferentialOrange
marked this pull request as ready for review
October 5, 2022 09:26
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
October 5, 2022 09:27
e9a4af6 to
2199421
Compare
The built-in `basestring` abstract type was removed in Python 3 [1]. `str` must be used for strings and `bytes` for byte objects. `long` type was unified with `int` in Python 3 [2]. 1. https://docs.python.org/3/whatsnew/3.0.html?highlight=basestring 2. https://peps.python.org/pep-0237/ Part of #212
Since Python 3 the default encoding of source files is already UTF-8 [1]. Unless instruction says something other than some variation of "utf-8", it has no effect [2]. 1. https://docs.python.org/3/howto/unicode.html#the-string-type 2. https://stackoverflow.com/questions/4872007/where-does-this-come-from-coding-utf-8 Part of #212
__future__ .print_function brings Python 3 print to Python 2 [1]. 1. https://docs.python.org/2/reference/simple_stmts.html#future
StandardError was removed in Python 3 [1]. PEP 249 footnote 10 [2] declares that database modules targeting Python 3 should use Exception as base class instead. 1. https://docs.python.org/3/whatsnew/3.0.html?highlight=standarderror 2. https://peps.python.org/pep-0249/#footnotes Part of #212
collections.abc was introduced in Python 3.3 [1]. 1. https://docs.python.org/3/library/collections.abc.html Part of #212
ctypes.c_ssize_t was introduced in Python 2.7 [1] and Python 3.2 [2]. 1. https://docs.python.org/2.7/library/ctypes.html#ctypes.c_ssize_t 2. https://docs.python.org/3.2/library/ctypes.html#ctypes.c_ssize_t Part of #212
DifferentialOrange
force-pushed
the
DifferentialOrange/gh-212-cleanup-python-2
branch
from
October 6, 2022 06:06
2199421 to
ec97d90
Compare
DifferentialOrange
deleted the
DifferentialOrange/gh-212-cleanup-python-2
branch
October 10, 2022 11:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
code-health: remove built-in types wrappers
The built-in
basestringabstract type was removed in Python 3 [1].strmust be used for strings andbytesfor byte objects.longtype was unified withintin Python 3 [2].Part of #212
code-health: remove utf-8 encoding instruction
Since Python 3 the default encoding of source files is already UTF-8 [1]. Unless instruction says something other than some variation of "utf-8", it has no effect [2].
Part of #212
code-health: remove print compatibility wrapper
future .print_function brings Python 3 print to Python 2 [1].
code-health: remove StandardError
StandardError was removed in Python 3 [1]. PEP 249 footnote 10 [2] declares that database modules targeting Python 3 should use Exception as base class instead.
Part of #212
code-health: remove collections wrappers
collections.abc was introduced in Python 3.3 [1].
Part of #212
code-health: remove c_ssize_t type wrapper
ctypes.c_ssize_t was introduced in Python 2.7 [1] and Python 3.2 [2].
Part of #212
code-health: remove string encoding compatibility
See PR [1].
Closes #212