Commit Graph

91634 Commits

Author SHA1 Message Date
Martin Panter 0f7673943a Issue #6953: Rearrange and expand Readline module documentation
* Group functions into six new subsections
* Document the underlying Readline function or variable accessed
* get_history_length() returns the history file limit
* clear_history() is conditionally compiled in
* Clarify zero and one bases for history item indexes
* parse_and_bind() uses its argument directly as an init line
* Change "command line" to "line buffer" for consistency
* read_init_file() also executes the file
* read_history_file() replaces the previous history
* write_history_file() overwrites any existing file
* Differentiate history file lines from history list items, which could be
  multi-line
* Add more information about completion, also addressing Issue #10796
* libedit (Editline) may be used on any platform; detection is OS X specific
2016-04-05 07:37:22 +00:00
Martin Panter cc71a795df Fix typos in documentation and comments 2016-04-05 06:19:42 +00:00
Martin Panter 28f35b24b6 Issue #23735: Avoid sighandler_t Gnu-ism 2016-04-03 08:00:49 +00:00
Martin Panter 5dbbf1abba Issue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price 2016-04-03 02:54:58 +00:00
Martin Panter acc03195b0 Issue #26586: Handle excessive header fields in http.server, by Xiang Zhang 2016-04-03 00:45:46 +00:00
Berker Peksag af8363926a Issue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants
Patch by Robert Bachmann and SilentGhost.
2016-04-02 04:48:27 +03:00
Berker Peksag b31daff1f7 Issue #26688: Fix module name in mock docs
Patch by Ashley Anderson.
2016-04-02 04:32:06 +03:00
Martin Panter 16c7cfda7c Issue #26678: Fix indexing of datetime.tzinfo and timezone classes
Also fix links to the “tzinfo” class and attributes.
2016-04-01 21:48:24 +00:00
Vinay Sajip d93a60149c Added a cookbook recipe for a logging context manager. 2016-04-01 23:13:01 +01:00
Victor Stinner c94a93aecb asyncio: Don't log ConnectionAbortedError
Issue #26509: In fatal error handlers, don't log ConnectionAbortedError which
occur on Windows.
2016-04-01 21:43:39 +02:00
Victor Stinner 2ba8ece5be asyncio: allow None as wait timeout
Fix GH#325: Allow to pass None as a timeout value to disable timeout logic.

Change written by Andrew Svetlov and merged by Guido van Rossum.
2016-04-01 21:39:09 +02:00
Victor Stinner ccdbe80a56 asyncio: sync overlapped.c with GitHub
On Python 3.3, use aliases:

* PyMem_RawMalloc = PyMem_Malloc
* PyMem_RawFree = PyMem_Free

These aliases are not need in Python 3.5, but this change makes synchronization
of code base simpler.
2016-04-01 21:37:41 +02:00
Martin Panter 3ee147ffbb Issue #22854: Fix logic for skipping test 2016-03-31 21:05:31 +00:00
Serhiy Storchaka e4ba872543 Remove redundant leading zeroes in PEP references. 2016-03-31 15:30:54 +03:00
Martin Panter 0950e6aef6 Issue #22854: Skip pipe seek tests on Windows 2016-03-31 10:31:30 +00:00
Martin Panter 754aab28ed Issue #22854: Clarify documentation about UnsupportedOperation and add tests
Also change BufferedReader.writable() and BufferedWriter.readable() to always
return False.
2016-03-31 07:21:56 +00:00
Serhiy Storchaka 8dc2ec1513 Issue #26492: Added additional tests for exhausted iterators of mutable sequences. 2016-03-30 21:01:26 +03:00
Serhiy Storchaka fbb1c5ee06 Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
2016-03-30 20:40:02 +03:00
Berker Peksag 13b3acd13e Fix typo in xml.dom.pulldom.rst
Reported by Matthew Cole on docs@p.o.
2016-03-30 16:28:43 +03:00
Victor Stinner 53f8ba52e6 test_urllibnet: set timeout on test_fileno()
Use the default timeout of 30 seconds to avoid blocking forever.
2016-03-30 02:19:01 +02:00
Victor Stinner 9db2ae7263 Fix ResourceWarning in test_unittest when interrupted 2016-03-30 01:15:28 +02:00
Victor Stinner 06ddd35f5f Issue #25911: Backport os._DummyDirEntry fixes
* Fix test_os.BytesWalkTests on Windows
* Mimick better the reference os.DirEntry on Windows
* _DummyDirEntry now caches os.stat() result
* _DummyDirEntry constructor now tries to get os.stat()
* Fix os._DummyDirEntry.is_symlink(), don't follow symbolic links:
  use os.stat(path, follow_symlinks=False).
2016-03-29 13:38:22 +02:00
Victor Stinner 8ba2083e0e Issue #26643: Add missing shutil resources to regrtest.py 2016-03-29 13:33:35 +02:00
Andrew Svetlov 6f57424ae0 Document None as timeout for asyncio.timeout() 2016-03-29 09:39:02 +03:00
Raymond Hettinger f9cddccf8c Issue #25314: store_true and store_false also create appropriate defaults. 2011-11-20 11:05:23 -08:00
Martin Panter f6b1d66a3c Issue #23804: Fix SSL recv/read(0) to not return 1024 bytes 2016-03-28 00:22:09 +00:00
Berker Peksag ce913877e4 Issue #25195: Fix a regression in mock.MagicMock
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.

