Commit graph

98528 commits

Author SHA1 Message Date
Victor Stinner
7d6ddb96b3 bpo-28129: fix ctypes crashes (#386) (#3799)
* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy

* added the rest of tests and patches. probably only a first draft.

* removed trailing spaces

* replace ctype with ctypes in error messages

* change back from ctypes instance to ctype instance

(cherry picked from commit 1bea762d9e)
2017-09-28 07:32:11 -07:00
Miss Islington (bot)
ec3d34c5b2 [3.6] bpo-31536: Avoid wholesale rebuild after make regen-all (GH-3678) (#3797)
bpo-31536: Avoid wholesale rebuild after `make regen-all`
2017-09-28 13:21:32 +02:00
Serhiy Storchaka
befc956acf [3.6] bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. (GH-3596) (#3794)
(cherry picked from commit d780b2d588)
2017-09-28 12:17:51 +03:00
Benjamin Peterson
68b131d5b6 [3.6] closes bpo-22140: Prevent double substitution of prefix in python-config.sh (GH-3769) (#3793)
Fix the logic in python-config.sh to avoid attempting to substitute
prefix in a variable that might have already been subject to
substitution. This e.g. happened if @exec_prefix@ was defined as
"${prefix}" (which is the default of the configure script) -- in which
case the exec_prefix_build variable was initialized with
already-subtituted prefix, and then another round of substitution was
performed which might have resulted in duplicate prefix.

To avoid that, rename the variables so that the variables matching
likely configure names (prefix, exec_prefix) retain their original
values and a '_real' suffix is used for the real values of prefix.

Furthermore, replace the unnecessary prefix and exec_prefix
substitutions with direct prefix_real references since the sed
always replaced the whole string anyway by design.
(cherry picked from commit 14086cfc5e)
2017-09-27 20:27:41 -07:00
Miss Islington (bot)
084f80b82c [3.6] bpo-31588: Validate return value of __prepare__() methods (GH-3790)
Class execution requires that __prepare__() methods return
a proper execution namespace. Check for that immediately
after calling __prepare__(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).

Patch by Oren Milman.
(cherry picked from commit 5837d0418f)
2017-09-28 02:21:33 +10:00
Victor Stinner
fdcf3e9629 bpo-31593: test_socketserver waits child processes (#3766) 2017-09-27 02:21:12 -07:00
Serhiy Storchaka
02c3cdcef8 [3.6] bpo-25532: Protect against infinite loops in inspect.unwrap() (GH-1717) (#3778)
Some objects (like test mocks) auto-generate new objects on
attribute access, which can lead to an infinite loop in
inspect.unwrap().

Ensuring references are retained to otherwise temporary objects
and capping the size of the memo dict turns this case into a
conventional exception instead..
(cherry picked from commit f9169ce6b4)
2017-09-27 09:34:44 +03:00
Miss Islington (bot)
680429b133 [3.6] point to the module-level get_ident function rather than the one in _thread (GH-3782) (#3783)
(cherry picked from commit 236329ed9f)
2017-09-26 23:17:51 -07:00
Miss Islington (bot)
7c24e99c99 [3.6] bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() received a bad encoder() argument. (GH-3643) (#3777)
(cherry picked from commit 2b382dd612)
2017-09-27 08:21:47 +03:00
Serhiy Storchaka
90fe25a051 [3.6] bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (GH-3219) (#3775)
(cherry picked from commit 91fb0afe18)
2017-09-27 07:38:03 +03:00
Miss Islington (bot)
bdb215b18a [3.6] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3774)
(cherry picked from commit 30b61b51e0)
2017-09-27 07:37:37 +03:00
Serhiy Storchaka
f0db2dfda7 [3.6] bpo-31492: Fix assertion failures in case of a module with a bad __name__ attribute. (GH-3620). (#3773)
(cherry picked from commit 6db7033192)
2017-09-27 07:33:00 +03:00
Miss Islington (bot)
a1c49f6f09 [3.6] bpo-31586: Use _count_element fast path for real dicts. (#3776)
(cherry picked from commit 31aca4bf79)
2017-09-26 20:45:57 -07:00
Miss Islington (bot)
69b2dc8637 [3.6] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557) (#3770)
(cherry picked from commit c740e4fe8a)
2017-09-26 22:20:22 +03:00
Serhiy Storchaka
d6a356209a [3.6] bpo-31579: Fixed a possible leak in enumerate() with large indices. (GH-3753). (#3760)
(cherry picked from commit 0e950dd22b)
2017-09-26 09:11:34 +03:00
Miss Islington (bot)
26b940f762 bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691) (GH-3754)
- Remove the second mention about the `u` prefix
- Remove the second mention about numeric literals do not include a sign
(cherry picked from commit 4a2d00cb45)
2017-09-25 16:23:33 -07:00
Victor Stinner
ad051cbce1 bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) (#3746)
Non-regression tests for the Expat 2.2.3 UTF-8 decoder bug.

(cherry picked from commit e6d9fcbb8d)
2017-09-25 02:00:04 -07:00
Miss Islington (bot)
a6bddb8e43 [3.6] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254) (#3743)
(cherry picked from commit 57c2561c8c)
2017-09-25 11:49:08 +03:00
Miss Islington (bot)
e2a30cd35b [3.6] bpo-27385: Clarify docstring for groupby() (GH-3738) (#3744)
(cherry picked from commit 49392c63a2)
2017-09-25 01:41:49 -07:00
Miss Islington (bot)
73c915a5cd [3.6] bpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (GH-3739) (#3742)
(cherry picked from commit 0d4497b9ca)
2017-09-25 01:11:21 -07:00
Miss Islington (bot)
01438ed4c2 [3.6] bpo-18558: Clarify glossary entry for "Iterable" (GH-3732) (#3741)
(cherry picked from commit 0bf287b6e0)
2017-09-25 00:57:24 -07:00
Miss Islington (bot)
d38caf68bb [3.6] bpo-30085: Improve documentation for operator (GH-1171) (#3736)
The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
(cherry picked from commit 5b9299d8c7)
2017-09-24 17:13:15 -04:00
Miss Islington (bot)
415cc1fa57 [3.6] bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__ global. (GH-3717) (#3730)
(cherry picked from commit 5d3e80021a)
2017-09-24 23:14:41 +03:00
Miss Islington (bot)
ce418bf822 bpo-31570: Update Email library documentation example (GH-3720) (GH-3721)
A `"` was missing from an `<a href>` tag.
(cherry picked from commit 8337239d79)
2017-09-24 09:18:50 -07:00
Miss Islington (bot)
e31eca45e5 [3.6] bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (GH-3667) (#3719)
Defer removing old behavior to 3.8.
Document new feature of selection_set() and friends.
(cherry picked from commit 2fad102354)
2017-09-24 15:03:48 +03:00
Miss Islington (bot)
018e6b9f69 bpo-31564: Update typing documentation (GH-3696) (GH-3715)
Mention that ``NewType`` can derive from another ``NewType``.
(cherry picked from commit 039b25d8fd)
2017-09-23 19:46:24 -07:00
Miss Islington (bot)
7e32cee1a6 [3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3714)
(cherry picked from commit d6238a76c6)
2017-09-24 03:29:17 +03:00
Miss Islington (bot)
b650194652 [3.6] bpo-31459: Rename IDLE's module browser from Class Browser to Module Browser. (GH-3704) (#3710)
The original module-level class and method browser became a module
browser, with the addition of module-level functions, years ago.
Nested classes and functions were added yesterday.  For back-
compatibility, the virtual event <<open-class-browser>>, which
appears on the Keys tab of the Settings dialog, is not changed.
Patch by Cheryl Sabella.
(cherry picked from commit cd99e79dc7)
2017-09-23 17:16:47 -04:00
Miss Islington (bot)
429b3b1188 [3.6] bpo-31559: Remove test order dependence in idle_test.test_browser. (GH-3708) (#3709)
Order dependence caused leak-test buildbots to fail when running test_idle repeatedly.
(cherry picked from commit 99167f85b7)
2017-09-23 15:24:18 -04:00
Miss Islington (bot)
5614487378 [3.6] Docs: correct hashlib.blake2 keyed hashing example (bpo-31560)
(cherry picked from commit aecc08ac3a)
2017-09-23 10:27:22 -07:00
Terry Jan Reedy
fa1cae5832 [3.6] bpo-1612262: IDLE: Class Browser shows nested functions, classes (GH-2573) (#3702)
Original patches for code and tests by Guilherme Polo and
Cheryl Sabella, respectively.

(cherry picked from commit 058de11360)
2017-09-22 17:28:01 -04:00
Zachary Ware
6de35849cb [3.6] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3699)
Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.
(cherry picked from commit da9b4cfb48)
2017-09-22 13:26:19 -05:00
Miss Islington (bot)
eef49f5dd0 bpo-31351: Set return code in ensurepip when pip fails (GH-3626) (GH-3683)
Previously ensurepip would always report success, even if the
pip installation failed.
(cherry picked from commit 9adda0cdf8)

* Update version changed notice for backport
2017-09-22 06:45:37 -07:00
Terry Jan Reedy
0c4997f191 [3.6] bpo-31500: IDLE: Scale default fonts on HiDPI displays. (GH-3639) (#3686)
(cherry picked from commit a96c96f)
2017-09-21 11:15:45 -04:00
Miss Islington (bot)
88d0663005 [3.6] closes bpo-31532: Fix memory corruption due to allocator mix (GH-3679) (#3681)
Fix a memory corruption in getpath.c due to mixed memory allocators
between Py_GetPath() and Py_SetPath().

The fix use the Raw allocator to mimic the windows version.

This patch should be used from python3.6 to the current version

for more details, see the bug report and
  https://github.com/pyinstaller/pyinstaller/issues/2812
(cherry picked from commit 3d1e2ab584)
2017-09-20 23:47:12 -07:00
Miss Islington (bot)
6b44ad1abd bpo-31533: fix broken link to OpenSSL docs (GH-3674) (GH-3675)
(cherry picked from commit 19e4d9346d)
2017-09-20 13:22:56 -07:00
Miss Islington (bot)
97be14996b [3.6] bpo-31500: Removed fixed size of IDLE config dialog. (GH-3664) (#3665)
This one line of Serhiy Storchacka's bpo-31500 patch for is needed for other issues.
(cherry picked from commit d6e2f26f3f)
2017-09-19 19:45:00 -04:00
Miss Islington (bot)
e2593aa673 bpo-31501: Operator precedence description for arithmetic operators (GH-3633) (GH-3638)
(cherry picked from commit 9b47af6537)
2017-09-19 15:48:29 -07:00
Steve Dower
aa2bda788d Fix build issues in Doc/make.bat (#3663) 2017-09-19 14:40:48 -07:00
Miss Islington (bot)
c6ce8fba07 [3.6] bpo-31482: Missing bytes support for random.seed() version 1 (GH-3614) (GH-3659)
(cherry picked from commit 132a7d7cdb)
2017-09-19 10:56:33 -07:00
Miss Islington (bot)
72c05e31d6 [3.6] pythoninfo: ignore OSError(ENOSYS) on getrandom() (GH-3655) (#3657)
(cherry picked from commit a92941ff12)
2017-09-19 08:34:24 -07:00
Miss Islington (bot)
f37dd11f0d [3.6] bpo-31293: Fix crashes in truediv and mul of a timedelta by a float with a bad as_integer_ratio() method. (GH-3227) (#3654)
(cherry picked from commit 865e4b4f63)
2017-09-19 17:00:44 +03:00
Miss Islington (bot)
99a51d4e5b [3.6] bpo-31315: Fix an assertion failure in imp.create_dynamic(), when spec.name is not a string. (GH-3257) (#3653)
(cherry picked from commit 9974e1bcf3)
2017-09-19 15:51:19 +03:00
Ned Deily
113bc6f57b post 3.6.3rc1 development 2017-09-19 02:57:04 -04:00
Ned Deily
8527a928df Python 3.6.3rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJZwIzoAAoJEC00fqaqZUIdUsMP/RsRAi+aOn+jMnK58oFWIxbr
 icZpHll+6zN9g3Txue8cs3ajzDipGKSpKcvsx7YhTSNP+HCBKC0iFGnR6FtiVeso
 PU6mrR+L/WMe4sjWlOe7cq+lzFPBsqywdN9HdkBRShlf5gA6wjtjrWT3iqzSiKUD
 +yAlVI4LYBP6HZfvvVI8UUnhYkKnCKQVNSTlRVCuq1lnTwSREpGp90cz9M/4yPkc
 7J14G06kMjfZ904qraZbLlFzLbkJGOOQYVcQRB90krUuAb1qWKUiIP5WcEkEWx4z
 zKjjYnF5nmQOV35T1zS3e8GsOvZ3v5Okaa/QUOb08YvhqUIPO1IRuH7hEb2agP+9
 XwGCLcztG9t4q9lHIJkSUCQdOxwZ6ow/ZpADQwG7wsVAvMCKaN7ThGL5/oT3cHYT
 z/Rtxkkdynzcjc0q70Eo7njYG0fUW4xCSHkpid0VCr+vkuK7SO4mjV6NfstXZOCB
 dYtEi+N0HV1hRPx0LzveAkZr3elua6rPSZSzYPoQp1QNjJPUZB1UoJJxmjIZq2JO
 5HvNySMAxyWO/lD9cS2J9UibPfc6flvqQKbl+Vh/vtfbWyQ+YuZrBiqbiAakAZpI
 NRO0JyxRNudtbUdiZX/1wbDtiqOSl02wcrhMKSioAchcyMabIRdxBUU0lKDywScq
 DxvrrnD0+eIctekde2KY
 =ncyS
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.3rc1' into 3.6
2017-09-19 02:43:37 -04:00
Ned Deily
d8c174afd5 Bump to 3.6.3rc1 2017-09-18 23:18:48 -04:00
Ned Deily
2f61f6417a Update pydoc topics and NEWS blurbs for 3.6.3rc1 2017-09-18 23:04:41 -04:00
Miss Islington (bot)
8afd7ab12d [3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)
* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash

xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit e727d41ffc)
2017-09-18 05:48:23 -07:00
Miss Islington (bot)
84c89ef4e5 [3.6] bpo-30928: Update idlelib/NEWS.txt to 2017 Sep 17. (GH-3635) (#3637)
(cherry picked from commit 55679e0ec7)
2017-09-17 21:10:54 -04:00
Miss Islington (bot)
6b4d8ba097 [3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) (#3636)
This reverses a never-released regression resulting from bpo-31287.
(cherry picked from commit 0efc7c67a2)
2017-09-17 20:39:24 -04:00