| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
(GH-7891)
Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.
Contributed by Ammar Askar.
|
|
|
|
|
|
|
|
|
|
|
| |
tarfile._Stream has two buffer for compressed and uncompressed data.
Those buffers are not aligned so unnecessary bytes slicing happens
for every reading chunks.
This commit bypass compressed buffering.
In this benchmark [1], user time become 250ms from 300ms.
[1]: https://bugs.python.org/msg320763
|
|
|
|
|
|
|
| |
subprocess.Popen now copies the startupinfo argument to leave it
unchanged: it will modify the copy, so that the same STARTUPINFO
object can be used multiple times.
Add subprocess.STARTUPINFO.copy() method.
|
|
|
|
| |
During buffered read, use a list followed by join instead of extending a bytes object.
This is how it was done before but changed in commit b506dc32c1a.
|
|
|
|
|
| |
Without tp_clear, GC can't break cyclic reference.
It will cause memory leak when cyclic reference is
created intentionally.
|
|
|
|
| |
PyErr_Print() will not return when the exception is a SystemExit, so
decref the __main__ module object in that case.
|
|
|
|
|
| |
The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.
* Correct the arguments passed to the Opera Browser when opening a new URL.
|
|
|
|
| |
The line-length limit is not needed because the pages appear in a separate app rather
than on a browser tab. It can also interact badly with the DPI setting.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* `flags` is indeed deprecated, but there is a validation on its value for
backwards compatibility reasons. This adds mention of this in the docs.
* The docs say that `sizehint` is deprecated and ignored, but it is still
used when `epoll_create1()` is unavailable. This adds mention of this in
the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
This is needed to have a default value available at the Python level,
since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.
The relevant tests have also been updated.
|
|
|
|
| |
Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
|
| |
|
|
|
|
|
|
| |
The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced. The 'tree' '1024'
output is eliminated.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-7940)
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix a race condition in Popen of
multiprocessing.popen_spawn_win32. The child process now duplicates
the read end of pipe instead of "stealing" it.
Previously, the read end of pipe was "stolen" by the child process,
but it leaked a handle if the child process had been terminated
before it could steal the handle from the parent process.
|
|
|
|
|
| |
Handle subnormal weights for choices()
|
|
|
|
|
|
|
|
|
| |
Import pyshell first in htest to call SetProcessDpiAwareness on Windows
before tkinter.Tk() is called for the htest. Apparently, 'root.destroy()'
undoes a previous 'root = Tk()'. Since IDLE unittests always destroy roots,
a unittest before an htest does not require anything more to work right.
Since part of the purpose of human-viewed tests is to determine that
widgets look right, it is important that they look the same for testing
as when running IDLE.
|
| |
|
|
|
|
|
|
|
|
| |
parameters (GH-7735)
Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.
Add check for invalid --huntrleaks/-R parameters.
|
| |
|
|
|
| |
Directly executed pyc files were being kept open longer than necessary.
|
| |
|
|
|
|
| |
bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.
|
|
|
|
| |
Calling Py_Initialize() twice does nothing, instead of failing with a
fatal error: restore the Python 3.6 behaviour.
|
|
|
| |
Increases coverage by 44%.
|
|
|
|
|
| |
Every other menudef key is the lowercase version of the
corresponding main menu entry (in this case, 'Window').
|
|
|
|
| |
Match Window on the main menu and remove last plural module name.
Change imports, test, and attribute references to match new name.
|
|
|
|
| |
The revised file compiles, runs, and tests OK. idle_test/README.txt
explains how to use it to create new IDLE test files.
|
|
|
|
|
|
|
|
|
|
|
| |
Only make sure that the result is in unittest.signals._results, don't
check the full content of unittest.signals._results.
support._run_suite() uses TextTestRunner in verbose mode, but
TextTestRunner.run() calls registerResult(result) which made the test
fail with "odd object in result set".
Call also removeResult() to restore unittest.signals._results to
avoid test side effect.
|
| |
|
|
|
|
|
| |
Fix-up class name duplication in PR #7807. Combined effect is that
module calltips and its class CallTips are now calltip and Calltip.
In module calltip_w class CallTip is now CalltipWindow.
|
|
|
|
| |
Improve consistency and appearance. Module idlelib.calltips is now calltip.
Class idlelib.calltip_w.CallTip is now Calltip.
|
|
|
| |
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
|
|
|
|
| |
Fix test_dbm_gnu.test_reorganize() on macOS with gdbm 1.15: add a
larger value to make sure that the file size changes.
|
|
|
|
|
|
|
|
|
|
| |
(#7681)
bpo-33671
* use memoryview() with size == file size on Windows, see https://github.com/python/cpython/pull/7160#discussion_r195405230
* release intermediate (sliced) memoryview immediately
* replace "OSX" occurrences with "macOS"
* add some unittests for copyfileobj()
|
|
|
|
|
| |
with debuglevel=1 only the header keys got printed. With
this change the header values get printed as well and the single
header entries get '\n' as a separator.
|
|
|
|
|
|
| |
Using gdbm 1.15, creating a database creates a file of 16 MiB. Adding
a small entry and then modifying the small entry doesn't change the
file size. Modify test_dbm_gnu to be less strict: allow that the file
size doesn't change.
|
| |
|
| |
|
|
|
| |
Make it the same as when one runs 'python'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-6834)
In some development setups it is inconvenient or impossible to write bytecode
caches to the code tree, but the bytecode caches are still useful. The
PYTHONPYCACHEPREFIX environment variable allows specifying an alternate
location for cached bytecode files, within which a directory tree mirroring the code
tree will be created. This cache tree is then used (for both reading and writing)
instead of the local `__pycache__` subdirectory within each source directory.
Exposed at runtime as sys.pycache_prefix (defaulting to None), and can
be set from the CLI as "-X pycache_prefix=path".
Patch by Carl Meyer.
|
|
|
|
| |
Create a template for minimally testing a tkinter-using module by importing it and instantiating its class(es). Add a test file for all non-startup IDLE modules. Edit existing files and update coverage. This is part 1 of 3, covering the 21 autocomplete to help modules and touching 33 idlelib files.
|
|
|
|
|
|
| |
Fix "LC_ALL=C python3.7 -V": reset properly the command line parser
when the encoding changes after reading the Python configuration.
Fix pymain_read_conf(): use memset(0) to reset properly cmdline.
|