Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5b86c5

Browse files
Merge branch 'main' into tvobject
2 parents 74c1a0d + 6c4124d commit d5b86c5

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

Doc/library/asyncio-eventloop.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ Server objects are created by :meth:`loop.create_server`,
15711571
:meth:`loop.create_unix_server`, :func:`start_server`,
15721572
and :func:`start_unix_server` functions.
15731573

1574-
Do not instantiate the class directly.
1574+
Do not instantiate the :class:`Server` class directly.
15751575

15761576
.. class:: Server
15771577

@@ -1662,7 +1662,8 @@ Do not instantiate the class directly.
16621662

16631663
.. attribute:: sockets
16641664

1665-
List of :class:`socket.socket` objects the server is listening on.
1665+
List of socket-like objects, ``asyncio.trsock.TransportSocket``, which
1666+
the server is listening on.
16661667

16671668
.. versionchanged:: 3.7
16681669
Prior to Python 3.7 ``Server.sockets`` used to return an

Python/specialize.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,10 @@ _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *class, PyObject *
544544
write_u32(cache->self_type_version, Py_TYPE(self)->tp_version_tag);
545545
write_obj(cache->method, res); // borrowed
546546
instr->op.code = LOAD_SUPER_ATTR_METHOD;
547+
Py_DECREF(res);
547548
goto success;
548549
}
550+
Py_DECREF(res);
549551
SPECIALIZATION_FAIL(LOAD_SUPER_ATTR, SPEC_FAIL_SUPER_NOT_METHOD);
550552

551553
fail:

Tools/build/deepfreeze.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ def generate_unicode(self, name: str, s: str) -> str:
175175
return f"&_Py_STR({strings[s]})"
176176
if s in identifiers:
177177
return f"&_Py_ID({s})"
178+
if len(s) == 1:
179+
c = ord(s)
180+
if c < 128:
181+
return f"(PyObject *)&_Py_SINGLETON(strings).ascii[{c}]"
182+
elif c < 256:
183+
return f"(PyObject *)&_Py_SINGLETON(strings).latin1[{c - 128}]"
178184
if re.match(r'\A[A-Za-z0-9_]+\Z', s):
179185
name = f"const_str_{s}"
180186
kind, ascii = analyze_character_width(s)

0 commit comments

Comments
 (0)