]> granicus.if.org Git - python/log
python
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.

8 years agoMerge 3.5
Victor Stinner [Fri, 25 Mar 2016 11:50:54 +0000 (12:50 +0100)]
Merge 3.5

8 years agodoctest: fix _module_relative_path() error message
Victor Stinner [Fri, 25 Mar 2016 11:50:36 +0000 (12:50 +0100)]
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).

8 years agotest_doctest: remove unused imports
Victor Stinner [Fri, 25 Mar 2016 11:48:17 +0000 (12:48 +0100)]
test_doctest: remove unused imports

8 years agotest_venv: enhance test_devnull()
Victor Stinner [Fri, 25 Mar 2016 11:30:40 +0000 (12:30 +0100)]
test_venv: enhance test_devnull()

8 years agoSkip test_venv.test_with_pip() if ctypes miss
Victor Stinner [Fri, 25 Mar 2016 11:27:02 +0000 (12:27 +0100)]
Skip test_venv.test_with_pip() if ctypes miss

Issue #26610.

8 years agoModernize Python/makeopcodetargets.py
Victor Stinner [Fri, 25 Mar 2016 10:54:47 +0000 (11:54 +0100)]
Modernize Python/makeopcodetargets.py

* Simply use "import opcode" to import the opcode module instead of tricks
  using the imp module
* Use context manager for the output file
* Move code into a new main() function
* Replace assert with a regular if to check the number of arguments
* Import modules at top level

8 years agotest_os: Win32ErrorTests now ensures that TESTFN doesn't exist
Victor Stinner [Fri, 25 Mar 2016 09:28:23 +0000 (10:28 +0100)]
test_os: Win32ErrorTests now ensures that TESTFN doesn't exist

Replace also other open(filename, "w") with open(filename, "x") to fail if a
previous test forgot to remove filename.

8 years agoSpeed-up construction of empty sets by approx 12-14%.
Raymond Hettinger [Fri, 25 Mar 2016 09:29:59 +0000 (02:29 -0700)]
Speed-up construction of empty sets by approx 12-14%.

8 years agoNull merge 3.5
Victor Stinner [Fri, 25 Mar 2016 09:03:49 +0000 (10:03 +0100)]
Null merge 3.5

Changes were backported (transplated) from default to 3.5.

8 years agoIssue #21925: Fix test_warnings for release mode
Victor Stinner [Fri, 25 Mar 2016 08:51:14 +0000 (09:51 +0100)]
Issue #21925: Fix test_warnings for release mode

Use -Wd comment line option to log the ResourceWarning.

8 years agoIssue #25654:
Victor Stinner [Fri, 25 Mar 2016 08:29:50 +0000 (09:29 +0100)]
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.

8 years agoIssue #21925: Fix test_warnings for release mode
Victor Stinner [Fri, 25 Mar 2016 08:51:14 +0000 (09:51 +0100)]
Issue #21925: Fix test_warnings for release mode

Use -Wd comment line option to log the ResourceWarning.

8 years agoIssue #25654:
Victor Stinner [Fri, 25 Mar 2016 08:29:50 +0000 (09:29 +0100)]
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.

8 years agotest_io: ignore DeprecationWarning on bytes path on Windows
Victor Stinner [Fri, 25 Mar 2016 08:07:07 +0000 (09:07 +0100)]
test_io: ignore DeprecationWarning on bytes path on Windows

8 years agoIssue #26637: Fix test_io
Victor Stinner [Fri, 25 Mar 2016 07:57:16 +0000 (08:57 +0100)]
Issue #26637: Fix test_io

The import machinery now raises a different exception when it fails at Python
shutdown.

