]> granicus.if.org Git - python/log
python
8 years agoIssue #26671: Fixed #ifdef indentation.
Serhiy Storchaka [Wed, 6 Apr 2016 19:55:31 +0000 (22:55 +0300)]
Issue #26671: Fixed #ifdef indentation.

8 years agoAdds version info to all signed binaries on Windows
Steve Dower [Wed, 6 Apr 2016 19:36:23 +0000 (12:36 -0700)]
Adds version info to all signed binaries on Windows

8 years agoAdds version info to all signed binaries on Windows.
Steve Dower [Wed, 6 Apr 2016 19:35:24 +0000 (12:35 -0700)]
Adds version info to all signed binaries on Windows.

8 years agoIssue #26671: Enhanced path_converter.
Serhiy Storchaka [Wed, 6 Apr 2016 19:17:52 +0000 (22:17 +0300)]
Issue #26671: Enhanced path_converter.

Exceptions raised during converting argument of correct type are no longer
overridded with TypeError. Some error messages are now more detailed.

8 years agoIssue #22570: Renamed Py_SETREF to Py_XSETREF.
Serhiy Storchaka [Wed, 6 Apr 2016 06:50:03 +0000 (09:50 +0300)]
Issue #22570: Renamed Py_SETREF to Py_XSETREF.

8 years agoIssue #22570: Renamed Py_SETREF to Py_XSETREF.
Serhiy Storchaka [Wed, 6 Apr 2016 06:45:48 +0000 (09:45 +0300)]
Issue #22570: Renamed Py_SETREF to Py_XSETREF.

8 years agoMerge typing.py 3.5->3.6 (Text, ItemsView).
Guido van Rossum [Tue, 5 Apr 2016 21:57:03 +0000 (14:57 -0700)]
Merge typing.py 3.5->3.6 (Text, ItemsView).

