Skip to content

Commit 5543e7c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into deopt
2 parents 50415d5 + 42429d3 commit 5543e7c

File tree

66 files changed

+1781
-226
lines changed

Some content is hidden

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

66 files changed

+1781
-226
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Programs/test_frozenmain.h generated
9090
Python/Python-ast.c generated
9191
Python/executor_cases.c.h generated
9292
Python/generated_cases.c.h generated
93+
Python/abstract_interp_cases.c.h generated
9394
Python/opcode_targets.h generated
9495
Python/stdlib_module_names.h generated
9596
Tools/peg_generator/pegen/grammar_parser.py generated

Doc/library/logging.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -1002,10 +1002,14 @@ LoggerAdapter Objects
10021002
information into logging calls. For a usage example, see the section on
10031003
:ref:`adding contextual information to your logging output <context-info>`.
10041004

1005-
.. class:: LoggerAdapter(logger, extra)
1005+
.. class:: LoggerAdapter(logger, extra, merge_extra=False)
10061006

10071007
Returns an instance of :class:`LoggerAdapter` initialized with an
1008-
underlying :class:`Logger` instance and a dict-like object.
1008+
underlying :class:`Logger` instance, a dict-like object (*extra*), and a
1009+
boolean (*merge_extra*) indicating whether or not the *extra* argument of
1010+
individual log calls should be merged with the :class:`LoggerAdapter` extra.
1011+
The default behavior is to ignore the *extra* argument of individual log
1012+
calls and only use the one of the :class:`LoggerAdapter` instance
10091013

10101014
.. method:: process(msg, kwargs)
10111015

@@ -1037,6 +1041,9 @@ interchangeably.
10371041
Remove the undocumented ``warn()`` method which was an alias to the
10381042
``warning()`` method.
10391043

1044+
.. versionchanged:: 3.13
1045+
The *merge_extra* argument was added.
1046+
10401047

10411048
Thread Safety
10421049
-------------

Doc/library/sqlite3.rst

+6
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ Module functions
355355
.. versionadded:: 3.12
356356
The *autocommit* parameter.
357357

358+
.. versionchanged:: 3.13
359+
Positional use of the parameters *timeout*, *detect_types*,
360+
*isolation_level*, *check_same_thread*, *factory*, *cached_statements*,
361+
and *uri* is deprecated.
362+
They will become keyword-only parameters in Python 3.15.
363+
358364
.. function:: complete_statement(statement)
359365

360366
Return ``True`` if the string *statement* appears to contain

Doc/whatsnew/3.13.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ Deprecated
219219
They will be removed in Python 3.15.
220220
(Contributed by Victor Stinner in :gh:`105096`.)
221221

222+
* Passing more than one positional argument to :func:`sqlite3.connect` and the
223+
:class:`sqlite3.Connection` constructor is deprecated. The remaining
224+
parameters will become keyword-only in Python 3.15.
225+
(Contributed by Erlend E. Aasland in :gh:`107948`.)
226+
222227
Pending Removal in Python 3.14
223228
------------------------------
224229

@@ -936,7 +941,9 @@ Removed
936941
* ``Py_SetPath()``: set :c:member:`PyConfig.module_search_paths` instead.
937942
* ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
938943
* ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
939-
* ``Py_SetStandardStreamEncoding()``: set :c:member:`PyConfig.stdio_encoding` instead.
944+
* ``Py_SetStandardStreamEncoding()``: set :c:member:`PyConfig.stdio_encoding`
945+
instead, and set also maybe :c:member:`PyConfig.legacy_windows_stdio` (on
946+
Windows).
940947
* ``_Py_SetProgramFullPath()``: set :c:member:`PyConfig.executable` instead.
941948

942949
Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization

Include/cpython/optimizer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ typedef struct _PyExecutorObject {
2222
typedef struct _PyOptimizerObject _PyOptimizerObject;
2323

2424
/* Should return > 0 if a new executor is created. O if no executor is produced and < 0 if an error occurred. */
25-
typedef int (*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutorObject **);
25+
typedef int (*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutorObject **, int curr_stackentries);
2626

2727
typedef struct _PyOptimizerObject {
2828
PyObject_HEAD

Include/internal/pycore_fileutils.h

+1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ extern int _Py_add_relfile(wchar_t *dirname,
260260
size_t bufsize);
261261
extern size_t _Py_find_basename(const wchar_t *filename);
262262
PyAPI_FUNC(wchar_t*) _Py_normpath(wchar_t *path, Py_ssize_t size);
263+
extern wchar_t *_Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *length);
263264

264265
// The Windows Games API family does not provide these functions
265266
// so provide our own implementations. Remove them in case they get added

Include/internal/pycore_opcode_metadata.h

+142
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_optimizer.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifndef Py_INTERNAL_OPTIMIZER_H
2+
#define Py_INTERNAL_OPTIMIZER_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
7+
#ifndef Py_BUILD_CORE
8+
# error "this header requires Py_BUILD_CORE define"
9+
#endif
10+
11+
#include "pycore_uops.h"
12+
13+
int _Py_uop_analyze_and_optimize(PyCodeObject *code,
14+
_PyUOpInstruction *trace, int trace_len, int curr_stackentries);
15+
16+
17+
#ifdef __cplusplus
18+
}
19+
#endif
20+
#endif /* !Py_INTERNAL_OPTIMIZER_H */

0 commit comments

Comments
 (0)