8000 Pull in main · python/cpython@37205c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 37205c4

Browse files
Pull in main
2 parents f72c5e9 + d909733 commit 37205c4

File tree

11 files changed

+140
-187
lines changed

11 files changed

+140
-187
lines changed

Doc/library/calendar.rst

Lines changed: 49 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -28,58 +28,6 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
2828
2 BC, and so on.
2929

3030

31-
.. class:: Day
32-
33-
Enumeration defining the days of the week as integer constants, from 0 to 6.
34-
35-
.. attribute:: MONDAY
36-
37-
.. attribute:: TUESDAY
38-
39-
.. attribute:: WEDNESDAY
40-
41-
.. attribute:: THURSDAY
42-
43-
.. attribute:: FRIDAY
44-
45-
.. attribute:: SATURDAY
46-
47-
.. attribute:: SUNDAY
48-
49-
.. versionadded:: 3.12
50-
51-
52-
.. class:: Month
53-
54-
Enumeration defining months of the year as integer constants, from 1 to 12.
55-
56-
.. attribute:: JANUARY
57-
58-
.. attribute:: FEBRUARY
59-
60-
.. attribute:: MARCH
61-
62-
.. attribute:: APRIL
63-
64-
.. attribute:: MAY
65-
66-
.. attribute:: JUNE
67-
68-
.. attribute:: JULY
69-
70-
.. attribute:: AUGUST
71-
72-
.. attribute:: SEPTEMBER
73-
74-
.. attribute:: OCTOBER
75-
76-
.. attribute:: NOVEMBER
77-
78-
.. attribute:: DECEMBER
79-
80-
.. versionadded:: 3.12
81-
82-
8331
.. class:: Calendar(firstweekday=0)
8432

8533
Creates a :class:`Calendar` object. *firstweekday* is an integer specifying the
@@ -446,6 +394,29 @@ The :mod:`calendar` module exports the following data attributes:
446394
An array that represents the abbreviated days of the week in the current locale.
447395

448396

397+
.. data:: MONDAY
398+
TUESDAY
399+
WEDNESDAY
400+
THURSDAY
401+
FRIDAY
402+
SATURDAY
403+
SUNDAY
404+
405+
Aliases for the days of the week,
406+
where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``.
407+
408+
.. versionadded:: 3.12
409+
410+
411+
.. class:: Day
412+
413+
Enumeration defining days of the week as integer constants.
414+
The members of this enumeration are exported to the module scope as
415+
:data:`MONDAY` through :data:`SUNDAY`.
416+
417+
.. versionadded:: 3.12
418+
419+
449420
.. data:: month_name
450421

451422
An array that represents the months of the year in the current locale. This
@@ -459,15 +430,33 @@ The :mod:`calendar` module exports the following data attributes:
459430
locale. This follows normal convention of January being month number 1, so it
460431
has a length of 13 and ``month_abbr[0]`` is the empty string.
461432

462 1E79 -
.. data:: MONDAY
463-
TUESDAY
464-
WEDNESDAY
465-
THURSDAY
466-
FRIDAY
467-
SATURDAY
468-
SUNDAY
469433

470-
Aliases for day numbers, where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``.
434+
.. data:: JANUARY
435+
FEBRUARY
436+
MARCH
437+
APRIL
438+
MAY
439+
JUNE
440+
JULY
441+
AUGUST
442+
SEPTEMBER
443+
OCTOBER
444+
NOVEMBER
445+
DECEMBER
446+
447+
Aliases for the months of the year,
448+
where ``JANUARY`` is ``1`` and ``DECEMBER`` is ``12``.
449+
450+
.. versionadded:: 3.12
451+
452+
453+
.. class:: Month
454+
455+
Enumeration defining months of the year as integer constants.
456+
The members of this enumeration are exported to the module scope as
457+
:data:`JANUARY` through :data:`DECEMBER`.
458+
459+
.. versionadded:: 3.12
471460

472461

473462
The :mod:`calendar` module defines the following exceptions:

Doc/library/typing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ contrast, a variable annotated with ``type[C]`` (or
462462
themselves -- specifically, it will accept the *class object* of ``C``. For
463463
example::
464464

465-
a = 3 # Has type ``int```
465+
a = 3 # Has type ``int``
466466
b = int # Has type ``type[int]``
467467
c = type(a) # Also has type ``type[int]``
468468

Doc/whatsnew/3.12.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ Deprecated
10131013
(Contributed by Serhiy Storchaka and Guido van Rossum in :gh:`100160`.)
10141014

10151015
* :mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants are deprecated and
1016-
replaced by :data:`calendar.Month.JANUARY` and :data:`calendar.Month.FEBRUARY`.
1016+
replaced by :data:`calendar.JANUARY` and :data:`calendar.FEBRUARY`.
10171017
(Contributed by Prince Roshan in :gh:`103636`.)
10181018

10191019
* :mod:`datetime`: :class:`datetime.datetime`'s :meth:`~datetime.datetime.utcnow` and

Doc/whatsnew/3.13.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ sqlite3
165165
object is not :meth:`closed <sqlite3.Connection.close>` explicitly.
166166
(Contributed by Erlend E. Aasland in :gh:`105539`.)
167167

168-
* Add support for virtual tables to :meth:`sqlite3.Connection.iterdump`.
169-
(Contributed by Aviv Palivoda in :gh:`64662`.)
170-
171168
tkinter
172169
-------
173170

@@ -447,8 +444,8 @@ although there is currently no date scheduled for their removal.
447444
* Delegation of ``int()`` to ``__trunc__()`` method.
448445

449446
* :mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants are
450-
deprecated and replaced by :data:`calendar.Month.JANUARY` and
451-
:data:`calendar.Month.FEBRUARY`.
447+
deprecated and replaced by :data:`calendar.JANUARY` and
448+
:data:`calendar.FEBRUARY`.
452449
(Contributed by Prince Roshan in :gh:`103636`.)
453450

454451
* :mod:`datetime`:

Lib/sqlite3/__main__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def runsource(self, source, filename="<input>", symbol="single"):
6262
return False
6363

6464

65-
def main():
65+
def main(*args):
6666
parser = ArgumentParser(
6767
description="Python sqlite3 CLI",
6868
prog="python -m sqlite3",
@@ -86,7 +86,7 @@ def main():
8686
version=f"SQLite version {sqlite3.sqlite_version}",
8787
help="Print underlying SQLite library version",
8888
)
89-
args = parser.parse_args()
89+
args = parser.parse_args(*args)
9090

9191
if args.filename == ":memory:":
9292
db_name = "a transient in-memory database"
@@ -120,5 +120,8 @@ def main():
120120
finally:
121121
con.close()
122122

123+
sys.exit(0)
123124

124-
main()
125+
126+
if __name__ == "__main__":
127+
main(sys.argv)

Lib/test/test_clinic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,10 +2324,10 @@ def test_invalid_legacy_converter(self):
23242324
self.expect_failure(block, err, lineno=1)
23252325

23262326
def test_parent_class_or_module_does_not_exist(self):
2327-
err = "Parent class or module 'z' does not exist"
2327+
err = "Parent class or module 'baz' does not exist"
23282328
block = """
23292329
module m
2330-
z.func
2330+
baz.func
23312331
"""
23322332
self.expect_failure(block, err, lineno=1)
23332333

0 commit comments

Comments
 (0)
0