8 years agoremove duplicated check for fractions and complex numbers (closes #26076)
Benjamin Peterson [Fri, 25 Mar 2016 05:43:23 +0000 (22:43 -0700)]
remove duplicated check for fractions and complex numbers (closes #26076)

Patch by Oren Milman.

8 years agoFix a few typos
Zachary Ware [Fri, 25 Mar 2016 03:45:00 +0000 (22:45 -0500)]
Fix a few typos

8 years agoDon't doc check the venv dir
Zachary Ware [Fri, 25 Mar 2016 03:44:41 +0000 (22:44 -0500)]
Don't doc check the venv dir

8 years agoMerge 3.5 (pystate.h)
Victor Stinner [Fri, 25 Mar 2016 00:26:35 +0000 (01:26 +0100)]
Merge 3.5 (pystate.h)

8 years agopystate.h: fix _PyThreadState_UncheckedGet()
Victor Stinner [Thu, 24 Mar 2016 23:54:18 +0000 (00:54 +0100)]
pystate.h: fix _PyThreadState_UncheckedGet()

Declare the function even if thread support is disabled.

8 years agoFix bug in __import__ during Python shutdown
Victor Stinner [Thu, 24 Mar 2016 23:40:59 +0000 (00:40 +0100)]
Fix bug in __import__ during Python shutdown

Issue #26637: The importlib module now emits an ImportError rather than a
TypeError if __import__() is tried during the Python shutdown process but
sys.path is already cleared (set to None).

8 years agoMerge 3.5
Victor Stinner [Thu, 24 Mar 2016 23:33:12 +0000 (00:33 +0100)]
Merge 3.5

Issue #21925: warnings.formatwarning() now catches exceptions when calling
linecache.getline() and tracemalloc.get_object_traceback() to be able to log
ResourceWarning emitted late during the Python shutdown process.

8 years agowarnings.formatwarning(): catch exceptions
Victor Stinner [Thu, 24 Mar 2016 23:30:32 +0000 (00:30 +0100)]
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.

8 years agoFix test_warnings.test_improper_option()
Victor Stinner [Thu, 24 Mar 2016 23:28:56 +0000 (00:28 +0100)]
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.

8 years agoCleanup regrtest "main()" function
Victor Stinner [Thu, 24 Mar 2016 16:53:20 +0000 (17:53 +0100)]
Cleanup regrtest "main()" function

* Rename libregrtest.main_in_temp_cwd() to libregrtest.main()
* Add regrtest.main_in_temp_cwd() alias to libregrtest.main()
* Move old main_in_temp_cwd() code into libregrtest.Regrtest.main()
* Update multiple scripts to call libregrtest.main()

8 years agort.bat: use -m test instead of Lib\test\regrtest.py
Victor Stinner [Thu, 24 Mar 2016 16:46:24 +0000 (17:46 +0100)]
rt.bat: use -m test instead of Lib\test\regrtest.py

8 years agoCleanup regrtest.py
Victor Stinner [Thu, 24 Mar 2016 16:43:53 +0000 (17:43 +0100)]
Cleanup regrtest.py

* Move code into a new _main() function
* Fix loop to cleanup sys.path
* Remove unused import

8 years agosupport.temp_dir(): call support.rmtree() instead of shutil.rmtree()
Victor Stinner [Thu, 24 Mar 2016 16:42:10 +0000 (17:42 +0100)]
support.temp_dir(): call support.rmtree() instead of shutil.rmtree()

8 years agotest_os: use support.rmtree() to cleanup WalkTests
Victor Stinner [Thu, 24 Mar 2016 16:21:17 +0000 (17:21 +0100)]
test_os: use support.rmtree() to cleanup WalkTests

8 years agoEnhance and modernize test_os
Victor Stinner [Thu, 24 Mar 2016 16:12:55 +0000 (17:12 +0100)]
Enhance and modernize test_os

* add create_file() helper function
* create files using "x" mode instead of "w" to detect when a previous test
  forget to remove a file
* open file for writing in unbuferred mode (buffering=0)
* replace "try/finally: unlink" with self.addCleanup(support.unlink)
* register unlink cleanup function *before* creating new files

8 years agotest_os: use @support.requires_linux_version
Victor Stinner [Thu, 24 Mar 2016 15:50:41 +0000 (16:50 +0100)]
test_os: use @support.requires_linux_version

8 years agoCloses #26620: Fix ResourceWarning in test_urllib2_localnet
Victor Stinner [Thu, 24 Mar 2016 12:55:58 +0000 (13:55 +0100)]
Closes #26620: Fix ResourceWarning in test_urllib2_localnet

* Use context manager on urllib objects to ensure that they are closed on error
* Use self.addCleanup() to cleanup resources even if a test is interrupted
  with CTRL+c

8 years agoEnhance and modernize test_genericpath
Victor Stinner [Thu, 24 Mar 2016 12:44:19 +0000 (13:44 +0100)]
Enhance and modernize test_genericpath

* Replace "try/finally: os.remove()" with self.addCleanup(support.unlink) or
  self.addCleanup(support.rmdir): the support function handles the case when
  the file doesn't exist
* Replace "try/finally: f.close()" with "with open(...) as f:"
* test_getsize: add a second test with a different size
* Create file using "x" mode to ensure that the file didn't exist before, to
  detect bugs in tests
* Open files in unbuffered mode (buferring=0) to write immediatly data on disk
* Replace map() with simpler code
* Split isdir() unit test into two units tests to make them less dependant,
  same change for isfile() test
* test_samefile(): test also two different files

8 years agoEnhance os._DummyDirEntry
Victor Stinner [Thu, 24 Mar 2016 11:23:18 +0000 (12:23 +0100)]
Enhance os._DummyDirEntry

Issue #25911:

* Try to fix test_os.BytesWalkTests on Windows
* Try to mimick better the reference os.DirEntry on Windows
* _DummyDirEntry now caches os.stat() result
* _DummyDirEntry constructor now tries to get os.stat()

8 years agoregrtest: when parallel tests are interrupted, display progress
Victor Stinner [Thu, 24 Mar 2016 11:04:15 +0000 (12:04 +0100)]
regrtest: when parallel tests are interrupted, display progress

8 years agoregrtest: mention in tests run sequentially or in parallel
Victor Stinner [Thu, 24 Mar 2016 10:55:29 +0000 (11:55 +0100)]
regrtest: mention in tests run sequentially or in parallel

8 years agoregrtest: fix --fromfile feature
Victor Stinner [Thu, 24 Mar 2016 08:43:00 +0000 (09:43 +0100)]
regrtest: fix --fromfile feature

* Update code for the name regrtest output format.
* Enhance also test_regrtest test on --fromfile

8 years agoFix DeprecationWarning on Windows
Victor Stinner [Thu, 24 Mar 2016 08:11:48 +0000 (09:11 +0100)]
Fix DeprecationWarning on Windows

Issue #25911: Use support.check_warnings() to expect or ignore
DeprecationWarning in test_os.

8 years ago_tracemalloc: use compact key for traces
Victor Stinner [Wed, 23 Mar 2016 21:03:55 +0000 (22:03 +0100)]
_tracemalloc: use compact key for traces

Issue #26588: Optimize memory footprint of _tracemalloc before non-zero domain
is used. Start with compact key (Py_uintptr_t) and also switch to pointer_t key
when the first memory block with a non-zero domain is tracked.

8 years agosocketmodule.c: error if option larger than INT_MAX
Victor Stinner [Wed, 23 Mar 2016 20:35:29 +0000 (21:35 +0100)]
socketmodule.c: error if option larger than INT_MAX

On Windows, socket.setsockopt() raises an OverflowError if the socket option is
larger than INT_MAX bytes.

8 years agoFix test_spwd on OpenIndiana
Victor Stinner [Wed, 23 Mar 2016 20:15:55 +0000 (21:15 +0100)]
Fix test_spwd on OpenIndiana

Issue #18787: restore "bin" name in test_spwd but catch KeyError.

8 years agoTry to fix test_gdb on s390x SLES 3.x
Victor Stinner [Wed, 23 Mar 2016 20:08:25 +0000 (21:08 +0100)]
Try to fix test_gdb on s390x SLES 3.x

Ignore empty lines in stderr.

8 years agoNull merge.
Stefan Krah [Wed, 23 Mar 2016 19:53:47 +0000 (20:53 +0100)]
Null merge.

8 years agoIssue #26621: Remove unnecessary test.
Stefan Krah [Wed, 23 Mar 2016 19:53:22 +0000 (20:53 +0100)]
Issue #26621: Remove unnecessary test.

8 years agoIssue #26621: Update libmpdec version and remove unnecessary test case.
Stefan Krah [Wed, 23 Mar 2016 19:50:10 +0000 (20:50 +0100)]
Issue #26621: Update libmpdec version and remove unnecessary test case.

8 years agoTry to fix test_spwd on OpenIndiana
Victor Stinner [Wed, 23 Mar 2016 17:45:55 +0000 (18:45 +0100)]
Try to fix test_spwd on OpenIndiana

Issue #18787: try to get the "root" entry which should exist on all UNIX
instead of "bin" which doesn't exist on OpenIndiana.

8 years agoMerge heads
Terry Jan Reedy [Wed, 23 Mar 2016 17:40:14 +0000 (13:40 -0400)]
Merge heads

8 years agoMerge heads
Terry Jan Reedy [Wed, 23 Mar 2016 17:39:18 +0000 (13:39 -0400)]
Merge heads

8 years agoIssue #23848: Fix usage of _Py_DumpDecimal()
Victor Stinner [Wed, 23 Mar 2016 17:37:54 +0000 (18:37 +0100)]
Issue #23848: Fix usage of _Py_DumpDecimal()

8 years agoMerge with 3.5
Terry Jan Reedy [Wed, 23 Mar 2016 17:37:15 +0000 (13:37 -0400)]
Merge with 3.5

8 years agolongobject.c: fix compilation warning on Windows 64-bit
Victor Stinner [Wed, 23 Mar 2016 17:36:54 +0000 (18:36 +0100)]
longobject.c: fix compilation warning on Windows 64-bit

We know that Py_SIZE(b) is -1 or 1 an so fits into the sdigit type.

8 years agoIssue #26525: Change chr example to match change in ord example.
Terry Jan Reedy [Wed, 23 Mar 2016 17:36:52 +0000 (13:36 -0400)]
Issue #26525: Change chr example to match change in ord example.

8 years agoTry to fix test_gdb on s390x buildbots
Victor Stinner [Wed, 23 Mar 2016 17:32:54 +0000 (18:32 +0100)]
Try to fix test_gdb on s390x buildbots

8 years agoget_warnings_attr(): Fix coverity warning
Victor Stinner [Wed, 23 Mar 2016 16:48:22 +0000 (17:48 +0100)]
get_warnings_attr(): Fix coverity warning

Don't check if the dict key exists before getting the key. Instead get the key
and handle error.

8 years agoFix typo in doc: avoid the french "& cie" :-)
Victor Stinner [Wed, 23 Mar 2016 15:57:51 +0000 (16:57 +0100)]
Fix typo in doc: avoid the french "& cie" :-)

