Skip to content
Merged
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
6 changes: 6 additions & 0 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2689,6 +2689,12 @@ For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods,
the default value is ``1900-01-01T00:00:00.000``: any components not specified
in the format string will be pulled from the default value.

.. note::
Format strings without separators can be ambiguous for parsing. For
example, with ``%Y%m%d``, the string ``2026111`` may be parsed either as
``2026-11-01`` or as ``2026-01-11``.
Use separators to ensure the input is parsed as intended.

.. note::
When used to parse partial dates lacking a year, :meth:`.datetime.strptime`
and :meth:`.date.strptime` will raise when encountering February 29 because
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ expression support in the :mod:`re` module).
Return ``True`` if all characters in the string are alphanumeric and there is at
least one character, ``False`` otherwise. A character ``c`` is alphanumeric if one
of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``,
``c.isdigit()``, or ``c.isnumeric()``. For example::
``c.isdigit()``, or ``c.isnumeric()``. For example:

.. doctest::

Expand Down
2 changes: 1 addition & 1 deletion Include/import.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ PyAPI_FUNC(int) PyImport_AppendInittab(
typedef enum {
PyImport_LAZY_NORMAL,
PyImport_LAZY_ALL,
PyImport_LAZY_NONE,
PyImport_LAZY_NONE
} PyImport_LazyImportsMode;

#ifndef Py_LIMITED_API
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_peg_generator/test_c_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ def test_same_name_different_types(self) -> None:
grammar_source = """
start[mod_ty]: a[asdl_stmt_seq*]=import_from+ NEWLINE ENDMARKER { _PyAST_Module(a, NULL, p->arena)}
import_from[stmt_ty]: ( a='from' !'import' c=simple_name 'import' d=import_as_names_from {
_PyAST_ImportFrom(c->v.Name.id, d, 0, EXTRA) }
_PyAST_ImportFrom(c->v.Name.id, d, 0, 0, EXTRA) }
| a='from' '.' 'import' c=import_as_names_from {
_PyAST_ImportFrom(NULL, c, 1, EXTRA) }
_PyAST_ImportFrom(NULL, c, 1, 0, EXTRA) }
)
simple_name[expr_ty]: NAME
import_as_names_from[asdl_alias_seq*]: a[asdl_alias_seq*]=','.import_as_name_from+ { a }
Expand Down
11 changes: 7 additions & 4 deletions Modules/expat/refresh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,16 @@ This may be due to source changes and will require updating this script" >&2
exit 1
fi

echo "
echo '
Updated! next steps:
- Verify all is okay:
git diff
git status
- Regenerate the sbom file
- Update the sbom file:
Under the package "SPDXRef-PACKAGE-expat", update the "checksumValue",
"downloadLocation", "referenceLocator", and "versionInfo" fields.
- Regenerate the sbom file:
make regen-sbom
- Update warning count in Tools/build/.warningignore_macos
- Update the warning count in Tools/build/.warningignore_macos:
(use info from CI if not on a Mac)
"
'
Loading