8 years agoAdd Text=str. Make ItemsView derive from AbstractSet, not Set (which is the concrete...
Guido van Rossum [Tue, 5 Apr 2016 21:54:25 +0000 (14:54 -0700)]
Add Text=str. Make ItemsView derive from AbstractSet, not Set (which is the concrete set).

8 years agoMerge upstream typing.py changes from 3.5 branch.
Guido van Rossum [Tue, 5 Apr 2016 15:35:22 +0000 (08:35 -0700)]
Merge upstream typing.py changes from 3.5 branch.

8 years agoMany changes from the upstream repo (https://github.com/python/typing).
Guido van Rossum [Tue, 5 Apr 2016 15:28:52 +0000 (08:28 -0700)]
Many changes from the upstream repo (https://github.com/python/typing).

This syncs to rev 7b43ada77821d23e55e3a4b35f6055a59b9e1ad7 there.

Summary:

- Add typing.DefaultDict (as a generic variant of collections.defaultdict).

- Use collections.Reversible if it exists (only relevant for Python 3.6).

- Revamped generic class behavior to conform to updated PEP 484.

- Improve speed of Generic.__new__.

- Make sure __init__ is called for new Generic instances. Fix issue #26391.

- Refactor async support to be compatible with 3.2, 3.3, 3.4.

- Remove 'io' and 're' from __all__ (they still exist, just not
  included by "import *"). Fix issue #26234.

- Change @overload -- you can now use it outside stubs (you still
  cannot call the decorated function though).

8 years agoIssue #6953: Merge readline doc from 3.5
Martin Panter [Tue, 5 Apr 2016 10:17:38 +0000 (10:17 +0000)]
Issue #6953: Merge readline doc from 3.5

8 years agoIssue #6953: Rearrange and expand Readline module documentation
Martin Panter [Tue, 5 Apr 2016 07:37:22 +0000 (07:37 +0000)]
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

8 years agoMerge typo fixes from 3.5
Martin Panter [Tue, 5 Apr 2016 06:20:32 +0000 (06:20 +0000)]
Merge typo fixes from 3.5

8 years agoFix typos in documentation and comments
Martin Panter [Tue, 5 Apr 2016 06:19:42 +0000 (06:19 +0000)]
Fix typos in documentation and comments

8 years agoAdd collections.Reversible. Patch by Ivan Levkivskyi. Fixes issue #25987.
Guido van Rossum [Mon, 4 Apr 2016 17:59:29 +0000 (10:59 -0700)]
Add collections.Reversible. Patch by Ivan Levkivskyi. Fixes issue #25987.

8 years agoIssue #23735: Merge sighandler_t fix from 3.5
Martin Panter [Sun, 3 Apr 2016 08:04:35 +0000 (08:04 +0000)]
Issue #23735: Merge sighandler_t fix from 3.5

8 years agoIssue #23735: Avoid sighandler_t Gnu-ism
Martin Panter [Sun, 3 Apr 2016 08:00:49 +0000 (08:00 +0000)]
Issue #23735: Avoid sighandler_t Gnu-ism

8 years agoIssue #23735: Merge Readline resize handling from 3.5
Martin Panter [Sun, 3 Apr 2016 03:19:27 +0000 (03:19 +0000)]
Issue #23735: Merge Readline resize handling from 3.5

8 years agoIssue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price
Martin Panter [Sun, 3 Apr 2016 02:54:58 +0000 (02:54 +0000)]
Issue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price

8 years agoIssue #25951: Fix SSLSocket.sendall() to return None, by Aviv Palivoda
Martin Panter [Sun, 3 Apr 2016 02:12:54 +0000 (02:12 +0000)]
Issue #25951: Fix SSLSocket.sendall() to return None, by Aviv Palivoda

8 years agoIssue #26586: Simple enhancements to BaseHTTPRequestHandler by Xiang Zhang
Martin Panter [Sun, 3 Apr 2016 01:28:53 +0000 (01:28 +0000)]
Issue #26586: Simple enhancements to BaseHTTPRequestHandler by Xiang Zhang

8 years agoIssue #26586: Merge excessive HTTP header handling from 3.5
Martin Panter [Sun, 3 Apr 2016 01:28:49 +0000 (01:28 +0000)]
Issue #26586: Merge excessive HTTP header handling from 3.5

8 years agoIssue #26586: Handle excessive header fields in http.server, by Xiang Zhang
Martin Panter [Sun, 3 Apr 2016 00:45:46 +0000 (00:45 +0000)]
Issue #26586: Handle excessive header fields in http.server, by Xiang Zhang

8 years agoIssue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants
Berker Peksag [Sat, 2 Apr 2016 01:48:46 +0000 (04:48 +0300)]
Issue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants

Patch by Robert Bachmann and SilentGhost.

8 years agoIssue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants
Berker Peksag [Sat, 2 Apr 2016 01:48:27 +0000 (04:48 +0300)]
Issue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants

Patch by Robert Bachmann and SilentGhost.

8 years agoIssue #26688: Fix module name in mock docs
Berker Peksag [Sat, 2 Apr 2016 01:32:26 +0000 (04:32 +0300)]
Issue #26688: Fix module name in mock docs

Patch by Ashley Anderson.

8 years agoIssue #26688: Fix module name in mock docs
Berker Peksag [Sat, 2 Apr 2016 01:32:06 +0000 (04:32 +0300)]
Issue #26688: Fix module name in mock docs

Patch by Ashley Anderson.

8 years agoIssue #26678: Merge datetime doc fixes from 3.5
Martin Panter [Fri, 1 Apr 2016 23:20:52 +0000 (23:20 +0000)]
Issue #26678: Merge datetime doc fixes from 3.5

8 years agoMerged documentation update from 3.5.
Vinay Sajip [Fri, 1 Apr 2016 22:13:48 +0000 (23:13 +0100)]
Merged documentation update from 3.5.

8 years agoAdded a cookbook recipe for a logging context manager.
Vinay Sajip [Fri, 1 Apr 2016 22:13:01 +0000 (23:13 +0100)]
Added a cookbook recipe for a logging context manager.

8 years agoIssue #26678: Fix indexing of datetime.tzinfo and timezone classes
Martin Panter [Fri, 1 Apr 2016 21:48:24 +0000 (21:48 +0000)]
Issue #26678: Fix indexing of datetime.tzinfo and timezone classes

Also fix links to the “tzinfo” class and attributes.

8 years agoMerge 3.5 (asyncio)
Victor Stinner [Fri, 1 Apr 2016 19:43:54 +0000 (21:43 +0200)]
Merge 3.5 (asyncio)

8 years agoasyncio: Don't log ConnectionAbortedError
Victor Stinner [Fri, 1 Apr 2016 19:43:39 +0000 (21:43 +0200)]
asyncio: Don't log ConnectionAbortedError

Issue #26509: In fatal error handlers, don't log ConnectionAbortedError which
occur on Windows.

8 years agoMerge 3.5 (asyncio)
Victor Stinner [Fri, 1 Apr 2016 19:40:14 +0000 (21:40 +0200)]
Merge 3.5 (asyncio)

8 years agoasyncio: allow None as wait timeout
Victor Stinner [Fri, 1 Apr 2016 19:39:09 +0000 (21:39 +0200)]
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.

8 years agoasyncio: sync overlapped.c with GitHub
Victor Stinner [Fri, 1 Apr 2016 19:37:41 +0000 (21:37 +0200)]
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.

8 years agoIssue #26676: Add missing XMLPullParser to ElementTree.__all__
Martin Panter [Fri, 1 Apr 2016 06:55:55 +0000 (06:55 +0000)]
Issue #26676: Add missing XMLPullParser to ElementTree.__all__

8 years agoRevert back to 3.6.0, buildbots do not want chocolate for 04-01
Ned Deily [Thu, 31 Mar 2016 23:20:03 +0000 (19:20 -0400)]
Revert back to 3.6.0, buildbots do not want chocolate for 04-01

8 years agoPython 8: no pep8, no chocolate!
Victor Stinner [Thu, 31 Mar 2016 21:30:53 +0000 (23:30 +0200)]
Python 8: no pep8, no chocolate!

8 years agoIssue #22854: Merge test fix from 3.5
Martin Panter [Thu, 31 Mar 2016 21:06:06 +0000 (21:06 +0000)]
Issue #22854: Merge test fix from 3.5

8 years agoIssue #22854: Fix logic for skipping test
Martin Panter [Thu, 31 Mar 2016 21:05:31 +0000 (21:05 +0000)]
Issue #22854: Fix logic for skipping test

8 years agoRemove redundant leading zeroes in PEP references.
Serhiy Storchaka [Thu, 31 Mar 2016 12:31:20 +0000 (15:31 +0300)]
Remove redundant leading zeroes in PEP references.

8 years agoRemove redundant leading zeroes in PEP references.
Serhiy Storchaka [Thu, 31 Mar 2016 12:30:54 +0000 (15:30 +0300)]
Remove redundant leading zeroes in PEP references.

8 years agoIssue #22854: Merge Windows pipe skipping from 3.5
Martin Panter [Thu, 31 Mar 2016 11:17:08 +0000 (11:17 +0000)]
Issue #22854: Merge Windows pipe skipping from 3.5

8 years agoIssue #22854: Skip pipe seek tests on Windows
Martin Panter [Thu, 31 Mar 2016 10:31:30 +0000 (10:31 +0000)]
Issue #22854: Skip pipe seek tests on Windows

8 years agoIssue #22854: Skip pipe seekable() tests on Windows
Martin Panter [Thu, 31 Mar 2016 10:31:30 +0000 (10:31 +0000)]
Issue #22854: Skip pipe seekable() tests on Windows

8 years agoIssue #22854: Merge UnsupportedOperation fixes from 3.5
Martin Panter [Thu, 31 Mar 2016 08:25:59 +0000 (08:25 +0000)]
Issue #22854: Merge UnsupportedOperation fixes from 3.5

8 years agoIssue #22854: Clarify documentation about UnsupportedOperation and add tests
Martin Panter [Thu, 31 Mar 2016 07:21:56 +0000 (07:21 +0000)]
Issue #22854: Clarify documentation about UnsupportedOperation and add tests

Also change BufferedReader.writable() and BufferedWriter.readable() to always
return False.

8 years agoIssue #26492: Exhausted iterator of array.array now conforms with the behavior
Serhiy Storchaka [Wed, 30 Mar 2016 18:11:16 +0000 (21:11 +0300)]
Issue #26492: Exhausted iterator of array.array now conforms with the behavior
of iterators of other mutable sequences: it lefts exhausted even if iterated
array is extended.

8 years agoIssue #26492: Added additional tests for exhausted iterators of mutable sequences.
Serhiy Storchaka [Wed, 30 Mar 2016 18:01:45 +0000 (21:01 +0300)]
Issue #26492: Added additional tests for exhausted iterators of mutable sequences.

8 years agoIssue #26492: Added additional tests for exhausted iterators of mutable sequences.
Serhiy Storchaka [Wed, 30 Mar 2016 18:01:26 +0000 (21:01 +0300)]
Issue #26492: Added additional tests for exhausted iterators of mutable sequences.

8 years agoIssue #26494: Fixed crash on iterating exhausting iterators.
Serhiy Storchaka [Wed, 30 Mar 2016 17:41:15 +0000 (20:41 +0300)]
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.

8 years agoIssue #26494: Fixed crash on iterating exhausting iterators.
Serhiy Storchaka [Wed, 30 Mar 2016 17:40:02 +0000 (20:40 +0300)]
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.

8 years agoFix typo in xml.dom.pulldom.rst
Berker Peksag [Wed, 30 Mar 2016 13:29:01 +0000 (16:29 +0300)]
Fix typo in xml.dom.pulldom.rst

Reported by Matthew Cole on docs@p.o.

8 years agoFix typo in xml.dom.pulldom.rst
Berker Peksag [Wed, 30 Mar 2016 13:28:43 +0000 (16:28 +0300)]
Fix typo in xml.dom.pulldom.rst

Reported by Matthew Cole on docs@p.o.

8 years agoIssue #26295: Enhanc test_regrtest.test_tools_script_run_tests()
Victor Stinner [Wed, 30 Mar 2016 06:51:15 +0000 (08:51 +0200)]
Issue #26295: Enhanc test_regrtest.test_tools_script_run_tests()

Pass all regrtest options, not only --testdir.

8 years agoIssue #26295: Fix test_regrtest.test_tools_buildbot_test()
Victor Stinner [Wed, 30 Mar 2016 06:38:05 +0000 (08:38 +0200)]
Issue #26295: Fix test_regrtest.test_tools_buildbot_test()

Pass also --testdir option.

8 years agoIssue #26295: test_regrtest now uses a temporary directory
Victor Stinner [Wed, 30 Mar 2016 00:33:52 +0000 (02:33 +0200)]
Issue #26295: test_regrtest now uses a temporary directory

test_forever() stores its state into the builtins module since the test module
is reloaded at each run.

Remove also warning to detect leaked tests of a previous run.

8 years agoIssue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn't
Victor Stinner [Wed, 30 Mar 2016 00:32:52 +0000 (02:32 +0200)]
Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn't
add "test." prefix to test module names.

regrtest also prepends testdir to sys.path.

8 years agoMerge 3.5 (test_urllibnet)
Victor Stinner [Wed, 30 Mar 2016 00:20:34 +0000 (02:20 +0200)]
Merge 3.5 (test_urllibnet)

8 years agotest_urllibnet: set timeout on test_fileno()
Victor Stinner [Wed, 30 Mar 2016 00:19:01 +0000 (02:19 +0200)]
test_urllibnet: set timeout on test_fileno()

Use the default timeout of 30 seconds to avoid blocking forever.

8 years agodoctest now supports packages
Victor Stinner [Tue, 29 Mar 2016 23:29:05 +0000 (01:29 +0200)]
doctest now supports packages

Issue #26641: doctest.DocFileTest and doctest.testfile() now support packages
(module splitted into multiple directories) for the package parameter.

8 years agoMerge 3.5 (test_unittest)
Victor Stinner [Tue, 29 Mar 2016 23:15:48 +0000 (01:15 +0200)]
Merge 3.5 (test_unittest)

8 years agoFix ResourceWarning in test_unittest when interrupted
Victor Stinner [Tue, 29 Mar 2016 23:15:28 +0000 (01:15 +0200)]
Fix ResourceWarning in test_unittest when interrupted

8 years agoNull merge 3.5
Victor Stinner [Tue, 29 Mar 2016 11:46:53 +0000 (13:46 +0200)]
Null merge 3.5

8 years agoIssue #25911: Backport os._DummyDirEntry fixes
Victor Stinner [Tue, 29 Mar 2016 11:38:22 +0000 (13:38 +0200)]
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).

8 years agoMerge 3.5 (regrtest)
Victor Stinner [Tue, 29 Mar 2016 11:34:06 +0000 (13:34 +0200)]
Merge 3.5 (regrtest)

8 years agoIssue #26643: Add missing shutil resources to regrtest.py
Victor Stinner [Tue, 29 Mar 2016 11:33:35 +0000 (13:33 +0200)]
Issue #26643: Add missing shutil resources to regrtest.py

8 years agoFix os._DummyDirEntry.is_symlink()
Victor Stinner [Tue, 29 Mar 2016 09:25:00 +0000 (11:25 +0200)]
Fix os._DummyDirEntry.is_symlink()

Issue #25911: Fix os._DummyDirEntry.is_symlink(), don't follow symbolic links:
use os.stat(path, follow_symlinks=False).

8 years agofix typo in comment
Victor Stinner [Tue, 29 Mar 2016 07:50:18 +0000 (09:50 +0200)]
fix typo in comment

Thanks Arfrever for the report :)

8 years agoMerge 3.5
Andrew Svetlov [Tue, 29 Mar 2016 06:39:22 +0000 (09:39 +0300)]
Merge 3.5

8 years agoDocument None as timeout for asyncio.timeout()
Andrew Svetlov [Tue, 29 Mar 2016 06:39:02 +0000 (09:39 +0300)]
Document None as timeout for asyncio.timeout()

8 years agoIssue #25314: Merge argparse doc from 3.5
Martin Panter [Mon, 28 Mar 2016 06:13:52 +0000 (06:13 +0000)]
Issue #25314: Merge argparse doc from 3.5

8 years agoIssue #23804: Merge SSL zero read fix from 3.5
Martin Panter [Mon, 28 Mar 2016 01:09:13 +0000 (01:09 +0000)]
Issue #23804: Merge SSL zero read fix from 3.5

8 years agoIssue #23804: Fix SSL recv/read(0) to not return 1024 bytes
Martin Panter [Mon, 28 Mar 2016 00:22:09 +0000 (00:22 +0000)]
Issue #23804: Fix SSL recv/read(0) to not return 1024 bytes

8 years agoIssue #26130: Remove redundant variable 's' from Parser/parser.c
Berker Peksag [Sun, 27 Mar 2016 21:45:28 +0000 (00:45 +0300)]
Issue #26130: Remove redundant variable 's' from Parser/parser.c

Patch by Oren Milman.

8 years agoIssue #25195: Fix a regression in mock.MagicMock
Berker Peksag [Sun, 27 Mar 2016 21:30:40 +0000 (00:30 +0300)]
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.

8 years agoIssue #25195: Fix a regression in mock.MagicMock
Berker Peksag [Sun, 27 Mar 2016 21:30:02 +0000 (00:30 +0300)]
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.

8 years agoIssue #23758: Improve num_params docs of create_{function,aggregate} functions
Berker Peksag [Sun, 27 Mar 2016 19:39:41 +0000 (22:39 +0300)]
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.

8 years agoIssue #23758: Improve num_params docs of create_{function,aggregate} functions
Berker Peksag [Sun, 27 Mar 2016 19:39:14 +0000 (22:39 +0300)]
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.

8 years agoDocument sqlite3.Cursor.close()
Berker Peksag [Sun, 27 Mar 2016 18:51:22 +0000 (21:51 +0300)]
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.

8 years agoDocument sqlite3.Cursor.close()
Berker Peksag [Sun, 27 Mar 2016 18:51:02 +0000 (21:51 +0300)]
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.

8 years agoregrtest: round final timing towards +inf
Victor Stinner [Sun, 27 Mar 2016 16:28:15 +0000 (18:28 +0200)]
regrtest: round final timing towards +inf

8 years agosqlite3 documentation: Connection.iterdump() is a method
Berker Peksag [Sun, 27 Mar 2016 15:46:42 +0000 (18:46 +0300)]
sqlite3 documentation: Connection.iterdump() is a method

8 years agosqlite3 documentation: Connection.iterdump() is a method
Berker Peksag [Sun, 27 Mar 2016 15:46:18 +0000 (18:46 +0300)]
sqlite3 documentation: Connection.iterdump() is a method

8 years agoIssue #26644: Merge SSL negative read fix from 3.5
Martin Panter [Sun, 27 Mar 2016 10:40:22 +0000 (10:40 +0000)]
Issue #26644: Merge SSL negative read fix from 3.5

8 years agoMoved misplaced functions to the section for C API functions.
Raymond Hettinger [Sun, 27 Mar 2016 08:15:07 +0000 (01:15 -0700)]
Moved misplaced functions to the section for C API functions.

8 years agoIssue #26644: Raise ValueError for negative SSLSocket.recv() and read()
Martin Panter [Sun, 27 Mar 2016 05:35:19 +0000 (05:35 +0000)]
Issue #26644: Raise ValueError for negative SSLSocket.recv() and read()

8 years agoIssue #25940: Use internal local server more in test_ssl
Martin Panter [Sun, 27 Mar 2016 01:53:46 +0000 (01:53 +0000)]
Issue #25940: Use internal local server more in test_ssl

Move many tests from NetworkedTests and NetworkedBIOTests to a new Simple-
BackgroundTests class, using the existing ThreadedEchoServer and SIGNED_
CERTFILE infrastructure.

For tests that cause the server to crash by rejecting its certificate,
separate them into independent test methods.

Added custom root certificate to capath with the following commands:

cp Lib/test/{pycacert.pem,capath/}
# Edit copy to remove part before certificate
c_rehash -v Lib/test/capath/
c_rehash -v -old Lib/test/capath/
# Note the generated file names
cp Lib/test/capath/{pycacert.pem,b1930218.0}
mv Lib/test/capath/{pycacert.pem,ceff1710.0}

Change to pure PEM version of SIGNING_CA because PEM_cert_to_DER_cert() does
not like the extra text at the start.

Moved test_connect_ex_error() into BasicSocketTests and rewrote it to connect
to a reserved localhost port.

NetworkedTests.test_get_server_certificate_ipv6() split out because it needs
to connect to an IPv6 DNS address.

The only reference left to self-signed.pythontest.net is test_timeout_
connect_ex(), which needs a remote server to reliably time out the
connection, but does not rely on the server running SSL.

Made ThreadedEchoServer call unwrap() by default when it sees the client has
shut the connection down, so that the client can cleanly call unwrap().

8 years agoResponsibility for argument checking belongs in set.__init__() rather than set.__new__().
Raymond Hettinger [Sat, 26 Mar 2016 11:10:11 +0000 (04:10 -0700)]
Responsibility for argument checking belongs in set.__init__() rather than set.__new__().

See dict.__new__() and list.__new__() for comparison.  Neither of those examine or touch
args or kwds.  That work is done in the __init__() methods.

8 years agoMinor code cleanup for PyArg_UnpackTuple.
Raymond Hettinger [Sat, 26 Mar 2016 10:02:48 +0000 (03:02 -0700)]
Minor code cleanup for PyArg_UnpackTuple.

8 years agoIssue #25911: more info on test_os failure
Victor Stinner [Sat, 26 Mar 2016 00:12:36 +0000 (01:12 +0100)]
Issue #25911: more info on test_os failure

8 years agomakeopcodetargets.py: we need to import Lib/opcode.py
Victor Stinner [Sat, 26 Mar 2016 00:04:37 +0000 (01:04 +0100)]
makeopcodetargets.py: we need to import Lib/opcode.py

Issue #20021: use importlib.machinery to import Lib/opcode.py and not an opcode
module coming from somewhere else. makeopcodetargets.py is part of the Python
build process and it is run by an external Python program, not the built Python
program.

Patch written by Serhiy Storchaka.

8 years agoNull merge 3.5
Victor Stinner [Fri, 25 Mar 2016 22:02:54 +0000 (23:02 +0100)]
Null merge 3.5

8 years agoFix test_os.test_symlink(): remove create symlink
Victor Stinner [Fri, 25 Mar 2016 21:51:17 +0000 (22:51 +0100)]
Fix test_os.test_symlink(): remove create symlink

8 years agomerge
Alexander Belopolsky [Fri, 25 Mar 2016 19:46:55 +0000 (15:46 -0400)]
merge

8 years agoIssue#26616:Fixed a bug in datetime.astimezone() method.
Alexander Belopolsky [Fri, 25 Mar 2016 19:42:59 +0000 (15:42 -0400)]
Issue#26616:Fixed a bug in datetime.astimezone() method.

8 years agoBacked out changeset 245a16f33c4b
Victor Stinner [Fri, 25 Mar 2016 18:13:06 +0000 (19:13 +0100)]
Backed out changeset 245a16f33c4b

Serhiy asked me to review it.

8 years agoRework libregrtest.save_env
Victor Stinner [Fri, 25 Mar 2016 16:36:33 +0000 (17:36 +0100)]
Rework libregrtest.save_env

* Replace get/restore methods with a Resource class and Resource subclasses
* Create ModuleAttr, ModuleAttrList and ModuleAttrDict helper classes
* Use __subclasses__() to get resource classes instead of using an hardcoded
  list (2 shutil resources were missinged in the list!)
* Don't define MultiprocessingProcessDangling resource if the multiprocessing
  module is missing
* Nicer diff for dictionaries. Useful for the big os.environ dict
* Reorder code to group resources

8 years agochangeset: 100749:0b61b2d28a07
Victor Stinner [Fri, 25 Mar 2016 14:12:08 +0000 (15:12 +0100)]
changeset: 100749:0b61b2d28a07
tag: tip
parent: 100742:ebae81b31cf6
user: Victor Stinner <victor.stinner@gmail.com>
date: Fri Mar 25 15:03:34 2016 +0100
files: Lib/test/test_os.py
description:
test_os: Win32ErrorTests checks if file exists

Don't use os.path.exists() since it ignores *any* OSError.