summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use names SEEK_SET, etc instead of magic number (GH-12057)ngie-eign2019-03-032-9/+11
| | | | | | | The previous code hardcoded `SEEK_SET`, etc. While it's very unlikely that these values will change, it's best to use the definitions to avoid there being mismatches in behavior with the code in the future. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Remove some code which has been dead since 1994 (#12136)Alex Gaynor2019-03-021-11/+0
|
* bpo-36103: change default buffer size of shutil.copyfileobj() (GH-12115)Inada Naoki2019-03-023-2/+5
| | | | | | | | | | | | | | | | It is changed from 16KiB to 64KiB. The previous default value is used since 1990. coreutils chose 128 KiB as minimum buffer size for block device I/O. But shutil.copyfileobj() can be used for non block devices. So I choose more conservative value. As my quick benchmark, performance difference between 64KiB and 128 KiB is up to ~5%. On the other hand, performance difference between 32 KiB and 64 KiB can be more than 10% when file is fully buffered. This is why 64 KiB is rational value.
* bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as ↵Eric Snow2019-03-0112-393/+483
| | | | necessary). (#12003)
* bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)Pablo Galindo2019-03-0127-2684/+1480
| | | | | Pgen is the oldest piece of technology in the CPython repository, building it requires various #if[n]def PGEN hacks in other parts of the code and it also depends more and more on CPython internals. This commit removes the old pgen C code and replaces it for a new version implemented in pure Python. This is a modified and adapted version of lib2to3/pgen2 that can generate grammar files compatibles with the current parser. This commit also eliminates all the #ifdef and code branches related to pgen, simplifying the code and making it more maintainable. The regen-grammar step now uses $(PYTHON_FOR_REGEN) that can be any version of the interpreter, so the new pgen code maintains compatibility with older versions of the interpreter (this also allows regenerating the grammar with the current CI solution that uses Python3.5). The new pgen Python module also makes use of the Grammar/Tokens file that holds the token specification, so is always kept in sync and avoids having to maintain duplicate token definitions.
* bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)Ned Deily2019-03-012-1/+3
| | | Patch by Kevin Walzer.
* bpo-36043: FileCookieJar supports os.PathLike (GH-11945)Stéphane Wirtel2019-03-014-4/+35
| | | https://bugs.python.org/issue36043
* bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. ↵Eric Snow2019-03-012-26/+27
| | | | | (gh-12062) This includes fixes to various _Py_atomic_* macros.
* bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). ↵Eric Snow2019-03-011-39/+42
| | | | | | (gh-12024)
* bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)Victor Stinner2019-03-012-81/+86
| | | | | | | | | | | | | Add TEST_EXTENSIONS constant to setup.py to allow to not build test extensions like _testcapi. Changes: * Add add_ldflags_cppflags() subfunction * Rename add_compiler_directories() to configure_compiler(). * Remove unused COMPILED_WITH_PYDEBUG constant. * Use self.add() rather than accessing directly self.extensions. * Remove module_enabled() function: check differently if curses extension is built or not.
* bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)Xtreak2019-03-013-1/+22
| | | | | Ensure custom formatwarning function can receive line as positional argument. Co-Authored-By: Tashrif Billah <tashrifbillah@gmail.com>
* bpo-36142: Add preconfig.c (GH-12128)Victor Stinner2019-03-018-87/+115
| | | | | * Add _PyArgv_Decode() function * Move _Py_ClearFileSystemEncoding() and _Py_SetFileSystemEncoding() to preconfig.c.
* bpo-36146: Don't run code at setup.py top level (GH-12127)Victor Stinner2019-03-011-76/+64
| | | | | | | | | * Move set_compiler_flags() calls and concurrent.future hack from module top-level to main() * Remove unused variables 'macros' and 'libraries' from detect_multiprocessing(). * Move SUMMARY and CLASSIFIERS constants at the top, move set_compiler_flags() function below these constants. * Add some empty new lines to respect PEP 8.
* bpo-36146: Split setup.py into subfunctions (GH-12125)Victor Stinner2019-03-011-228/+249
| | | | | | * Split PyBuildExt.detect_modules() huge function into subfunctions. * Move curses, hashlib and some other code to reorganize the code. * detect_tkinter() now returns False if the extension is missing. * Add PyBuildExt.config_h_vars attribute
* bpo-36142: Move command line parsing to coreconfig.c (GH-12123)Victor Stinner2019-03-015-1415/+1473
| | | | | | | | | | | | | | | * Add _PyCoreConfig_ReadFromArgv() function which parses command line options: move code from main.c to coreconfig.c. * Add _PyCoreConfig_Write() to write the new configuration: coerce the LC_CTYPE locale, set Py_xxx global configuration variables, etc. * _PyCoreConfig_ReadFromArgv() now only changes the LC_CTYPE locale temporarily. _PyCoreConfig_Write() becomes responsible to set the LC_CTYPE locale. * Add _Py_SetArgcArgv() and _Py_ClearArgcArgv() functions * Rename many "pymain_xxx()" functions * Add "const" to some function parameters * Reorganize main.c to declare functions in the order in which they are called.
* bpo-36146: Refactor setup.py: Add PyBuildExt.srcdir (GH-12124)Victor Stinner2019-03-011-98/+99
| | | | | | | | | | | * Add PyBuildExt.srcdir atribute in setup.py: the source directory is now always absolute. * Add PyBuildExt.inc_dirs and PyBuildExt.lib_dirs attributes: replace 'inc_dirs' and 'lib_dirs' local variables of detect_modules(). * Replace "from distutils.errors import *" with "from distutils.errors import CCompilerError, DistutilsError" to be able to use static analyzers like pyflakes * Reorder imports.
* bpo-36146: Refactor setup.py: PyBuildExt.add() method (GH-12097)Victor Stinner2019-03-011-227/+204
| | | | | | | | | | | | * Add PyBuildExt.add() which adds the extension directly to self.extensions, rather than using a temporary 'exts' local variable in detect_modules() and then add 'exts' to self.extensions * Convert 'missing' local variable from detect_modules() into PyBuildExt.missing attribute * _detect_openssl(), _decimal_ext() and _detect_nis() now call directly self.add(), rather than returning an extension (or None if not found). * Rename _decimal_ext() to _detect_decimal() for consistency with other methods.
* bpo-36146: Fix inc_dirs in setup.py on macOS (GH-12098)Victor Stinner2019-03-012-2/+5
| | | | Fix setup.py on macOS: only add /usr/include/ffi to include directories of _ctypes, not for all extensions.
* bpo-36142: Remove _PyMain structure (GH-12120)Victor Stinner2019-03-014-145/+145
| | | | | | | | | | | | | * Move fields from _PyMain to _PyCoreConfig: * skip_first_line * run_command * run_module * run_filename * Replace _PyMain.stdin_is_interactive with a new stdin_is_interactive(config) function * Rename _PyMain to _PyArgv. Add "const _PyArgv *args" field to _PyCmdline.
* bpo-36142: Rework error reporting in pymain_main() (GH-12113)Victor Stinner2019-03-018-228/+190
| | | | | | | | | | | Add a new _Py_INIT_EXIT() macro to be able to exit Python with an exitcode using _PyInitError API. Rewrite function calls by pymain_main() to use _PyInitError. Changes: * Remove _PyMain.err and _PyMain.status field * Add _Py_INIT_EXIT() macro and _PyInitError.exitcode field. * Rename _Py_FatalInitError() to _Py_ExitInitError().
* bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)Cheryl Sabella2019-03-013-18/+6
| | | | Remove colorizer.ColorDelegator.close_when_done and the corresponding argument of .close(). In IDLE, both have always been None or False since 2007.
* bpo-36155: Check for identity on test_gc.test_get_objects (GH-12116)Pablo Galindo2019-03-011-12/+36
|
* bpo-36018: Add documentation link to "random variable" (GH-12114)Raymond Hettinger2019-03-011-5/+7
| | | https://bugs.python.org/issue36018
* bpo-36142: Exclude coreconfig.h from Py_LIMITED_API (GH-12111)Victor Stinner2019-03-0114-31/+57
| | | | | | | | | The whole coreconfig.h header is now excluded from Py_LIMITED_API. Move functions definitions into a new internal pycore_coreconfig.h header. * Move Include/coreconfig.h to Include/cpython/coreconfig.h * coreconfig.h header is now excluded from Py_LIMITED_API * Move functions to pycore_coreconfig.h
* bpo-29571: Fix test_re.test_locale_flag() (GH-12099)Victor Stinner2019-02-282-2/+4
| | | | | | | | | Use locale.getpreferredencoding() rather than locale.getlocale() to get the locale encoding. With some locales, locale.getlocale() returns the wrong encoding. For example, on Fedora 29, locale.getlocale() returns ISO-8859-1 encoding for the "en_IN" locale, whereas locale.getpreferredencoding() reports the correct encoding: UTF-8.
* bpo-36018: Add special value tests and make minor tweaks to the docs (GH-12096)Raymond Hettinger2019-02-283-4/+12
| | | https://bugs.python.org/issue36018
* Add versionadded directives to ssl.minimum_version and ssl.maximum_version ↵Zhiming Wang2019-02-281-6/+10
| | | | | | (GH-11894)
* bpo-36146: Refactor setup.py (GH-12093)Victor Stinner2019-02-281-69/+72
| | | | | | | | | | | | * Rename globals to upper case to better distinguish if a variable is global or local: * Rename cross_compiling to CROSS_COMPILING * Rename host_platform to HOST_PLATFORM * Rename disabled_module_list to DISABLED_MODULE_LIST * Add MS_WINDOWS, CYGWIN and MACOS constants. * Use booleans: replace "return 0" with "return False" and replace "return 1" with "return True"
* Document the surprising sideeffect PyErr_Print(). (#12081)Gregory P. Smith2019-02-271-2/+6
| | | | | Did you know an API documented as printing the pending traceback would sometimes exit the process? You do now.
* Fix grammar error in timeit module docs (GH-12066)Shiv Dhar2019-02-271-1/+1
| | | | skip issue skip news
* Update FAQ to point to Infrastructure Team website. (GH-12077)Ned Deily2019-02-271-8/+2
|
* bpo-36096: IDLE: Refactor class variables in colorizer (GH-12002)Cheryl Sabella2019-02-273-21/+58
|
* bpo-31904: Add cross-build support for VxWorks RTOS (GH-11968)pxinwr2019-02-275-18/+75
|
* bpo-36123: Fix test_socket.testWithTimeoutTriggeredSend() race condition ↵Joannah Nanjekye2019-02-262-2/+4
| | | | | | (GH-12053) Use longer timeout for accept() in the server and block on accept in the client. The client now only sets the timeout once the socket is connected.
* bpo-35652: shutil.copytree(copy_function=...) erroneously pass DirEntry ↵Giampaolo Rodola2019-02-263-1/+21
| | | | instead of path str (GH-11997)
* closes bpo-36115: Fix some reference leaks in typeobject.c. (GH-12045)Benjamin Peterson2019-02-261-0/+2
| | | | | | | | | a24107b04c1277e3c1105f98aff5bfa3a98b33a0 introduced a few refleaks. https://bugs.python.org/issue36115
* bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)Dima Pasechnik2019-02-262-4/+5
| | | | | | | | | The standard math library (libm) may follow IEEE-754 recommendation to include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x). And this triggers a name clash, found by FreeBSD developer Steve Kargl, who worken on putting sinpi into libm used on FreeBSD (it has to be named "sinpi", not "sinPi", cf. e.g. https://en.cppreference.com/w/c/experimental/fpext4).
* bpo-36109: Fix random test_descr failure. (GH-12044)Serhiy Storchaka2019-02-261-1/+5
|
* Run autoreconf.Benjamin Peterson2019-02-263-14/+16
|
* closes bpo-13497: Fix `broken nice` configure test. (GH-12041)ngie-eign2019-02-261-0/+2
| | | | | Per POSIX, `nice(3)` requires `unistd.h` and `exit(3)` requires `stdlib.h`. Fixing the test will prevent false positives with pedantic compilers like clang.
* bpo-24643: Fix "#define timezone _timezone" clashes on Windows (GH-12019)Zackery Spytz2019-02-253-12/+16
|
* bpo-36102: Prepend slash to all POSIX shared memory block names (#12036)Davin Potts2019-02-251-4/+10
|
* Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)Anthony Sottile2019-02-2518-70/+21
|
* Autospec functions should propagate mock calls to parent GH-11273Xtreak2019-02-253-0/+23
|
* bpo-36030: Remove _PyStack_AsTuple() and _PyStack_AsTupleSlice() (GH-12032)Sergey Fedoseev2019-02-253-36/+6
|
* Post v3.8.0a2Łukasz Langa2019-02-251-1/+1
|
* Merge tag 'v3.8.0a2'Łukasz Langa2019-02-2557-120/+555
|\ | | | | | | Python 3.8.0a2
| * v3.8.0a2v3.8.0a2Łukasz Langa2019-02-2557-120/+555
| |
* | bpo-36030: Add _PyTuple_FromArray() function (GH-11954)Sergey Fedoseev2019-02-257-97/+31
| |
* | Remove empty Dictionaries section from programming FAQ (GH-12026)Andre Delfino2019-02-251-3/+0
| |