pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/74fbdcd74abc1bac6846ec92f00d21fe8f87610b

097560d244c08.css" /> gh-121785: Remove unused code from codecs.py (GH-121787) · python/cpython@74fbdcd · GitHub
Skip to content

Commit 74fbdcd

Browse files
authored
gh-121785: Remove unused code from codecs.py (GH-121787)
It was only needed for non-Unicode Python builds, which aren't supported anymore.
1 parent 94bee45 commit 74fbdcd

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

Lib/codecs.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,21 +1109,12 @@ def make_encoding_map(decoding_map):
11091109

11101110
### error handlers
11111111

1112-
try:
1113-
strict_errors = lookup_error("strict")
1114-
ignore_errors = lookup_error("ignore")
1115-
replace_errors = lookup_error("replace")
1116-
xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace")
1117-
backslashreplace_errors = lookup_error("backslashreplace")
1118-
namereplace_errors = lookup_error("namereplace")
1119-
except LookupError:
1120-
# In --disable-unicode builds, these error handler are missing
1121-
strict_errors = None
1122-
ignore_errors = None
1123-
replace_errors = None
1124-
xmlcharrefreplace_errors = None
1125-
backslashreplace_errors = None
1126-
namereplace_errors = None
1112+
strict_errors = lookup_error("strict")
1113+
ignore_errors = lookup_error("ignore")
1114+
replace_errors = lookup_error("replace")
1115+
xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace")
1116+
backslashreplace_errors = lookup_error("backslashreplace")
1117+
namereplace_errors = lookup_error("namereplace")
11271118

11281119
# Tell modulefinder that using codecs probably needs the encodings
11291120
# package

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy