Commit Graph

81053 Commits

Author SHA1 Message Date
Roberto C. Sánchez 4cbcd2f8c4 [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) (GH-16006)
This change skips parsing of email addresses where domains include a "@" character, which can be maliciously used since the local part is returned as a complete address. 

(cherry picked from commit 8cb65d1381)

Excludes changes to Lib/email/_header_value_parser.py, which did not
exist in 2.7.

Co-authored-by: jpic <jpic@users.noreply.github.com>


https://bugs.python.org/issue34155
2019-09-14 10:26:38 -07:00
Alexandru Ardelean 0d63669e52 [2.7] bpo-35264: Modules/_ssl.c: fix build with OpenSSL 1.1.0 (GH-10570)
Fixes a build error with OpenSSL 1.1.0. There is already code in the
`_ssl.c` that handles all the weird cases of the NPN config macros (with
various OpenSSL & LibreSSL versions).
That code will provide a HAVE_NPN variable, which should be used in the
rest of the code to check whether (or what) to compile regarding NPN.

This change adds HAVE_NPN in the remaining places where it should have been
placed.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>


https://bugs.python.org/issue35264
2019-09-11 10:23:28 -07:00
Zackery Spytz f9db011c32 closes bpo-36712: Fix duplicate method in Lib/email/test/test_email_renamed.py. (GH-14800) 2019-09-11 14:26:07 +01:00
Zackery Spytz b239ab9107 closes bpo-36711: Remove duplicate method in Lib/email/feedparser.py. (GH-14801) 2019-09-11 14:22:08 +01:00
Zackery Spytz 289c5ea773 bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-15822)
If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag
without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are
insert sequences in the message definition.
(cherry picked from commit a656365)
2019-09-11 10:39:34 +01:00
Benjamin Peterson 58d61efd4c
[2.7] bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15808)
The link we have points to the version from Unicode 6.0.0, dated 2010.
There have been numerous updates to it since then:
  https://www.unicode.org/reports/tr44/GH-Modifications

Change the link to one that points to the current version. Also, use HTTPS..
(cherry picked from commit 64c6ac74e2)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-09-09 10:09:58 -07:00
Serhiy Storchaka 2fb6921ab2
[2.7] bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) (GH-15740)
RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b)
2019-09-09 12:38:05 +03:00
Miss Islington (bot) 0229b56d8c
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560)
https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
(cherry picked from commit 55aabee075)

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2019-08-28 10:36:18 -07:00
Victor Stinner c364221909
bpo-34521: Fix FD transfer in multiprocessing on FreeBSD (GH-15422)
Fix file descriptors transfer in multiprocessing on FreeBSD: use
CMSG_SPACE() rather than CMSG_LEN(); see RFC 3542.
2019-08-23 14:00:38 +01:00
Victor Stinner 3b26f734c0
test_multiprocessing removes temporary files (GH-15421)
(cherry picked from commit d0b10a6435)
2019-08-23 13:59:40 +01:00
Miss Islington (bot) 98b11e1160
bpo-37823: Fix open() link in telnetlib doc (GH-15281)
Fixed wrong link to Telnet.open() method in telnetlib documentation.
(cherry picked from commit e0b6117e27)

Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
2019-08-21 04:52:05 -07:00
Miss Islington (bot) 198a0d622a
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
If this service had thoroughly vanished, we could just ignore the
test until someone gets around to either recreating such a service
or redesigning the test to somehow work locally.  The
`support.transient_internet` mechanism catches the failure to
resolve the domain name, and skips the test.

But in fact the domain snakebite.net does still exist, as do its
nameservers -- and they can be quite slow to reply.  As a result
this test can easily take 20-30s before it gets auto-skipped.

So, skip the test explicitly up front.
(cherry picked from commit 5b95a1507e)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-08-20 21:12:18 -07:00
David H 35f9bccd81 [2.7] bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062). (GH-15133)
(cherry picked from commit ed5e8e06cb)