8 years agoRework _Py_DumpASCII() to make Coverity happy
Victor Stinner [Wed, 23 Mar 2016 15:10:07 +0000 (16:10 +0100)]
Rework _Py_DumpASCII() to make Coverity happy

8 years agoIssue #23848: Try to fix test_faulthandler on ARM
Victor Stinner [Wed, 23 Mar 2016 14:19:12 +0000 (15:19 +0100)]
Issue #23848: Try to fix test_faulthandler on ARM

Restore the previous code for stack_overflow().

8 years agofaulthandler: only log fatal exceptions
Victor Stinner [Wed, 23 Mar 2016 13:44:14 +0000 (14:44 +0100)]
faulthandler: only log fatal exceptions

Issue #23848, #26622:

* faulthandler now only logs fatal Windows exceptions.
* write error code as decimal, not as hexadecimal
* replace "Windows exception" with "Windows fatal exception"

8 years agoMerge 3.5
doko@ubuntu.com [Wed, 23 Mar 2016 11:58:00 +0000 (12:58 +0100)]
Merge 3.5

8 years agoMakefile.pre.in (profile-opt): Fix bashism.
doko@ubuntu.com [Wed, 23 Mar 2016 11:57:29 +0000 (12:57 +0100)]
Makefile.pre.in (profile-opt): Fix bashism.

