Commit Graph

19985 Commits

Author SHA1 Message Date
Miss Islington (bot) e7dbd06583 bpo-26163: Frozenset hash improvement (GH-5194) (#5198)
(cherry picked from commit b44c5169f6)
2018-01-16 02:27:15 -08:00
Victor Stinner b92c159efa
[3.6] bpo-32555: Fix locale encodings (#5193)
On FreeBSD and Solaris, os.strerror() now always decode the byte
string from the current locale encoding, rather than using
ASCII/surrogateescape in some cases.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() which has an
  additional current_locale parameter.
* PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and
* PyUnicode_EncodeLocale() now always use the current locale
* encoding, instead of using Py_DecodeLocale()/Py_EncodeLocale().
* Document encoding in Py_DecodeLocale() and Py_EncodeLocale()
  documentations.
* Add USE_FORCE_ASCII define to not define
  decode_ascii_surrogateescape() on Android.
2018-01-15 23:43:24 +01:00
Victor Stinner 5f959c4f9e
[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)
* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.

(cherry picked from commit cb064fc232)
2018-01-15 23:23:47 +01:00
Miss Islington (bot) d55d6825d7 [3.6] bpo-32521: nis libtirpc (GH-5137) (#5165)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8a7a)
2018-01-12 16:29:35 +01:00
Miss Islington (bot) a91662affe bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
(cherry picked from commit ae12f5d4c9)
2018-01-12 19:47:36 +09:00
Miss Islington (bot) 94a3facc0e bpo-31802: Fix importing native path module before importing os. (GH-4017) (#5129)
(cherry picked from commit 3460198f6b)
2018-01-07 18:35:28 +02:00
Miss Islington (bot) d62b7412c1 bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)
(cherry picked from commit 1b3029ac83)
2017-12-25 09:40:27 +02:00
Miss Islington (bot) c1b8eb8006 bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977) (#4979)
This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist.
(cherry picked from commit 8a5877165e)
2017-12-22 12:51:46 -08:00
Miss Islington (bot) 3bc68cff5b bpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter shutdown (GH-4956) (#4962)
(cherry picked from commit 4a02543cf9)
2017-12-21 19:42:32 +02:00
Miss Islington (bot) fdb148f949 bpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867) (#4959)
(cherry picked from commit fbd605151f)
2017-12-21 14:54:45 +02:00
Ned Deily fb301cb703 Python 3.6.4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlo4m+sACgkQLTR+pqpl
 Qh3oPhAAu+gAOZRzRLZ6P5tuICKMzBQmMSbVd5XZyXRlgW8yiNRzsRcS+6uJqDZO
 c6/BZYPYpIATZZlffY9jKSPUa/HgKt1r3d3TTeOcOrdj+pfr0xBwFGa0Wns1+BrU
 cm1NMnMDevn5SHf3+wRX+RBe/3BN4u4XEvsO3IgBguT0PqNG90cRTwdt583YB66Q
 0M0G9Sd3w5o6DJLyJzvT/zneU2SgRO+cf/8IIKO1YGgrgbjEvws3Fp1AVBnRZ4B3
 SIYaSWro+o7c4xvbXKZu1Rjtf9mgbms9qwqmFI0cIB3azYwMM6lqiofNFsmKOl+G
 yGpgBxL14zdWVYdR0VfsYpUs/3O9npRCQCoXnAMDN7nPvEI7QAKKOLlJKXkPdaV8
 SOuqat1cPyXJrOttuU6xO4Kq0k/drKiEt390iuvi7Kvfo0CbGG5L7/Z+wJJVvsSM
 XDd3zsC2/SYpGTXlSkybB8P4o72RXc5ehg/u3DfzwM6RMOWFvPjG5HL9HacX7BXE
 zgeQqjAyRspnSof2Kvpr7QSqfk4OxxkN90To6R+AAZs9wuZzfj8L8//oOp6XCbIk
 qwl8lJ6eBjdqvufB7fdj9gbnlSK+/QechCVqNE5jTjNKRaPzcXz5BNsFN+tB0Da+
 n9hmSBiv76Xj5qKak+vBHC1vszWPe9e/0uLpyzWNkMYJD3fZcxI=
 =zrPM
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.4' into 3.6
2017-12-19 02:46:01 -05:00
Ned Deily c7d7f7729e Update NEWS for 3.6.4 final 2017-12-18 23:50:55 -05:00
Yury Selivanov 572636d425
bpo-27456: Ensure TCP_NODELAY is set on linux (#4231) (#4898)
(cherry picked from commit e796b2fe26)
2017-12-15 21:53:08 -05:00
Serhiy Storchaka b580f4f2bf
[3.6] bpo-30416: Protect the optimizer during constant folding. (#4865)
It no longer spends much time doing complex calculations and no
longer consumes much memory for creating large constants that will
be dropped later.

This fixes also bpo-21074.
2017-12-15 14:12:14 +02:00
Serhiy Storchaka b82da9ebb2
[3.6] bpo-27169: The __debug__ constant is now optimized out at compile time. (GH-4880) (#4882)
This fixes also bpo-22091..
(cherry picked from commit 3325a6780c)
2017-12-15 13:26:26 +02:00
Victor Stinner 22097aaa77
bpo-32329: Fix sys.flags.hash_randomization (#4875)
sys.flags.hash_randomization is now properly set to 0 when hash
randomization is turned off by PYTHONHASHSEED=0.
2017-12-15 01:39:48 +01:00
Miss Islington (bot) d1cb1067a8 bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (GH-4797) (#4869)
(cherry picked from commit 233ef249cc)
2017-12-14 19:30:45 +02:00
Miss Islington (bot) 645fa19f15 bpo-32302: Fix distutils bdist_wininst for CRT v142 (GH-4851) (#4861)
CRT v142 is binary compatible with CRT v140.
(cherry picked from commit 9e7c136ad8)
2017-12-14 12:00:50 +01:00
Miss Islington (bot) ce5a3cd9b1 bpo-32255: Always quote a single empty field when write into a CSV file. (GH-4769) (#4810)
This allows to distinguish an empty row from a row consisting of a single empty field.
(cherry picked from commit 2001900b0c)
2017-12-12 12:56:40 +02:00
Miss Islington (bot) 71d8f36eb4 bpo-32252: Fix faulthandler_suppress_crash_report() (GH-4794) (#4795)
Fix faulthandler_suppress_crash_report() used to prevent core dump files
when testing crashes. getrlimit() returns zero on success.
(cherry picked from commit 48d4dd974f)
2017-12-11 14:17:06 +01:00
Miss Islington (bot) 03031fbc7d bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696) (#4747)
(cherry picked from commit 961dbe0548)
2017-12-07 13:48:14 +01:00
Ned Deily de4c3f312c Update NEWS and pydoc topics. 2017-12-05 03:17:05 -05:00
Ned Deily 0da25972fd Tidy NEWS entry. 2017-12-05 02:41:31 -05:00
Miss Islington (bot) d9cadc5f59 [3.6] bpo-31380: Skip test_httpservers test_undecodable_file on macOS. (GH-4720) (#4721)
The undecodable file name cannot be created on macOS APFS file systems.
(cherry picked from commit b3edde8dd4)
2017-12-05 00:03:29 -05:00
Mariatta e2ba552319
bpo-28791: Update Windows builds to use SQLite 3.21.0. (GH-4246). (GH-4717)
(cherry picked from commit 31af650ee2)
2017-12-04 20:09:57 -08:00
Miss Islington (bot) 0bec5e147a [3.6] bpo-31392: Update macOS installer to use OpenSSL 1.0.2m (GH-4715) (#4716)
(cherry picked from commit 24e046987b)
2017-12-04 22:54:43 -05:00
Miss Islington (bot) b0576278b2 [bpo-28556] Minor fixes for typing module (GH-4710) (#4713)
(cherry picked from commit 29bc193210)
2017-12-04 22:02:02 -05:00
Ned Deily a72e7bf563
[3.6] bpo-28791: Update macOS installer to use SQLite 3.21.0. (#4245) (#4711) 2017-12-04 21:29:30 -05:00
Miss Islington (bot) 9da33c8212 bpo-32207: Improve tk event exception tracebacks in IDLE. (GH-4703) (#4705)
When tk event handling is driven by IDLE's run loop, a confusing
and distracting queue.EMPTY traceback context is no longer added
to tk event exception tracebacks.  The traceback is now the same
as when event handling is driven by user code.  Patch based on
a suggestion by Serhiy Storchaka.
(cherry picked from commit 1e2fcac497)
2017-12-04 17:02:32 -05:00
Miss Islington (bot) a87ba60fe5 bpo-27240 Rewrite the email header folding algorithm. (GH-3488) (#4693)
The original algorithm tried to delegate the folding to the tokens so
that those tokens whose folding rules differed could specify the
differences.  However, this resulted in a lot of duplicated code because
most of the rules were the same.

The new algorithm moves all folding logic into a set of functions
external to the token classes, but puts the information about which
tokens can be folded in which ways on the tokens...with the exception of
mime-parameters, which are a special case (which was not even
implemented in the old folder).

This algorithm can still probably be improved and hopefully simplified
somewhat.

Note that some of the test expectations are changed.  I believe the
changes are toward more desirable and consistent behavior: in general
when (re) folding a line the canonical version of the tokens is
generated, rather than preserving errors or extra whitespace.
(cherry picked from commit 85d5c18c9d)
2017-12-03 19:46:23 -05:00
Nick Coghlan c8f32aae0a
[3.6] bpo-32176: Set CO_NOFREE in the code object constructor (GH-4684)
Previously, CO_NOFREE was set in the compiler, which meant
it could end up being set incorrectly when code objects
were created directly. Setting it in the constructor based
on freevars and cellvars ensures it is always accurate,
regardless of how the code object is defined.

(cherry picked from commit 078f1814f1)
2017-12-03 23:32:54 +10:00
Miss Islington (bot) 8bcd41040a bpo-32186: Release the GIL during lseek and fstat (GH-4652) (#4661)
In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called
without releasing the GIL. This can cause all threads to hang for
unlimited time when calling FileIO.read() and the NFS server is not
accessible.
(cherry picked from commit 6a89481680)
2017-12-01 07:26:31 +01:00
Victor Stinner e10c9de9d7
bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655)
When PyGILState_Ensure() is called in a non-Python thread before
PyEval_InitThreads(), only call PyEval_InitThreads() after calling
PyThreadState_New() to fix a crash.

Add an unit test in test_embed.

Enhance also embedded tests, backport from master:

* Add test_pre_initialization_api()
* Set PYTHONIOENCODING environment variable in
  test_forced_io_encoding()

(cherry picked from commit b4d1e1f7c1)
2017-11-30 23:36:49 +01:00
Miss Islington (bot) 8cd31082fb bpo-32072: Fix issues with binary plists. (GH-4455) (#4654)
* Fixed saving bytearrays.
* Identical objects will be saved only once.
* Equal references will be load as identical objects.
* Added support for saving and loading recursive data structures.
(cherry picked from commit a897aeeef6)
2017-12-01 00:15:30 +02:00
Miss Islington (bot) c91bf742e5 bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (GH-4080) (#4653)
with the persistent_id() and persistent_load() methods.
(cherry picked from commit 986375ebde)
2017-11-30 23:30:39 +02:00
Miss Islington (bot) 92a2c07b71 Skip test_socket.test_sha256() on linux < 4.5 (GH-4643) (#4645)
bpo-31705.
(cherry picked from commit 86afc1f2a7)
2017-11-30 14:43:43 +01:00
Miss Islington (bot) 957aef7c41 bpo-32164: Delete unused file idlelib/tabbedpages.py (GH-4628) (#4631)
(cherry picked from commit 041efd292e)
2017-11-29 01:07:21 -05:00
Miss Islington (bot) 230ffeae0a bpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) (#4622)
characters/bytes for non-negative n.  This makes it compatible with
read() methods of other file-like objects.
(cherry picked from commit 219c2de5ad)
2017-11-29 02:06:53 +02:00
Miss Islington (bot) cceb0f8d7b bpo-29879: Update typing documentation. (GH-4573) (GH-4574)
- Add "version added: 3.5.2" note where it was missing.
- Remove the mention that Reversible is new in 3.5.2
(cherry picked from commit 0cd2e81bea)
2017-11-26 14:27:44 -08:00
Miss Islington (bot) 04af8ace86 bpo-32059: setup.py now also searches the sysroot paths (GH-4452) (#4562)
detect_modules() in setup.py now also searches the sysroot paths when
cross-compiling.
(cherry picked from commit 77f5139954)
2017-11-25 17:52:20 +01:00
Berker Peksag 412f00b839
[3.6] bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
The previous behavior was to raise an exception

    NotImplementedError: result of type 0

when the value of the property is VT_EMPTY.

(cherry picked from commit 19fb134185)
2017-11-24 19:04:40 +03:00
Miss Islington (bot) bfa89b21e1 bpo-12382: Make OpenDatabase() raise better exception messages (GH-4528)
Previously, 'msilib.OpenDatabase()' function raised a
cryptical exception message when it couldn't open or
create an MSI file. For example:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    _msi.MSIError: unknown error 6e

(cherry picked from commit 4864a619dc)
2017-11-24 13:31:21 +03:00
Miss Islington (bot) ff847d1ac7 bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (GH-4529) (#4533)
(cherry picked from commit 3df02dbc8e)
2017-11-23 15:57:58 -08:00
Berker Peksag 4b3042900e
bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)
(cherry picked from commit bdb8315c21)
2017-11-23 17:33:12 +03:00
Terry Jan Reedy ae3c5c7b9e
[3.6] bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (GH-4484) (#4512)
Patch mostly by Cheryl Sabella.
(cherry picked from commit 20d48a44a5)
2017-11-22 20:05:35 -05:00
Miss Islington (bot) d7ed48c2b8 bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to documentation. (GH-4491) (#4493)
(cherry picked from commit 431665bf19)
2017-11-21 11:16:40 -05:00
Victor Stinner 33217d2213
bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929) (#4416)
(cherry picked from commit 6e3d6b5dc2)
2017-11-16 03:53:45 -08:00
Miss Islington (bot) f35076a002 bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable GH-4409 (#4411)
(cherry picked from commit 43605e6bfa)
2017-11-15 19:28:25 -05:00
Miss Islington (bot) d15bb5fcad bpo-32011: Revert "Issue GH-15480: Remove the deprecated and unused TYPE_INT64 code from marshal." (GH-4381) (#4405)
Simplify the reverted code.

This reverts commit e9bbe8b87b.
(cherry picked from commit 00987f6230)
2017-11-15 18:05:58 +02:00
Serhiy Storchaka 3864248866
[3.6] bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (GH-4289) (#4406)
* Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks.
* Setting sys.tracebacklimit to None now causes using the default limit.
* Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
  the limit LONG_MAX rather than the default limit.
* Fixed integer overflows in the case of more than 2**31 traceback items on
  Windows.
* Fixed output errors handling..
(cherry picked from commit edad8eebee)
2017-11-15 18:04:46 +02:00