Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Lib/codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@
class CodecInfo(tuple):
"""Codec details when looking up the codec registry"""

# Private API to allow Python 3.4 to denylist the known non-Unicode
# codecs in the standard library. A more general mechanism to
# reliably distinguish test encodings from other codecs will hopefully
# be defined for Python 3.5
# Private API to allow Python to denylist the known non-Unicode
# codecs in the standard library.
#
# See http://bugs.python.org/issue19619
# TODO: A more general mechanism to reliably distinguish text encodings
# from other codecs. See https://github.com/python/cpython/issues/63818
_is_text_encoding = True # Assume codecs are text encodings by default

def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
Expand Down
3 changes: 0 additions & 3 deletions Lib/logging/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,6 @@ class QueueHandler(logging.Handler):
with a multiprocessing Queue to centralise logging to file in one process
(in a multi-process application), so as to avoid file write contention
between processes.

This code is new in Python 3.2, but this class can be copy pasted into
user code for use with earlier Python versions.
"""

def __init__(self, queue):
Expand Down
8 changes: 0 additions & 8 deletions Lib/test/pythoninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,6 @@ def format_attr(attr, value):
copy_attributes(info_add, readline, 'readline.%s', attributes,
formatter=format_attr)

if not hasattr(readline, "_READLINE_LIBRARY_VERSION"):
# _READLINE_LIBRARY_VERSION has been added to CPython 3.7
doc = getattr(readline, '__doc__', '')
if 'libedit readline' in doc:
info_add('readline.library', 'libedit readline')
elif 'GNU readline' in doc:
info_add('readline.library', 'GNU readline')


def collect_gdb(info_add):
import subprocess
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_asyncgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,6 @@ async def arange(n):
yield i

def make_arange(n):
# This syntax is legal starting with Python 3.7
return (i * 2 async for i in arange(n))

async def run():
Expand All @@ -1826,7 +1825,6 @@ async def wrap(n):
return n

def make_arange(n):
# This syntax is legal starting with Python 3.7
return (i * 2 for i in range(n) if await wrap(i))

async def run():
Expand Down
4 changes: 1 addition & 3 deletions Lib/test/test_decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3073,9 +3073,7 @@ def test_copy(self):
def test__clamp(self):
# In Python 3.2, the private attribute `_clamp` was made
# public (issue 8540), with the old `_clamp` becoming a
# property wrapping `clamp`. For the duration of Python 3.2
# only, the attribute should be gettable/settable via both
# `clamp` and `_clamp`; in Python 3.3, `_clamp` should be
# property wrapping `clamp`. In Python 3.3, `_clamp` was
# removed.
Context = self.decimal.Context
c = Context()
Expand Down
1 change: 0 additions & 1 deletion Lib/wsgiref/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def read_environ():
v = v.encode(enc, 'replace').decode('iso-8859-1')

# Recover bytes from unicode environ, using surrogate escapes
# where available (Python 3.1+).
else:
v = v.encode(enc, esc).decode('iso-8859-1')

Expand Down
Loading