Commit Graph

96797 Commits

Author SHA1 Message Date
Martin Panter bb8b1cb6af Issue #27348: Restore “Exception: None” formatting in traceback module
This fixes a regression caused by revision 73afda5a4e4c. Also reverts the
decimal test workaround added in revision 5f3dd0a2b1ab.

Remove test_without_exception(). According to revision ecaafc32c500, this was
added in Python 2 so that print_exc() would output “None” when called with no
exception set. However print_exc() never worked like this in Python 3, and
the use case is not documented.

Restore TracebackCases class name (instead of SyntaxTracebackCases), because
the class also tests other exceptions.
2016-09-22 09:37:39 +00:00
Serhiy Storchaka e3d504090c Extend the test to lower pickle protocols. 2016-09-22 11:42:38 +03:00
Serhiy Storchaka 92bb90a9ff Extend the test to lower pickle protocols. 2016-09-22 11:39:25 +03:00
Berker Peksag b3d4e7fe71 Issue #25651: Merge from 3.5 2016-09-21 19:35:28 +03:00
Berker Peksag 16ea19fc66 Issue #25651: Allow falsy values to be used for msg parameter of subTest() 2016-09-21 19:34:15 +03:00
Serhiy Storchaka 349f552507 Merge heads 2016-09-21 15:56:57 +03:00
Christian Heimes 79f9d4ff97 lcov: ignore more 3rd party code and internal test/debug/dummy files 2016-09-21 14:55:43 +02:00
Serhiy Storchaka afd02a439f Issue #28214: Now __set_name__ is looked up on the class instead of the
instance.
2016-09-21 15:54:59 +03:00
Christian Heimes b00e00c339 Don't define PY_WITH_KECCAK 2016-09-21 14:36:44 +02:00
Victor Stinner 44f4874e68 Merge 3.5 2016-09-21 14:13:53 +02:00
Victor Stinner 1ddf53d496 Fix PyUnicode_FromFormatV() error handling
Issue #28233: Fix a memory leak if the format string contains a non-ASCII
character, destroy the unicode writer.
2016-09-21 14:13:14 +02:00
Christian Heimes 2f2fee19ec va_end() all va_copy()ed va_lists. 2016-09-21 11:37:27 +02:00
Victor Stinner 1c56bf0bad Merge 3.5 2016-09-21 09:16:31 +02:00
Victor Stinner 0256f42839 test_asynico: fix test_sock_connect_sock_write_race()
Issue #28176: Increase timeout from 10 seconds to 60 seconds.
2016-09-21 09:15:36 +02:00
Benjamin Peterson 0c21214f3e replace usage of Py_VA_COPY with the (C99) standard va_copy 2016-09-20 20:39:33 -07:00
Victor Stinner ec2319c46d Fix memleak in os.getrandom()
Issue #27778: Fix a memory leak in os.getrandom() when the getrandom() is
interrupted by a signal and a signal handler raises a Python exception.

Modify also os_getrandom_impl() to avoid the temporary buffer, use directly a
Python bytes object.
2016-09-20 23:00:59 +02:00
Victor Stinner 75024c6589 (Merge 3.5) Catch EPERM error in py_getrandom()
Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
syscall fails with EPERM, for example when blocked by SECCOMP.
2016-09-20 22:49:52 +02:00
Victor Stinner 6d8bc46cc0 Catch EPERM error in py_getrandom()
Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
syscall fails with EPERM, for example when blocked by SECCOMP.
2016-09-20 22:46:02 +02:00
Victor Stinner af59732102 Cleanup random.c
Issue #27955: modify py_getrnadom() and dev_urandom()

