| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Fix memory leak in PyUnicode_EncodeLocale() and
PyUnicode_EncodeFSDefault() on error handling.
Changes:
* Fix unicode_encode_locale() error handling
* Fix test_codecs.LocaleCodecTest
|
|
|
|
| |
(GH-10710)
|
|
|
|
|
| |
Fix mktime() overflow error in test_email: run
test_localtime_daylight_true_dst_true() and
test_localtime_daylight_false_dst_true() with a specific timezone.
|
|
|
|
|
|
|
|
| |
(GH-10633)
The lineno and col_offset attributes of AST nodes for list comprehensions,
generator expressions and tuples are now point to the opening parenthesis or
square brace. For tuples without parenthesis they point to the position
of the first item.
|
|
|
|
|
| |
Regression introduced in e3ce695 and 25b804a, where the old parameter
update_tryorder to _synthesize was first ignored, then given the opposite
value in the attempt to fix bpo-31014.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix str.format(), float.__format__() and complex.__format__() methods
for non-ASCII decimal point when using the "n" formatter.
Changes:
* Rewrite _PyUnicode_InsertThousandsGrouping(): it now requires
a _PyUnicodeWriter object for the buffer and a Python str object
for digits.
* Rename FILL() macro to unicode_fill(), convert it to static inline function,
add "assert(0 <= start);" and rework its code.
|
|
|
|
|
|
|
| |
There are some same consts in a module. This commit merges them into
single instance. It reduces number of objects in memory after loading modules.
https://bugs.python.org/issue34100
|
|
|
|
|
|
|
| |
Importing ProcessPoolExecutor may hang or cause an error when the import
accesses urandom on a low resource platform
https://bugs.python.org/issue29877
|
|
|
|
|
|
|
|
| |
The "-I" command line option (run Python in isolated mode) is now
also copied by the multiprocessing and distutils modules when
spawning child processes. Previously, only -E and -s options (enabled
by -I) were copied.
subprocess._args_from_interpreter_flags() now copies the -I flag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include/*.h should be the "portable Python API", whereas
Include/cpython/*.h should be the "CPython API": CPython
implementation details.
Changes:
* Create Include/cpython/ subdirectory
* "make install" now creates $prefix/include/cpython and copy
Include/cpython/* to $prefix/include/cpython
* Create Include/cpython/objimpl.h: move objimpl.h code
surrounded by "#ifndef Py_LIMITED_API" to cpython/objimpl.h.
* objimpl.h now includes cpython/objimpl.h
* Windows installer (MSI) now also install Include/ subdirectories:
Include/cpython/ and Include/internal/.
|
|
|
|
| |
Modify the following fnctl function to retry if interrupted by a signal
(EINTR): flock, lockf, fnctl.
|
|
|
|
| |
make install now also installs the internal API: Include/internal/*.h
header files.
|
| |
|
| |
|
|
|
| |
I'll watch for 404 on the old URL and will setup an HTTP redirection if needed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.
Changes:
* locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
monetary fields.
* Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
since it can be replaced anytime if a different thread calls
localeconv().
* _Py_GetLocaleconvNumeric() now requires a "struct lconv *"
structure, so locale.localeconv() now longer calls localeconv()
twice. Moreover, the function now requires all arguments to be
non-NULL.
* Rename STATIC_LOCALE_INFO_INIT to LocaleInfo_STATIC_INIT.
* Move _Py_GetLocaleconvNumeric() definition from fileutils.h
to pycore_fileutils.h. pycore_fileutils.h now includes locale.h.
* The _locale module is now built with Py_BUILD_CORE defined.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-10585)
coro->cr_origin wasn't initialized if compute_cr_origin() failed in
PyCoro_New(), which would cause a crash during the coroutine's
deallocation.
https://bugs.python.org/issue35269
|
|
|
|
| |
sys.executable (GH-9860)
|
|
|
|
|
|
|
|
| |
(GH-1766)
[Issue 28401](https://bugs.python.org/issue28401): Don't attempt to import the stable API extensions, they are not supported in PyDEBUG builds (which don't implement that ABI).
https://bugs.python.org/issue28401
|
| |
|
| |
|
|
|
|
|
|
| |
Discovered using clang's MemorySanitizer when it ran python3's
test_fstring test_misformed_unicode_character_name.
An msan build will fail by simply executing: ./python -c 'u"\N"'
|
|
|
|
| |
(GH-9665)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move "GC" macros together:
* PyObject_IS_GC()
* _Py_AS_GC()
* _PyObject_GC_IS_TRACKED()
* _PyObject_GC_MAY_BE_TRACKED()
* Mark other GC macros as internal (#ifdef Py_BUILD_CORE):
* _PyGCHead_NEXT(g), _PyGCHead_SET_NEXT(g, p)
* _PyGCHead_PREV(g), _PyGCHead_SET_PREV(g, p)
* _PyGCHead_FINALIZED(g), _PyGCHead_SET_FINALIZED(g)
* _PyGC_FINALIZED(o), _PyGC_SET_FINALIZED(o)
* _PyObject_GC_TRACK(o), _PyObject_GC_UNTRACK(o)
* _PyGC_PREV_MASK_FINALIZED
* _PyGC_PREV_MASK_COLLECTING
* _PyGC_PREV_SHIFT
* _PyGC_PREV_MASK
* Replace _PyGC_generation0 with _PyRuntime.gc.generation0
* _queuemodule.c: replace _PyObject_GC_UNTRACK()
with with PyObject_GC_UnTrack()
* Document that _PyObject_GC_TRACK() _PyObject_GC_UNTRACK() macros
have been removed from the public C API.
|
|
|
|
|
| |
The warnings module now suggests to enable tracemalloc if the source
is specified, tracemalloc module is available, but tracemalloc is not
tracing memory allocations.
|
|
|
|
|
|
|
|
|
|
| |
Adds configure flags for msan and ubsan builds to make it easier to enable.
These also encode the detail that address sanitizer and memory sanitizer
should disable pymalloc.
Define MEMORY_SANITIZER when appropriate at build time and adds workarounds
to existing code to mark things as initialized where the sanitizer is otherwise unable to
determine that. This lets our build succeed under the memory sanitizer. not all tests
pass without sanitizer failures yet but we're in pretty good shape after this.
|
| |
|
| |
|
|
|
|
|
| |
The System Preferences Dock "prefer tabs always" setting disables some
IDLE features. Menus are a bit different than as described for Windows
and Linux.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.
Do a bounds check within find_op so it can return before going past the end as a safety measure.
https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447#diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.
This bug was shipped in all Python 3.6 and 3.7 releases.
The included unittest won't fail unless you do a clang msan build.
|
|
|
|
|
| |
The call to `_untrack_reader` is performed too soon, causing the protocol
to forget about the reader before `connection_lost` can run and feed the
EOF to the reader. See bpo-35065.
|
|
|
|
| |
Pydoc now does not duplicate docstrings for aliases of inherited methods.
|
|
|
|
|
| |
(GH-10295)" (GH-10403)
This reverts commit c64583b6d3e8516a8cd2b5f84fc1e300bfac2206 due to multiple buildbot failures when building it.
|
|
|
|
|
|
|
|
| |
Current support for hash-based bytecode files in `zipimport` is rather
sparse, which leads to test failures when the test suite is ran with
the ``SOURCE_DATE_EPOCH`` environment variable set.
This teaches zipimport to handle hash-based pycs properly.
|
|
|
|
|
|
|
|
|
|
|
| |
Handle Unicode contents on localised Windows systems when activating a
venv. activate.bat currently breaks on German Windows systems, as chcp.com does
not return a plain number as on English systems, but (arbitrarily) appends a dot at the end
(for example "Aktive Codepage: 850." instead of "Active Codepage: 850"). The
dependency to chcp.com is removed and ctypes is used to get, set and restore the
console output code page. The code page for console input is not changed.
We can't use __VENV_PYTHON__ to find python.exe, since it's UTF-8. cmd.exe decodes
the script using the console output code page.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* add jsonlines option to json.tool
* code review
* fix:avoid read infile after it close
* improve doc in whatsnew 3.8
|
|
|
|
|
| |
Without setting mtime, time.time() will be used as the timestamp which will
end up in the compressed data and each invocation of the compress() function
will vary over time.
|
|
|
| |
A program that runs indefinitely can overfill memory.
|
|
|
|
|
| |
mutliprocessing.Connection (GH-10305)
Allow sending more than 2 GB at once on a multiprocessing connection on non-Windows systems.
|
|
|
| |
Add a new subsection to the doc.
|
|
|
|
|
| |
The section is renamed from "IDLE -- console differences". It mostly
covers the implications of using custom sys.stdxxx objects.
|