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

Skip to content

Commit c1d2475

Browse files
committed
Merge remote-tracking branch 'origin' into call-family
2 parents cbd3fe9 + b96b344 commit c1d2475

37 files changed

+354
-119
lines changed

Doc/library/argparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Core Functionality
3131

3232
The :mod:`argparse` module's support for command-line interfaces is built
3333
around an instance of :class:`argparse.ArgumentParser`. It is a container for
34-
argument specifications and has options that apply the parser as whole::
34+
argument specifications and has options that apply to the parser as whole::
3535

3636
parser = argparse.ArgumentParser(
3737
prog = 'ProgramName',

Doc/library/cmath.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Power and logarithmic functions
8989
logarithms.
9090

9191

92-
.. function:: log(x, base=None)
92+
.. function:: log(x[, base])
9393

9494
Returns the logarithm of *x* to the given *base*. If the *base* is not
9595
specified, returns the natural logarithm of *x*. There is one branch cut, from 0

Doc/library/ctypes.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,10 @@ way is to instantiate one of the following classes:
13801380
DLLs and determine which one is not found using Windows debugging and
13811381
tracing tools.
13821382

1383+
.. versionchanged:: 3.12
1384+
1385+
The *name* parameter can now be a :term:`path-like object`.
1386+
13831387
.. seealso::
13841388

13851389
`Microsoft DUMPBIN tool <https://docs.microsoft.com/cpp/build/reference/dependents>`_
@@ -1398,13 +1402,21 @@ way is to instantiate one of the following classes:
13981402
.. versionchanged:: 3.3
13991403
:exc:`WindowsError` used to be raised.
14001404

1405+
.. versionchanged:: 3.12
1406+
1407+
The *name* parameter can now be a :term:`path-like object`.
1408+
14011409

14021410
.. class:: WinDLL(name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=None)
14031411

14041412
Windows only: Instances of this class represent loaded shared libraries,
14051413
functions in these libraries use the ``stdcall`` calling convention, and are
14061414
assumed to return :c:expr:`int` by default.
14071415

1416+
.. versionchanged:: 3.12
1417+
1418+
The *name* parameter can now be a :term:`path-like object`.
1419+
14081420
The Python :term:`global interpreter lock` is released before calling any
14091421
function exported by these libraries, and reacquired afterwards.
14101422

@@ -1418,6 +1430,10 @@ function exported by these libraries, and reacquired afterwards.
14181430

14191431
Thus, this is only useful to call Python C api functions directly.
14201432

1433+
.. versionchanged:: 3.12
1434+
1435+
The *name* parameter can now be a :term:`path-like object`.
1436+
14211437
All these classes can be instantiated by calling them with at least one
14221438
argument, the pathname of the shared library. If you have an existing handle to
14231439
an already loaded shared library, it can be passed as the ``handle`` named
@@ -2510,6 +2526,7 @@ fields, or any other data types containing pointer type fields.
25102526
An optional small integer that allows overriding the alignment of
25112527
structure fields in the instance. :attr:`_pack_` must already be defined
25122528
when :attr:`_fields_` is assigned, otherwise it will have no effect.
2529+
Setting this attribute to 0 is the same as not setting it at all.
25132530

25142531

25152532
.. attribute:: _anonymous_

Doc/library/math.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,13 @@ Power and logarithmic functions
393393
.. versionadded:: 3.2
394394

395395

396-
.. function:: log(x, base=None)
396+
.. function:: log(x[, base])
397397

398-
Return the logarithm of *x* to the given *base*.
398+
With one argument, return the natural logarithm of *x* (to base *e*).
399+
400+
With two arguments, return the logarithm of *x* to the given *base*,
401+
calculated as ``log(x)/log(base)``.
399402

400-
If the *base* is not specified, returns the natural
401-
logarithm (base *e*) of *x*.
402403

403404
.. function:: log1p(x)
404405

Doc/library/timeit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Command-Line Interface
206206

207207
When called as a program from the command line, the following form is used::
208208

209-
python -m timeit [-n N] [-r N] [-u U] [-s S] [-h] [statement ...]
209+
python -m timeit [-n N] [-r N] [-u U] [-s S] [-p] [-v] [-h] [statement ...]
210210

211211
Where the following options are understood:
212212

Lib/ctypes/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ def __init__(self, name, mode=DEFAULT_MODE, handle=None,
344344
use_errno=False,
345345
use_last_error=False,
346346
winmode=None):
347+
if name:
348+
name = _os.fspath(name)
347349
self._name = name
348350
flags = self._func_flags_
349351
if use_errno:

Lib/datetime.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,12 @@ class timedelta:
587587
returning a timedelta, and addition or subtraction of a datetime
588588
and a timedelta giving a datetime.
589589
590-
Representation: (days, seconds, microseconds). Why? Because I
591-
felt like it.
590+
Representation: (days, seconds, microseconds).
592591
"""
592+
# The representation of (days, seconds, microseconds) was chosen
593+
# arbitrarily; the exact rationale originally specified in the docstring
594+
# was "Because I felt like it."
595+
593596
__slots__ = '_days', '_seconds', '_microseconds', '_hashcode'
594597

595598
def __new__(cls, days=0, seconds=0, microseconds=0,

Lib/ensurepip/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
__all__ = ["version", "bootstrap"]
1212
_PACKAGE_NAMES = ('setuptools', 'pip')
1313
_SETUPTOOLS_VERSION = "65.5.0"
14-
_PIP_VERSION = "22.3.1"
14+
_PIP_VERSION = "23.0"
1515
_PROJECTS = [
1616
("setuptools", _SETUPTOOLS_VERSION, "py3"),
1717
("pip", _PIP_VERSION, "py3"),
1.96 MB
Binary file not shown.

Lib/enum.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,12 +1429,11 @@ def _missing_(cls, value):
14291429
% (cls.__name__, value, unknown, bin(unknown))
14301430
)
14311431
# normal Flag?
1432-
__new__ = getattr(cls, '__new_member__', None)
1433-
if cls._member_type_ is object and not __new__:
1432+
if cls._member_type_ is object:
14341433
# construct a singleton enum pseudo-member
14351434
pseudo_member = object.__new__(cls)
14361435
else:
1437-
pseudo_member = (__new__ or cls._member_type_.__new__)(cls, value)
1436+
pseudo_member = cls._member_type_.__new__(cls, value)
14381437
if not hasattr(pseudo_member, '_value_'):
14391438
pseudo_member._value_ = value
14401439
if member_value:

0 commit comments

Comments
 (0)