Commit Graph

101669 Commits

Author SHA1 Message Date
Zackery Spytz 41254ebd5e bpo-33582: Remove duplicate space in inspect.formatargspec() deprecation warning (GH-7655) 2018-06-11 23:16:18 -04:00
Ned Deily 378edcd000
Update macOS installer Welcome and ReadMe files for 3.7.0. (GH-7653) 2018-06-11 22:38:03 -04:00
Ned Deily 4531ec74c4
bpo-31432: Revert unrelated code changes to _ssl.c and test_ssl (GH-7650) 2018-06-11 20:26:28 -04:00
Christian Heimes ef24b6c54d bpo-31432: Clarify ssl CERT_NONE/OPTIONAL/REQUIRED docs. (GH-3530)
The documentation for CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED were
misleading and partly wrong. It fails to explain that OpenSSL behaves
differently in client and server mode. Also OpenSSL does validate the
cert chain everytime. With SSL_VERIFY_NONE a validation error is not
fatal in client mode and does not request a client cert in server mode.
Also discourage people from using CERT_OPTIONAL in client mode.
2018-06-11 18:59:45 -04:00
Terry Jan Reedy 4b704f29f5
bpo-33656: Mention color in idlelib/NEWS.txt entry. (#7646) 2018-06-11 16:53:41 -04:00
Matthias Bussonnier 46c5cd0f6e bpo-33582: Emit deprecation warning for `formatargspec` (GH-6994) 2018-06-11 16:08:16 -04:00
Terry Jan Reedy fd88f319a4
bpo-33656: Add enum name for argument of Windows call. (GH-7642)
Change suggested by Eryk Sun in a comment on PR 7137 after it was merged.
2018-06-11 15:45:27 -04:00
Terry Jan Reedy 8a05f559ce
bpo-33656: Add entry to What's New 3.7. (GH-7638)
This is a separate PR because this does not backport to 3.6.
2018-06-11 14:15:37 -04:00
Terry Jan Reedy 800415e3df
bpo-33656: On Windows, add API call saying that tk scales for DPI (GH-7137)
On Windows 8.1+ or 10, with DPI compatibility properties of the Python binary
unchanged, and a monitor resolution greater than 96 DPI, this should
make text and lines sharper. It should otherwise have no effect.

Using a magnifier, I determined that the improvement comes from horizontal and
lines being better lined up with the monitor pixels. I checked that this call causes
no problem on any Windows buildbot, including the Win7 buildbots. Unlike most
IDLE patches, this one can be easily reverted by users by removing a few lines,
at the top of idlelib/pyshell.py.
2018-06-11 14:14:32 -04:00
Andrés Delfino 0e5f901508 bpo-33831: Make htmlview run again (GH-7628) 2018-06-11 09:58:18 -07:00
Zackery Spytz 2c071cebe6 bpo-30820: Remove incorrect docs for email.contentmanager.raw_data_manager (#7631)
The docs claimed that a list of EmailMessage objects could be
passed to set_content(), but this was never implemented.
2018-06-11 10:47:47 -04:00
Serhiy Storchaka 5cbefa9919
Clean up after bpo-33738. (GH-7627)
* Add declarations even if they are overridden by macros.
* Make the declaration and the definition of PyExceptionClass_Name
  consistent.
2018-06-11 15:01:47 +03:00
Ned Deily 9d6171ded5
bpo-23404: Update/sync What's New files for 3.6/3.5/2.7 (GH-7620) 2018-06-11 04:09:34 -04:00
Ned Deily 9d6d06e806
pypi.python.org -> pypi.org (GH-7613) 2018-06-11 00:45:50 -04:00
Ned Deily 12c6cdf4d1
bpo-33745: Add What's New for empty function docstring change. (GH-7611) 2018-06-10 22:41:09 -04:00
Ned Deily ef057bfb06
bpo-33109: Remove now-obsolete What's New entry for bpo-26510. (GH-7609) 2018-06-10 22:17:56 -04:00
Steve Weber 2487f30d55 bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. (GH-6731)
Before Python 3.6, os.path.abspath(None) used to report an AttributeError which was properly caught inside site.abs_paths, making it ignore __main__, one of sys.modules, which has __file__ and __cached__ set to None. With 3.6, os.path.abspath(None) raises TypeError instead which site.abs_path was not expecting.  This resulted in an uncaught exception if a user had PYTHONSTARTUP set and the application called site.main() which a number of third-party programs do.
2018-06-10 20:49:34 -04:00
Christian Tismer 8398713cea bpo-33738: Address review comments in GH #7477 (GH-7585) 2018-06-10 18:48:28 -04:00
Alexander Belopolsky 877b23202b
bpo-33812: Corrected astimezone for naive datetimes. (GH-7578)
A datetime object d is aware if d.tzinfo is not None and
d.tzinfo.utcoffset(d) does  not return None. If d.tzinfo is None,
or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None,
 d is naive.

This commit ensures that instances with non-None d.tzinfo, but
d.tzinfo.utcoffset(d) returning None are treated as naive.

In addition, C acceleration code will raise TypeError if
d.tzinfo.utcoffset(d) returns an object with the type other than
timedelta.

* Updated the documentation.

Assume that the term "naive" is defined elsewhere and remove the
not entirely correct clarification.  Thanks, Tim.
2018-06-10 17:02:58 -04:00
Terry Jan Reedy af4b0130d4
bpo-33610: Update IDLE Code Context doc entry (GH-7597)
Users can now click on context lines.
2018-06-10 15:48:41 -04:00
Terry Jan Reedy 820c53ac61
bpo-33820: Fix IDLE What's New typo (#7594) 2018-06-10 14:57:38 -04:00
Terry Jan Reedy 222f7f4033
bpo-33821: Update idlelib subsection of What's New 3.7 (#7590) 2018-06-10 14:15:04 -04:00
Terry Jan Reedy e226eb7157
bpo-33820: Update idlelib subsection of What's New 3.6 (GH-7589) 2018-06-10 14:03:40 -04:00
Zackery Spytz 69dccc397a Remove unneeded PyErr_Occurred() check in os_lseek_impl() (GH-7557)
This call became unneeded after the posix module was converted to the
Argument Clinic in 2f93635d34 and should
have been removed as part of that change.
2018-06-10 10:28:01 +03:00
Tal Einat 4ab4695388
bpo-33748: fix tests altering sys.path and sys.modules (GH-7433) 2018-06-10 10:10:28 +03:00
Tal Einat 1b85c71a21
bpo-33770: improve base64 exception message for encoded inputs of invalid length (#7416) 2018-06-10 10:01:50 +03:00
Serhiy Storchaka 98a0e466cd
Fix spaces added after hyphens in news entries. (GH-7579)
Seems they were added by double applying blurb.
2018-06-10 09:46:50 +03:00
Andrés Delfino d689f97619 Remove hyphens from phrase "picks up where it left off" (GH-7410) 2018-06-09 18:43:45 -07:00
Andrés Delfino 0e0534c402 Fix typo in object.__getnewargs__() documentation (GH-7554) 2018-06-10 03:41:09 +03:00
Ammar Askar 0aa17ee6a7 bpo-33766: Document that end of file or string is a newline (GH-7383) 2018-06-09 19:49:39 -04:00
MarcoFalke 7e0d882a98 doc: Fix typo in asyncio-eventloop.rst (GH-7345)
This is a fixup to 19a44f63c7
2018-06-09 16:09:13 -07:00
Ned Deily ced0adb263
bpo-32493: Correct test for uuid_enc_be availability in configure.ac. (GH-7511) (GH-7567) 2018-06-09 18:19:57 -04:00
Christian Tismer ea62ce7f4f bpo-33738: Fix macros which contradict PEP 384 (GH-7477)
During development of the limited API support for PySide,
we saw an error in a macro that accessed a type field.

This patch fixes the 7 errors in the Python headers.
Macros which were not written as capitals were implemented
as function.

To do the necessary analysis again, a script was included that
parses all headers and looks for "->tp_" in serctions which can
be reached with active limited API.

It is easily possible to call this script as a test.

Error listing:

../../Include/objimpl.h:243
#define PyObject_IS_GC(o) (PyType_IS_GC(Py_TYPE(o)) && \
    (Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o)))
Action: commented only

../../Include/objimpl.h:362
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
Action: commented only

../../Include/objimpl.h:364
#define PyObject_GET_WEAKREFS_LISTPTR(o) \
    ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
Action: commented only

../../Include/pyerrors.h:143
#define PyExceptionClass_Name(x) \
     ((char *)(((PyTypeObject*)(x))->tp_name))
Action: implemented function

../../Include/abstract.h:593
#define PyIter_Check(obj) \
    ((obj)->ob_type->tp_iternext != NULL && \
     (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
Action: implemented function

../../Include/abstract.h:713
#define PyIndex_Check(obj)                              \
    ((obj)->ob_type->tp_as_number != NULL &&            \
     (obj)->ob_type->tp_as_number->nb_index != NULL)
Action: implemented function

../../Include/abstract.h:924
#define PySequence_ITEM(o, i)\
    ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
Action: commented only
2018-06-09 14:32:25 -04:00
Zackery Spytz 3f45f5da8e bpo-33375: Fix GCC warning in Python/_warnings.c (GH-7556)
_Py_IDENTIFIER(argv) is now unused.
2018-06-09 10:09:45 -07:00
Nick Coghlan 1bcb8a6368
bpo-33409: Clarify PEP 538/540 relationship (GH-7534)
While locale coercion and UTF-8 mode turned out to
be complementary ideas rather than competing ones,
it isn't immediately obvious why it's useful to
have both, or how they interact at runtime.

This updates both the Python 3.7 What's New doc
and the PYTHONCOERCECLOCALE and PYTHONUTF8
documentation in an attempt to clarify that
relationship:

- in the respective What's New sections, add a closing paragraph
  explaining which problem each one solves, and pointing to the
  other PEP's section for the specific aspects it relies on the other
  PEP to solve
- use "locale-aware mode" as a more descriptive term for the
  default non-UTF-8 mode
- improve wording conistenccy between the PYTHONCOERCECLOCALE
  and PYTHONUTF8 docs when they cover the same thing (mostly
  related to legacy locale detection and setting the standard
  stream error handler)
- improve the description of the locale coercion trigger conditions
  (including pointing out that setting LC_ALL turns off locale coercion)
- port the full description of the UTF-8 mode behaviour changes
  from PEP 540 into the PYTHONUTF8 documentation
- be explicit that PYTHONIOENCODING still overrides the settings
  for the standard streams
- mention concrete examples of things that do and don't get their
  text encoding assumptions adjusted by the two text encoding
  assumption override techniques
2018-06-09 16:54:08 +10:00
Andrés Delfino 4acc140f8d Fix indendation level of versionchanged directive in configparser.items() doc (GH-7543) 2018-06-08 17:20:05 -07:00
Alexander Belopolsky bcb032e4ac
bpo-33810 Remove unused code from datetime.py. (GH-7549)
Since implementation of bpo-25283, the objects returned by time.localtime
always have tm_zone and tm_gmtoff attributes.  Remove code that
anticipates their absence.
2018-06-08 19:22:33 -04:00
Alexander Belopolsky 4c3e39f61c
Datetime test coverage (#7544)
* Added a test case for strftime("%z").

The added test checks a case with UTC offest expressed in an integer
number of seconds.

* Added a test comparing naive and aware datetimes.

Check that a greater than  comparison of a naive  datetime instance with
an aware one raises a TypeError.

* Test datetime in fold or in gap comparison both ways.
2018-06-08 18:58:38 -04:00
Yury Selivanov 12f482e0ae
bpo-30805: Avoid race condition with debug logging (GH-7545)
Supersedes https://github.com/python/cpython/pull/2490
2018-06-08 18:24:37 -04:00
Andrés Delfino 1cbdb2208a bpo-33801: Remove non-ordered dict comment from plistlib doc (GH-7495) 2018-06-08 17:51:20 -04:00
Thomas Kluyver 11a896652e bpo-33375: Get filename for warnings from frame.f_code.co_filename (GH-6622)
More consistent with how other parts of Python find the filename (e.g. tracebacks and pdb).
2018-06-08 12:28:37 -07:00
Andrés Delfino 3b0b90c8c3 bpo-33800: Fix default argument for parameter dict_type of ConfigParser/RawConfigParser (GH-7494) 2018-06-08 15:19:21 -04:00
Dong-hee Na 4f54867e29 bpo-33197: Add versionadded tag to the documentation of ParameterKind (GH-7536) 2018-06-08 12:07:52 -04:00
Suriyaa ✌️️ 9e6685ea7b bpo-33807: Add Python 3.7 buildbot link to '.github/CONTRIBUTING.rst' (GH-7532) 2018-06-08 10:40:55 -05:00
Elvis Pranskevichus c0d062f523 bpo-33736: Improve the documentation of asyncio stream APIs (GH-7326) 2018-06-08 11:36:00 -04:00
Andrés Delfino 6860629d87 bpo-33798: Update csv document about dict order (GH-7490) 2018-06-08 21:51:12 +09:00
Łukasz Langa 214f18e49f
bpo-33802: Do not interpolate in ConfigParser while reading defaults (GH-7524)
This solves a regression in logging config due to changes in BPO-23835.
2018-06-08 04:02:48 -07:00
wim glenn 66f02aa32f bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
- bugfix and test for fragile metavar handling in argparse (see
  bpo-24089, bpo-14046, bpo-25058, bpo-11874)
- also fixes some incorrect tests that did not make 1-element tuples correctly
2018-06-08 20:12:49 +10:00
Victor Stinner ff6c077292
bpo-33694: Fix typo in helper function name (GH-7522)
_feed_data_to_bufferred_proto() renamed to
_feed_data_to_buffered_proto() ("bufferred" => "buffered").

Typo spotted by Nathaniel J. Smith.
2018-06-08 10:32:06 +02:00
Victor Stinner c45fc7673e
bpo-33718: regrtest: use "xxx then yyy" result if re-run (GH-7521)
If tests are re-run, use "xxx then yyy" result format (ex: "FAILURE
then SUCCESS") to show that some failing tests have been re-run.

Add also test_regrtest.test_rerun_fail() test.
2018-06-08 09:53:51 +02:00