Skip to content

Commit b4fa510

Browse files
authored
Merge branch 'main' into gh-126838
2 parents 7adddbf + f141e8e commit b4fa510

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+346
-180
lines changed

Doc/library/pathlib.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,9 +892,11 @@ conforming to :rfc:`8089`.
892892
>>> p.as_uri()
893893
'file:///c:/Windows'
894894
895-
For historical reasons, this method is also available from
896-
:class:`PurePath` objects. However, its use of :func:`os.fsencode` makes
897-
it strictly impure.
895+
.. deprecated-removed:: 3.14 3.19
896+
897+
Calling this method from :class:`PurePath` rather than :class:`Path` is
898+
possible but deprecated. The method's use of :func:`os.fsencode` makes
899+
it strictly impure.
898900

899901

900902
Expanding and resolving paths

Doc/whatsnew/3.14.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,11 @@ Deprecated
11591159
write new code. The :mod:`subprocess` module is recommended instead.
11601160
(Contributed by Victor Stinner in :gh:`120743`.)
11611161

1162+
* :mod:`pathlib`:
1163+
:meth:`!pathlib.PurePath.as_uri` is deprecated and will be removed in Python
1164+
3.19. Use :meth:`pathlib.Path.as_uri` instead.
1165+
(Contributed by Barney Gale in :gh:`123599`.)
1166+
11621167
* :mod:`pdb`:
11631168
The undocumented ``pdb.Pdb.curframe_locals`` attribute is now a deprecated
11641169
read-only property. The low overhead dynamic frame locals access added in

Include/internal/pycore_ast_state.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_atexit.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef Py_INTERNAL_ATEXIT_H
22
#define Py_INTERNAL_ATEXIT_H
33

4-
#include "pycore_lock.h" // PyMutex
5-
64
#ifdef __cplusplus
75
extern "C" {
86
#endif

Include/internal/pycore_backoff.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ extern "C" {
1010
#endif
1111

1212
#include <assert.h>
13-
#include "pycore_structs.h" // _Py_BackoffCounter
13+
#include <stdbool.h>
14+
#include "pycore_structs.h" // _Py_BackoffCounter
1415

1516
/* 16-bit countdown counters using exponential backoff.
1617

Include/internal/pycore_brc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include <stdint.h>
55
#include "pycore_llist.h" // struct llist_node
6-
#include "pycore_lock.h" // PyMutex
76
#include "pycore_object_stack.h" // _PyObjectStack
87

98
#ifdef __cplusplus

Include/internal/pycore_ceval.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "dynamic_annotations.h" // _Py_ANNOTATE_RWLOCK_CREATE
11+
#include "dynamic_annotations.h" // _Py_ANNOTATE_RWLOCK_CREATE
1212

13+
#include "pycore_code.h" // _PyCode_GetTLBCFast()
1314
#include "pycore_interp.h" // PyInterpreterState.eval_frame
1415
#include "pycore_pystate.h" // _PyThreadState_GET()
16+
#include "pycore_stats.h" // EVAL_CALL_STAT_INC()
1517
#include "pycore_typedefs.h" // _PyInterpreterFrame
1618

1719

Include/internal/pycore_ceval_state.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_lock.h" // PyMutex
1211
#include "pycore_gil.h" // struct _gil_runtime_state
1312

1413

Include/internal/pycore_code.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ extern "C" {
1010

1111
#include "pycore_structs.h" // _Py_CODEUNIT
1212
#include "pycore_stackref.h" // _PyStackRef
13-
#include "pycore_lock.h" // PyMutex
1413
#include "pycore_backoff.h" // _Py_BackoffCounter
1514
#include "pycore_tstate.h" // _PyThreadStateImpl
1615

Include/internal/pycore_codecs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_lock.h" // PyMutex
12-
#include "pycore_runtime_structs.h" // struct codecs_state
11+
#include "pycore_interp_structs.h" // struct codecs_state
1312

1413
/* Initialize codecs-related state for the given interpreter, including
1514
registering the first codec search function. Must be called before any other

0 commit comments

Comments
 (0)