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
14 changes: 7 additions & 7 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -774,16 +774,16 @@ how the command-line arguments should be handled. The supplied actions are:
>>> parser.parse_args('--foo --bar'.split())
Namespace(foo=True, bar=False, baz=True)

* ``'append'`` - This stores a list, and appends each argument value to the
list. It is useful to allow an option to be specified multiple times.
If the default value is non-empty, the default elements will be present
in the parsed value for the option, with any values from the
command line appended after those default values. Example usage::
* ``'append'`` - This appends each argument value to a list.
It is useful for allowing an option to be specified multiple times.
If the default value is a non-empty list, the parsed value will start
with the default list's elements and any values from the command line
will be appended after those default values. Example usage::

>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='append')
>>> parser.add_argument('--foo', action='append', default=['0'])
>>> parser.parse_args('--foo 1 --foo 2'.split())
Namespace(foo=['1', '2'])
Namespace(foo=['0', '1', '2'])

* ``'append_const'`` - This stores a list, and appends the value specified by
the const_ keyword argument to the list; note that the const_ keyword
Expand Down
6 changes: 3 additions & 3 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ Connection objects
supplied, this must be a :term:`callable` returning
an instance of :class:`Cursor` or its subclasses.

.. method:: blobopen(table, column, row, /, *, readonly=False, name="main")
.. method:: blobopen(table, column, rowid, /, *, readonly=False, name="main")

Open a :class:`Blob` handle to an existing
:abbr:`BLOB (Binary Large OBject)`.
Expand All @@ -631,8 +631,8 @@ Connection objects
:param str column:
The name of the column where the blob is located.

:param str row:
The name of the row where the blob is located.
:param int rowid:
The row id where the blob is located.

:param bool readonly:
Set to ``True`` if the blob should be opened without write
Expand Down
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,13 @@ shelve
(Contributed by Andrea Oliveri in :gh:`134004`.)


socket
------

* Add constants for the ISO-TP CAN protocol.
(Contributed by Patrick Menschel and Stefan Tatschner in :gh:`86819`.)


sqlite3
-------