Co-authored-by: David H <dheiberg@mozilla.com>
2019-08-05 12:19:26 +03:00
Miss Islington (bot) 53639dd55a
closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942)
(cherry picked from commit 93e8aa62cf)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-07-24 16:59:31 -07:00
Miss Islington (bot) 46c2eff5ad bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499)
(cherry picked from commit 79042ac434)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-11 17:17:08 +03:00
Miss Islington (bot) 0517375c44
Document default parameter of .seek() in the signature. (GH-14691)
(cherry picked from commit 2a3d4d9c53)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-07-10 19:49:59 -07:00
Miss Islington (bot) 00bf4d64ec
bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615)
(cherry picked from commit f6cdd3ff68)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-07 08:59:14 -07:00
Miss Islington (bot) dd3862e167 bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626)
0 is a legal index.
(cherry picked from commit f8709e804d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 17:55:41 -04:00
Miss Islington (bot) 55270d09c2
bpo-37149: Replace dead link for online Tkinter reference (GH-14616)
Also fix a name misspelling.
(cherry picked from commit 45bc61b971)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 00:04:53 -07:00
Miss Islington (bot) 03b0128082
Put pyexpatns.h include back. bpo-37437 (GH-14539)
(cherry picked from commit 2cd07920bb)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-07-01 22:38:31 -07:00
Ned Deily da7f6dbbf5
bpo-19960: Fix building of zlib on macOS without installed headers (GH-14257)
When building 2.7 on macOS without system header files installed in
``/usr/include``, a few extension modules dependent on system-supplied
third-party libraries were not being built, most notably zlib.
This situation arose in the past when building without the Command
Line Tools and the option to install header files in the traditional
system locations (like /usr/include).  As of macOS 10.14, the
header files are only available in an SDK so the problem addressed
here affects most 2.7 builds.
2019-07-01 19:15:09 -04:00
Miss Islington (bot) bc60c47169
[2.7] bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469) (GH-14475)
* Added documentation for textwrap.dedent behavior.
(cherry picked from commit eb97b9211e)


Co-authored-by: tmblweed <tmblweed@users.noreply.github.com>


https://bugs.python.org/issue30754
2019-06-29 21:41:55 -07:00
Victor Stinner 065aff3c51
[2.7] bpo-37329: valgrind: ignore _PyWarnings_Init false alarms (GH-14202)
_PyWarnings_Init() only allocates memory once at startup but it is
not released at exit. Ignore this issue to be able to catch other
bugs more easily.
2019-06-28 18:13:33 +02:00
Miss Islington (bot) 4397c68663
closes bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)
(cherry picked from commit 3b03b09fc9)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-06-27 21:24:52 -07:00
Miss Islington (bot) dfa9499ccb [2.7] bpo-37411: Rewrite test_wsgiref.testEnviron() (GH-14394) (GH-14404)
Fix test_wsgiref.testEnviron() to no longer depend on the environment
variables (don't fail if "X" variable is set).

testEnviron() now overrides os.environ to get a deterministic
environment. Test full TestHandler.environ content: not only a few
selected variables.
(cherry picked from commit 5150d32792)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-26 22:54:27 +02:00
Victor Stinner 49032fa7e1
bpo-37396, PCbuild: Include "_d" in "Killing any running ..." message (GH-14370)
Add $(PyDebugExt) in "Killing any running python$(PyDebugExt).exe
instances...".
2019-06-25 13:37:16 +02:00
animalize 0fc14b3733 bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14182) 2019-06-24 16:27:03 -07:00
Victor Stinner 6cbff564f0
bpo-37124: Fix reference leak in test_msilib (GH-13750) (GH-14340)
(cherry picked from commit c0295dba25)
2019-06-24 16:09:49 +02:00
Victor Stinner 9d55bf440c
bpo-37359: Add --cleanup option to python3 -m test (GH-14332) (GH-14333)
* regrtest: Add --cleanup option to remove "test_python_*" directories
  of previous failed test jobs.
* Add "make cleantest" to run "python -m test --cleanup".

(cherry picked from commit 47fbc4e45b)
2019-06-24 13:21:18 +02:00
Miss Islington (bot) 0346448396
Improve threading.daemon docstring (GH-14278)
Rephrase and clarify that "the entire Python program exits when only daemon threads are left". This matches the documentation at https://docs.python.org/3/library/threading.htmlGH-thread-objects.
(cherry picked from commit bb110cc2ed)