Patch by Andrew Plummer.
2016-03-28 00:30:02 +03:00
Berker Peksag fa0f62d6ab Issue #23758: Improve num_params docs of create_{function,aggregate} functions
If you pass -1, the callable can take any number of arguments.

Added tests to verify the behavior.

Initial patch by Cédric Krier.
2016-03-27 22:39:14 +03:00
Berker Peksag f70fe6f6cf Document sqlite3.Cursor.close()
The behaviour of the close method is tested by ClosedCurTests
in Lib/sqlite3/test/dbapi.py.

This is basically a backport of https://github.com/ghaering/pysqlite/issues/73.
2016-03-27 21:51:02 +03:00
Berker Peksag 557a06309c sqlite3 documentation: Connection.iterdump() is a method 2016-03-27 18:46:18 +03:00
Martin Panter 5503d4731e Issue #26644: Raise ValueError for negative SSLSocket.recv() and read() 2016-03-27 05:35:19 +00:00
Victor Stinner 13f0c6166f _pickle: Fix load_counted_tuple(), use Py_ssize_t for size
Fix a warning on Windows 64-bit.
2016-03-14 18:09:39 +01:00
Alexander Belopolsky 1dcf4f9ee5 Issue#26616:Fixed a bug in datetime.astimezone() method. 2016-03-25 15:42:59 -04:00
Victor Stinner 84ca9fe145 doctest: fix _module_relative_path() error message
Write the module name rather than <module> in the error message, if module has
no __file__ attribute (ex: package).
2016-03-25 12:50:36 +01:00
Victor Stinner 8a20851010 Issue #25654:
* multiprocessing: open file with closefd=False to avoid ResourceWarning
* _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a
  previous test forgot to remove TESTFN)
* test_sys_exit(): remove TESTFN after each loop iteration

Initial patch written by Serhiy Storchaka.
2016-03-25 09:29:50 +01:00
Victor Stinner 540a81c720 Issue #21925: Fix test_warnings for release mode
Use -Wd comment line option to log the ResourceWarning.
2016-03-25 09:51:14 +01:00
Victor Stinner 244e12088d Use Py_uintptr_t for atomic pointers
Issue #26161: Use Py_uintptr_t instead of void* for atomic pointers in
pyatomic.h. Use atomic_uintptr_t when <stdatomic.h> is used.

Using void* causes compilation warnings depending on which implementation of
atomic types is used.
2016-01-22 14:09:55 +01:00
Victor Stinner 4b8b86c6d5 pystate.h: fix _PyThreadState_UncheckedGet()
Declare the function even if thread support is disabled.
2016-03-25 00:54:18 +01:00
Victor Stinner 27461683a9 warnings.formatwarning(): catch exceptions
Issue #21925: warnings.formatwarning() now catches exceptions on
linecache.getline(...) to be able to log ResourceWarning emitted late during
the Python shutdown process.
2016-03-25 00:30:32 +01:00
Victor Stinner e0511e797c Fix test_warnings.test_improper_option()
test_warnings: only run test_improper_option() and test_warnings_bootstrap()
once. The unit test doesn't depend on self.module.
2016-03-25 00:28:56 +01:00
Stefan Krah 1129084ebd Issue #26621: Remove unnecessary test. 2016-03-23 20:53:22 +01:00
Terry Jan Reedy 01a9a958b6 Issue #26525: Change chr example to match change in ord example. 2016-03-23 13:36:52 -04:00
doko@ubuntu.com 3a56b775da Makefile.pre.in (profile-opt): Fix bashism. 2016-03-23 12:57:29 +01:00
Victor Stinner d5871e62dd Enhance _tracemalloc debug mode
Issue #26588: Enhance assertion in set_reentrant()
2016-03-23 00:17:04 +01:00
Victor Stinner 2f49e09110 Fix _tracemalloc start/stop
Issue #26588: Fix _tracemalloc start/stop: don't play with the reentrant flag.

set_reentrant(1) fails with an assertion error if tracemalloc_init() is called
first in a thread A and tracemalloc_start() is called second in a thread B. The
tracemalloc is imported in a thread A. Importing the module calls
tracemalloc_init(). tracemalloc.start() is called in a thread B.
2016-03-23 00:10:24 +01:00
Martin Panter d6990d221b Issue #24266: Cancel history search mode with Ctrl+C in Readline 7 2016-03-22 07:24:05 +00:00
Benjamin Peterson e46487b133 merge 3.4 (#17167) 2016-03-21 22:31:24 -07:00
Benjamin Peterson b9869dfe35 remove useless $ keyword (closes #17167) 2016-03-21 22:31:02 -07:00
Martin Panter f6e9f47aa7 Issue #15699: Reunite comment with variable 2016-03-22 02:19:29 +00:00
Terry Jan Reedy 063d48d9c0 Issue #26525: Change ord example from nu to more easily recognized Euro sign. 2016-03-20 21:18:40 -04:00