summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43277: Add PySet_CheckExact to the C-API (GH-24598)Pablo Galindo2021-02-206-5/+20
| | | For some mysterious reason we have PySet_Check, PyFrozenSet_Check, PyAnySet_Check, PyAnySet_CheckExact and PyFrozenSet_CheckExact but no PySet_CheckExact.
* bpo-42990: Functions inherit current builtins (GH-24564)Victor Stinner2021-02-207-31/+74
| | | | | | | | | | | | | | | | | | | | The types.FunctionType constructor now inherits the current builtins if the globals dictionary has no "__builtins__" key, rather than using {"None": None} as builtins: same behavior as eval() and exec() functions. Defining a function with "def function(...): ..." in Python is not affected, globals cannot be overriden with this syntax: it also inherits the current builtins. PyFrame_New(), PyEval_EvalCode(), PyEval_EvalCodeEx(), PyFunction_New() and PyFunction_NewWithQualName() now inherits the current builtins namespace if the globals dictionary has no "__builtins__" key. * Add _PyEval_GetBuiltins() function. * _PyEval_BuiltinsFromGlobals() now uses _PyEval_GetBuiltins() if builtins cannot be found in globals. * Add tstate parameter to _PyEval_BuiltinsFromGlobals().
* Fix typo in launcher.c (GH-24497)Ikko Ashimine2021-02-201-2/+2
|
* Fix typo in dis module doc (GH-24509)Irit Katriel2021-02-201-1/+1
|
* bpo-43042: Augment tutorial sentence (GH-24514)Terry Jan Reedy2021-02-201-1/+2
| | | Calling same function also gets new local namespace.
* bpo-42825: Enable /OPT:REF (GH-24098)Austin Lamb2021-02-191-0/+1
| | | We explicitly disable /OPT:ICF as some manual optimisations depend on some functions still having distinct pointers (such as wrap_binary_func and wrap_binary_func_l).
* closes bpo-43266: Improve array formatting. (GH-24573)Erlend Egeberg Aasland2021-02-191-4/+4
|
* bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)Nicholas Sim2021-02-1914-34/+42
| | | | | | Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h} into Include/cpython/. Parser: peg_api: include Python.h instead of parser_interface.h.
* bpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583)Victor Stinner2021-02-191-15/+14
| | | Cleanup also the code.
* bpo-43268: Pass interp rather than tstate to internal functions (GH-24580)Victor Stinner2021-02-1929-245/+240
| | | | | | | | | | | | | | | Pass the current interpreter (interp) rather than the current Python thread state (tstate) to internal functions which only use the interpreter. Modified functions: * _PyXXX_Fini() and _PyXXX_ClearFreeList() functions * _PyEval_SignalAsyncExc(), make_pending_calls() * _PySys_GetObject(), sys_set_object(), sys_set_object_id(), sys_set_object_str() * should_audit(), set_flags_from_config(), make_flags() * _PyAtExit_Call() * init_stdio_encoding() * etc.
* bpo-43270: Remove private _PyErr_OCCURRED() macro (GH-24579)Victor Stinner2021-02-193-7/+3
| | | | | | | | Remove the private _PyErr_OCCURRED() macro: use the public PyErr_Occurred() function instead. CPython internals must use the internal _PyErr_Occurred(tstate) function instead: it is the most efficient way to check if an exception was raised.
* bpo-43268: Remove abusive usage of tstate in sysmodule.c (#24581)Victor Stinner2021-02-191-18/+12
| | | | Remove explicit tstate usage in sysmodule.c when it's only used raise exceptions: get it implicitly using PyErr_XXX() functions.
* bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)Victor Stinner2021-02-199-15/+15
| | | | The _Py_IsMainInterpreter() function now expects interp rather than tstate.
* bpo-40522: Replace PyThreadState_GET() with PyThreadState_Get() (GH-24575)Victor Stinner2021-02-192-5/+5
| | | | | Use directly the PyThreadState_Get() function in public header files, since PyThreadState_GET() macro is just an alias to it in pratice in these files.
* bpo-43268: Replace _PyThreadState_GET() with _PyInterpreterState_GET() ↵Victor Stinner2021-02-193-11/+9
| | | | | | | | | | | (GH-24576) Replace _PyThreadState_GET() with _PyInterpreterState_GET() in functions which only need the current interpreter, but don't need the current Python thread state. Replace also _PyThreadState_UncheckedGet() with _PyThreadState_GET() in faulthandler.c, since _PyThreadState_UncheckedGet() is just an alias to _PyThreadState_GET() in practice.
* bpo-43258: Make sqlite3 callback functions static (GH-24574)Erlend Egeberg Aasland2021-02-191-2/+4
|
* bpo-43258: Don't allocate sqlite3 aggregate context for empty queries (GH-24569)Erlend Egeberg Aasland2021-02-193-2/+13
|
* closes bpo-43254: Fix *snprintf() man page refs. (GH-24563)Erlend Egeberg Aasland2021-02-191-2/+2
|
* bpo-39448: Add regen-frozen makefile target. (GH-18174)Neil Schemenauer2021-02-196-21/+82
| | | | | Add the "regen-frozen" makefile target that regenerates the code for the frozen __hello__ module.
* Remove all links to mingw.org (GH-24552)Jeremy Paige2021-02-182-4/+1
| | | | | | | | This lease on this domain has lapsed. This not only makes these dead links, but a potential attack vector for readers of python.org as the domain can be obtained by an untrustworthy party. I considered redirecting these links to http://mingw-w64.org/ which is a maintained fork of mingw, but beyond my unfamiliarity with the exact level of compatibility, at the time of this PR that site had an expired cert and so is not much of a vulnerability fix. Automerge-Triggered-By: GH:Mariatta
* bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566)Victor Stinner2021-02-186-112/+114
| | | | | | | | | | | | * Refactor _PyFrame_New_NoTrack() and PyFunction_NewWithQualName() code. * PyFrame_New() checks for _PyEval_BuiltinsFromGlobals() failure. * Fix a ref leak in _PyEval_BuiltinsFromGlobals() error path. * Complete PyFunction_GetModule() documentation: it returns a borrowed reference and it can return NULL. * Move _PyEval_BuiltinsFromGlobals() definition to the internal C API. * PyFunction_NewWithQualName() uses _Py_IDENTIFIER() API for the "__name__" string to make it compatible with subinterpreters.
* bpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565)Erlend Egeberg Aasland2021-02-181-10/+9
|
* bpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562)Erlend Egeberg Aasland2021-02-181-4/+14
|
* bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251)David CARLIER2021-02-183-0/+13
|
* bpo-42990: Add __builtins__ attribute to functions (GH-24559)Victor Stinner2021-02-186-3/+24
| | | | | | Expose the new PyFunctionObject.func_builtins member in Python as a new __builtins__ attribute on functions. Document also the behavior change in What's New in Python 3.10.
* bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550)Nicholas Sim2021-02-179-15/+15
| | | | Move non-limited C API headers pyarena.h and pyctype.h into Include/cpython/ directory.
* bpo-40170: Move 3 NEWS entries to the C API section (GH-24555)Erlend Egeberg Aasland2021-02-173-0/+0
|
* bpo-40170: Always define PyExceptionClass_Name() as a function (GH-24553)Erlend Egeberg Aasland2021-02-173-6/+3
| | | Remove macro variant of PyExceptionClass_Name().
* bpo-43103: Add configure --without-static-libpython (GH-24418)Victor Stinner2021-02-177-25/+113
| | | | | | | | Add a new configure --without-static-libpython option to not build the libpythonMAJOR.MINOR.a static library and not install the python.o object file. Fix smelly.py and stable_abi.py tools when libpython3.10.a is missing.
* Update urllib2.rst (GH-24236)Christian Reich2021-02-170-0/+0
| | | fixed a minor glitch in the order of two words.
* bpo-40170: Always define PyIter_Check() as a function (GH-24548)Erlend Egeberg Aasland2021-02-165-14/+11
|
* bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)Nicholas Sim2021-02-166-10/+6
| | | | This change is backward compatible since C extension modules must not include "pytime.h" directly, but only include "Python.h".
* bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)Erlend Egeberg Aasland2021-02-164-3/+11
|
* bpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500)Zackery Spytz2021-02-162-0/+2
|
* bpo-42819, readline: Disable bracketed paste (GH-24108)Dustin Rodrigues2021-02-153-0/+32
|
* Add a warning block around the get_referrers() documentation (GH-24511)Pablo Galindo2021-02-151-4/+5
|
* bpo-43231: Correctly calculate the curses color pair limit when checking for ↵Pablo Galindo2021-02-151-1/+1
| | | | it (GH-24541)
* bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under ↵Pablo Galindo2021-02-151-0/+7
| | | | -R (GH-24539)
* bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)Ken Jin2021-02-155-14/+19
|
* bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533)Erlend Egeberg Aasland2021-02-153-4/+9
|
* bpo-42967: only use '&' as a query string separator (#24297)Adam Goldschmidt2021-02-1412-47/+186
| | | | | | | | | | | bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl(). urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator. Co-authored-by: Éric Araujo <merwok@netwok.org> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Éric Araujo <merwok@netwok.org>
* bpo-43210: Fix byteswap comment in sha512.module.c (GH-24518)Erlend Egeberg Aasland2021-02-141-1/+1
|
* bpo-43152: Update assert statement to remove unused warning (GH-24473)Dong-hee Na2021-02-141-2/+1
|
* bpo-43202: More codeop._maybe_compile clean-ups (GH-24512)Terry Jan Reedy2021-02-131-7/+7
| | | | Add comment, end others with period, remove unused variables, initialize others only when needed, and add explicit return.
* bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505)Zackery Spytz2021-02-131-2/+3
| | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-43172: readline now passes its tests when built against libedit (GH-24499)Gregory P. Smith2021-02-125-15/+62
| | | | | | | bpo-43172: readline now passes its tests when built against libedit. Existing irreconcilable API differences remain in readline.get_begidx and readline.get_endidx behavior based on libreadline vs libedit use. A note about that has been documented.
* bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments ↵Erlend Egeberg Aasland2021-02-124-4/+4
| | | | | (GH-24507) Automerge-Triggered-By: GH:tiran
* bpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508)Terry Jan Reedy2021-02-121-4/+2
| | | | The return used to be after code that was ignored when there was a code object.
* bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498)Inada Naoki2021-02-122-0/+2
|
* bpo-40956: Fix segfault when Connection.backup is called without target ↵Erlend Egeberg Aasland2021-02-104-22/+18
| | | | (GH-24503)