* Add comments from Python 3.7
* PEP 7 style: add {...}
2016-09-20 22:26:18 +02:00
Ned Deily 7582bcaa8f Make 3.7 the current dev version in the html version of the docs. 2016-09-20 15:00:53 -04:00
Ned Deily a327331cec Make 3.7 the current dev version in the html version of the docs. 2016-09-20 15:00:07 -04:00
Benjamin Peterson 8ac46c972f revert expat changes 2016-09-19 22:20:13 -07:00
Benjamin Peterson e2e792d98f merge 3.5 (#28184) 2016-09-19 22:17:16 -07:00
Benjamin Peterson 918aa89483 remove trailing whitespace 2016-09-19 22:16:36 -07:00
Jesus Cea 1daf6da2c8 MERGE: Docs: Correctly link to the methods 2016-09-20 00:02:44 +02:00
Jesus Cea 647680ec2c Docs: Correctly link to the methods 2016-09-20 00:01:53 +02:00
Victor Stinner 26c03bd7d5 Fix memory leak in path_converter()
Issue #28200: Replace PyUnicode_AsWideCharString() with
PyUnicode_AsUnicodeAndSize().
2016-09-19 11:55:44 +02:00
Benjamin Peterson 286987bbac delete dead code 2016-09-18 23:49:51 -07:00
Benjamin Peterson f5e8e8fc2b merge 3.5 (#24022) 2016-09-18 23:44:02 -07:00
Benjamin Peterson 57bda335e1 merge 3.4 2016-09-18 23:43:18 -07:00
Benjamin Peterson 26d998cfdd properly handle the single null-byte file (closes #24022) 2016-09-18 23:41:11 -07:00
Raymond Hettinger 6692f01c91 merge 2016-09-18 21:46:08 -07:00
Raymond Hettinger 7eb1becc25 Issue #28189: dictitems_contains no longer swallows compare errors.
(Patch by Xiang Zhang)
2016-09-18 21:45:11 -07:00
Raymond Hettinger 5820f3a381 Issue #28193: Use lru_cache in the re module. 2016-09-18 20:17:21 -07:00
Benjamin Peterson 5d4b09c106 correct silly spelling problem 2016-09-18 19:24:52 -07:00
Benjamin Peterson 19517e4da7 replace obmalloc's homegrown uptr and uchar types with standard ones 2016-09-18 19:22:22 -07:00
Benjamin Peterson 3924f93794 improvements to code that checks whether Python (obmalloc) allocated an address
- Rename Py_ADDRESS_IN_RANGE to address_in_range and make it a static
  function instead of macro. Any compiler worth its salt will inline this
  function.
- Remove the duplicated function version of Py_ADDRESS_IN_RANGE used when memory
  analysis was active. Instead, we can simply mark address_in_range as allergic
  to dynamic memory checking. We can now remove the
  __attribute__((no_address_safety_analysis)) from _PyObject_Free and
  _PyObject_Realloc. All the badness is contained in address_in_range now.
- Fix the code that tried to only read pool->arenaindex once. Putting something
  in a variable is no guarantee that it won't be read multiple times. We must
  use volatile for that.
2016-09-18 19:12:48 -07:00
Benjamin Peterson ac965ca16c stop using Py_LL and Py_ULL 2016-09-18 18:12:21 -07:00
Benjamin Peterson 41e35f37ed always define HAVE_LONG_LONG (#27961) 2016-09-18 18:02:58 -07:00
Benjamin Peterson 9ac11a752a properly free memory in pgen 2016-09-18 18:00:25 -07:00
Victor Stinner 254ad58c07 Fix test_huntrleaks_fd_leak() of test_regrtest
Issue #28195: Don't expect the fd leak message to be on a specific line number,
just make sure that the line is present in the output.
2016-09-19 00:11:30 +02:00
Ethan Furman 3515dcce80 issue23591: fix flag decomposition and repr 2016-09-18 13:15:41 -07:00
Berker Peksag 9a7bbb2e3f Issue #25400: RobotFileParser now correctly returns default values for crawl_delay and request_rate
Initial patch by Peter Wirtz.
2016-09-18 20:17:58 +03:00
Christian Heimes 85c98bf968 Issue #26661: setup.py now detects system libffi with multiarch wrapper. 2016-09-18 14:34:13 +02:00
Christian Heimes 96b2dd5997 Issue #26661: setup.py now detects system libffi with multiarch wrapper. 2016-09-18 14:33:30 +02:00
Berker Peksag 44efa8aa0b Null merge from 3.5 2016-09-18 14:53:12 +03:00
Berker Peksag 5a5ae745ff Issue #26610: Skip test_with_pip if _ctypes is not available in OpenIndiana 2016-09-18 14:52:25 +03:00
Berker Peksag b66df15a86 Null merge from 3.5 2016-09-18 13:57:40 +03:00
Berker Peksag bf3c1c3235 Issue #28075: Fix test_access_denied in Python 3.5
I forgot there two variations of os.stat() in Python 3.5.
2016-09-18 13:56:29 +03:00
Berker Peksag 2a8d7f1c47 Issue #28151: Use pythontest.net in test_robotparser 2016-09-18 11:21:57 +03:00