Co-authored-by: mbarkhau <mbarkhau@gmail.com>
2019-06-23 12:08:28 -07:00
Victor Stinner adcdb1e4f5
bpo-37362: test_gdb now ignores stderr (GH-14287) (GH-14297)
test_gdb no longer fails if it gets an "unexpected" message on
stderr: it now ignores stderr. The purpose of test_gdb is to test
that python-gdb.py commands work as expected, not to test gdb.

(cherry picked from commit e56a123fd0)
2019-06-21 23:58:53 +02:00
Ned Deily c421c66a58
bpo-36231: Support building on macOS without /usr/include (GH-13773) (GH-14256) 2019-06-20 01:59:54 -04:00
Benjamin Peterson 598c756459
[2.7] Fix name of '\0'. (GH-14225)
'\0' is the NUL byte not NULL..
(cherry picked from commit 7821b4c6d2)
2019-06-18 23:03:35 -07:00
Ned Deily a5b1b22207
bpo-34631: Updated OpenSSL to 1.0.2s in macOS installer. (GH-14198) 2019-06-18 06:48:53 -04:00
animalize 373dace8d7 [2.7] bpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14183) 2019-06-18 05:59:53 -04:00
Alex Gaynor eb8b55927b [2.7] Update link in colorsys docs to be https (GH-14062) (GH-14110) 2019-06-17 18:41:44 -07:00
Steve Dower d8e3a8af77
bpo-34631: Updated OpenSSL to 1.0.2s in Windows installer (GH-14161) 2019-06-17 09:33:11 -07:00
Terry Jan Reedy 722733e940
[2.7] Fix 2.7 test -R test_IDLE failure on Windows (GH-13958)
Cherry-picked from 66d47da.
2019-06-16 16:36:23 -04:00
Xtreak ee15aa2b85 [2.7] bpo-35647: Fix path check in cookiejar. (GH-11436) (GH-13427) 2019-06-15 19:29:29 +03:00
Xtreak 979daae300 [2.7] bpo-35121: prefix dot in domain for proper subdomain validation (GH-10258) (GH-13426)
This is a manual backport of ca7fe50635 since 2.7 has `http.cookiejar` in `cookielib`


https://bugs.python.org/issue35121
2019-06-15 08:29:43 -07:00
Victor Stinner 2b578479b9
[2.7] bpo-36742: Fix urlparse.urlsplit() error message for Unicode URL (GH-13937)
If urlparse.urlsplit() detects an invalid netloc according to NFKC
normalization, the error message type is now str rather than unicode,
and use repr() to format the URL, to prevent <exception str() failed>
when display the error message.
2019-06-11 12:45:35 +02:00
Dimitri John Ledkov 99b5c940d3 [2.7] bpo-34836: fix test_default_ecdh_curve, needs no tlsv1.3. (GH-9626)
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>

https://bugs.python.org/issue34836
2019-06-09 15:44:57 +10:00
Eric Wieser 48f190f79c [2.7] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13906) 2019-06-08 11:19:24 +02:00
Zackery Spytz 2bfc2dc214 [2.7] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13898)
(cherry picked from commit dc2476500d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-06-07 18:22:56 +02:00
Tal Einat 1b57ab5c64
[2.7] bpo-37177: make IDLE's search dialogs transient (GH-13869)
This avoids the search dialogs being hidden behind the editor window.

(cherry picked from commit 554450fb4e)
2019-06-07 09:53:05 +03:00
Anthony Sottile 20093b3adf Update outdated reference to Mercurial (GH-12857) 2019-06-04 20:19:36 -04:00
Miss Islington (bot) 49832e60c8
Doc: Python 3.9 in sidebar and version switcher. (GH-13824)
(cherry picked from commit 59e7bbcaa4)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-06-04 16:21:08 -07:00
Steve Dower f61599b050
bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812) 2019-06-04 09:40:16 -07:00
Miss Islington (bot) 74bede0d50
Fix variable name copy/paste error in build-installer.py (GH-13038)
(cherry picked from commit d337169156)

Co-authored-by: cclauss <cclauss@me.com>
2019-06-02 20:39:38 -07:00
Miss Islington (bot) bfc1f60560 [2.7] bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)
* bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)

msilib.Directory.start_component() was passing an extra argument to CAB.gen_id().
(cherry picked from commit c8d5bf6c3f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-31 15:39:39 -07:00