8 years agoBuildbots: change also Windows timeout from 1 hour to 15 min
Victor Stinner [Wed, 23 Mar 2016 11:38:01 +0000 (12:38 +0100)]
Buildbots: change also Windows timeout from 1 hour to 15 min

8 years agoregrtest: display test duration in sequential mode
Victor Stinner [Wed, 23 Mar 2016 11:14:10 +0000 (12:14 +0100)]
regrtest: display test duration in sequential mode

Only display duration if a test takes more than 30 seconds.

8 years ago_msi.c: try to fix compiler warnings
Victor Stinner [Wed, 23 Mar 2016 10:37:41 +0000 (11:37 +0100)]
_msi.c: try to fix compiler warnings

8 years agocompiler.c: fix compiler warnings on Windows
Victor Stinner [Wed, 23 Mar 2016 10:36:19 +0000 (11:36 +0100)]
compiler.c: fix compiler warnings on Windows

8 years agogetpathp.c: fix compiler warning
Victor Stinner [Wed, 23 Mar 2016 10:31:58 +0000 (11:31 +0100)]
getpathp.c: fix compiler warning

wcsnlen_s() result type is size_t.

8 years ago_PyMem_DebugFree(): fix compiler warning on Windows
Victor Stinner [Wed, 23 Mar 2016 10:30:43 +0000 (11:30 +0100)]
_PyMem_DebugFree(): fix compiler warning on Windows

Don't return a void value.

8 years agofaulthandler: add Windows exception handler
Victor Stinner [Wed, 23 Mar 2016 09:39:17 +0000 (10:39 +0100)]
faulthandler: add Windows exception handler

Issue #23848: On Windows, faulthandler.enable() now also installs an exception
handler to dump the traceback of all Python threads on any Windows exception,
not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).

8 years agoIssue #23848: Expose _Py_DumpHexadecimal()
Victor Stinner [Wed, 23 Mar 2016 09:32:26 +0000 (10:32 +0100)]
Issue #23848: Expose _Py_DumpHexadecimal()

This function will be reused by faulthandler.

8 years agoCleanup hashtable.h
Victor Stinner [Wed, 23 Mar 2016 08:52:13 +0000 (09:52 +0100)]
Cleanup hashtable.h

Issue #26588:

* Pass the hash table rather than the key size to hash and compare functions
* _Py_HASHTABLE_READ_KEY() and _Py_HASHTABLE_ENTRY_READ_KEY() macros now expect
  the hash table as the first parameter, rather than the key size
* tracemalloc_get_traces_fill(): use _Py_HASHTABLE_ENTRY_READ_DATA() rather
  than pointer dereference
* Remove the _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro
* Move "PKEY" and "PDATA" macros inside hashtable.c