Expand Down
5 changes: 5 additions & 0 deletions Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ struct _ts {
*/
unsigned long native_thread_id;

/* List of objects that still need to be cleaned up, singly linked
* via their gc headers' gc_next pointers. The list is populated by
* _PyTrash_thread_deposit_object and cleaned up by
* _PyTrash_thread_destroy_chain.
*/
PyObject *delete_later;

/* Tagged pointer to top-most critical section, or zero if there is no
Expand Down
7 changes: 7 additions & 0 deletions Include/internal/pycore_global_objects_fini_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(eager_start)
STRUCT_FOR_ID(effective_ids)
STRUCT_FOR_ID(element_factory)
STRUCT_FOR_ID(emptyerror)
STRUCT_FOR_ID(encode)
STRUCT_FOR_ID(encoding)
STRUCT_FOR_ID(end)
Expand All @@ -449,6 +450,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(extra_tokens)
STRUCT_FOR_ID(facility)
STRUCT_FOR_ID(factory)
STRUCT_FOR_ID(fallback)
STRUCT_FOR_ID(false)
STRUCT_FOR_ID(family)
STRUCT_FOR_ID(fanout)
Expand Down Expand Up @@ -481,6 +483,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(fromtimestamp)
STRUCT_FOR_ID(fromutc)
STRUCT_FOR_ID(fset)
STRUCT_FOR_ID(fullerror)
STRUCT_FOR_ID(func)
STRUCT_FOR_ID(future)
STRUCT_FOR_ID(generation)
Expand Down Expand Up @@ -593,6 +596,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(maxevents)
STRUCT_FOR_ID(maxlen)
STRUCT_FOR_ID(maxmem)
STRUCT_FOR_ID(maxsize)
STRUCT_FOR_ID(maxsplit)
STRUCT_FOR_ID(maxvalue)
STRUCT_FOR_ID(memLevel)
Expand Down Expand Up @@ -691,7 +695,9 @@ struct _Py_global_strings {
STRUCT_FOR_ID(protocol)
STRUCT_FOR_ID(ps1)
STRUCT_FOR_ID(ps2)
STRUCT_FOR_ID(qid)
STRUCT_FOR_ID(query)
STRUCT_FOR_ID(queuetype)
STRUCT_FOR_ID(quotetabs)
STRUCT_FOR_ID(raw)
STRUCT_FOR_ID(read)
Expand Down Expand Up @@ -817,6 +823,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(tzinfo)
STRUCT_FOR_ID(tzname)
STRUCT_FOR_ID(uid)
STRUCT_FOR_ID(unboundop)
STRUCT_FOR_ID(unlink)
STRUCT_FOR_ID(unraisablehook)
STRUCT_FOR_ID(updates)
Expand Down
9 changes: 3 additions & 6 deletions Include/internal/pycore_interp_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern "C" {
#include "pycore_structs.h" // PyHamtObject
#include "pycore_tstate.h" // _PyThreadStateImpl
#include "pycore_typedefs.h" // _PyRuntimeState
#include "pycore_uop.h" // struct _PyUOpInstruction


#define CODE_MAX_WATCHERS 8
Expand Down Expand Up @@ -202,12 +203,6 @@ enum _GCPhase {
#define NUM_GENERATIONS 3

struct _gc_runtime_state {
/* List of objects that still need to be cleaned up, singly linked
* via their gc headers' gc_prev pointers. */
PyObject *trash_delete_later;
/* Current call-stack depth of tp_dealloc calls. */
int trash_delete_nesting;

/* Is automatic collection enabled? */
int enabled;
int debug;
Expand Down Expand Up @@ -949,6 +944,8 @@ struct _is {
struct callable_cache callable_cache;
PyObject *common_consts[NUM_COMMON_CONSTANTS];
bool jit;
bool compiling;
struct _PyUOpInstruction *jit_uop_buffer;
struct _PyExecutorObject *executor_list_head;
struct _PyExecutorObject *executor_deletion_list_head;
struct _PyExecutorObject *cold_executor;
Expand Down
30 changes: 1 addition & 29 deletions Include/internal/pycore_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ extern "C" {
#endif

#include "pycore_typedefs.h" // _PyInterpreterFrame
#include "pycore_uop.h" // _PyUOpInstruction
#include "pycore_uop_ids.h"
#include "pycore_stackref.h" // _PyStackRef
#include <stdbool.h>
Expand Down Expand Up @@ -41,32 +42,6 @@ typedef struct {
PyCodeObject *code; // Weak (NULL if no corresponding ENTER_EXECUTOR).
} _PyVMData;

/* Depending on the format,
* the 32 bits between the oparg and operand are:
* UOP_FORMAT_TARGET:
* uint32_t target;
* UOP_FORMAT_JUMP
* uint16_t jump_target;
* uint16_t error_target;
*/
typedef struct {
uint16_t opcode:15;
uint16_t format:1;
uint16_t oparg;
union {
uint32_t target;
struct {
uint16_t jump_target;
uint16_t error_target;
};
};
uint64_t operand0; // A cache entry
uint64_t operand1;
#ifdef Py_STATS
uint64_t execution_count;
#endif
} _PyUOpInstruction;

typedef struct _PyExitData {
uint32_t target;
uint16_t index;
Expand Down Expand Up @@ -118,9 +93,6 @@ PyAPI_FUNC(void) _Py_Executors_InvalidateCold(PyInterpreterState *interp);
// trace_run_counter is greater than this value.
#define JIT_CLEANUP_THRESHOLD 100000

// This is the length of the trace we project initially.
#define UOP_MAX_TRACE_LENGTH 1200

#define TRACE_STACK_SIZE 5

int _Py_uop_analyze_and_optimize(_PyInterpreterFrame *frame,
Expand Down
7 changes: 7 additions & 0 deletions Include/internal/pycore_runtime_init_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions Include/internal/pycore_unicodeobject_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading