Skip to content

Commit 172606e

Browse files
committed
Update stale Python 2 comments and docstrings
Several comments and docstrings still referenced Python 2 concepts that no longer apply now that the driver requires Python 3.9+: - encoder.py: Updated cql_encode_unicode() docstring to note it is unused since Python 2 removal (str is always unicode on Python 3). Also fixed the method body: it was calling val.encode('utf-8') which on Python 3 converts str to bytes, producing wrong output. Now it passes val directly to cql_quote. - metadata.py: Changed 'will always be a unicode' to 'will always be a str' (line 2155). Updated unhexlify comment to say 'str input' instead of 'unicode input' and fixed typo 'everythin' (line 2350). - graphson.py: Removed '(PY2)'/'(PY3)' qualifiers from the type mapping table. Updated 'long' to 'int' for varint, 'str (unicode)' to 'str' for inet, removed 'buffer (PY2)' from blob entries. - util.py: Updated comment on _positional_rename_invalid_identifiers to remove stale 'Python 2.6' reference. - asyncorereactor.py: Removed stale 'TODO: Remove when Python 2 support is removed' since Python 2 support has been removed. The guard itself is still needed for interpreter shutdown scenarios. All 608 unit tests pass.
1 parent 986b6a7 commit 172606e

File tree

5 files changed

+391
-265
lines changed

5 files changed

+391
-265
lines changed

0 commit comments

Comments
 (0)