Commit Graph

98667 Commits

Author SHA1 Message Date
Victor Stinner 2b501866ed Travis CI: run rstlint.py in the docs job (#68)
Currently, http://buildbot.python.org/all/buildslaves/ware-docs
buildbot is only run as post-commit. For example, bpo-29521 (PR#41)
introduced two warnings, unnotified by the Travis CI docs job.

Modify the docs job to run toosl/rstlint.py.

Fix also the two minor warnings which causes the buildbot slave to
fail.
2017-02-13 15:30:05 +01:00
Jim DeLaHunt 3d707be950 bpo-29521 Fix two minor documentation build warnings (#41)
Much of bpo-29521 was fixed in parallel with commit 
e7ffb99 .  This cleans up the rest.

Apply parallel change to Doc/make.bat to read 
"set SPHINXOPTS=-D latex_elements.papersize="
I don't have a Windows system on which to observe the warning,
but it should be necessary.

The warning:

.../workspace/cpython_github/Doc/faq/windows.rst:303: 
    WARNING: unknown option: -t

In the Windows FAQ, `How do I keep editors from inserting tabs 
into my Python source?`, contained a reference to a Python -t
option. In Python 2.x, this caused Python to issue warnings
about lines with mixed spaces and tabs, but as of Python 3.6
it does nothing. 
 
Per discussion at http://bugs.python.org/issue29387, take
their wording. Python [3] raises an IndentationError or 
TabError. Tabnanny is now a module.
2017-02-13 08:57:13 -05:00
Zachary Ware 649a7caf6b Allow up to a 0.01% drop in coverage (#30) 2017-02-12 20:21:19 -08:00
Victor Stinner 61e2bc74df bpo-29176: Fix name of the _curses.window class (#52)
Set name to "_curses.window" instead of "_curses.curses window" (with
a space!?).
2017-02-12 23:42:02 +01:00
MRMillon baf7bb30a0 getpass: update docstrings (#49)
EasyDialogs was removed in 3.x. fallback_getpass will always be the answer here.
ff47a133e1
2017-02-12 23:10:48 +01:00
Mariatta d4a97d8948 bpo-28929: Link the documentation to its source file on GitHub (#35)
* bpo-28929: Link the documentation to its source file on GitHub

Change the documentation's `Show Source` link on the left menu
to GitHub source file.

* change version to master
2017-02-12 13:07:05 -08:00
Victor Stinner c22bfaae83 bpo-29524: Add Objects/call.c file (#12)
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
  called once.
* Export _PyEval_EvalCodeWithName() since it is now called
  from call.c.
2017-02-12 19:27:05 +01:00
Mariatta 3110a379bb bpo-29474: Improve documentation for weakref.WeakValueDictionary (#10)
There were some grammatical errors in weakref.WeakValueDictionary
documentation.
2017-02-12 08:17:50 -08:00
Nathaniel J. Smith af88e7eda4 bpo-27122: Fix comment to point to correct issue number (#47)
It took me quite a bit to figure out what this was referring to,
since the given issue number is wrong, and the original commit
message I found through git blame lists a different, also wrong
issue number... see https://bugs.python.org/issue27122#msg279449
2017-02-12 14:37:24 +03:00
INADA Naoki 2294f3aee1 bpo-29438: fixed use-after-free in key sharing dict (#17) 2017-02-12 13:51:30 +09:00
Ryan Gonzalez e7ffb99f84 Fix some sphinx warnings (#9)
* Fix some deprecation warnings in Doc/conf.py
* Fix an rst error in Misc/NEWS
2017-02-11 13:47:37 +09:00
Zachary Ware 29896ad3d3 Make Travis docs build more lenient (#16) 2017-02-11 04:02:18 +01:00
Victor Stinner d783b01fdf Rename README to README.rst and enhance formatting (#2)
Update also the Release Schedule to Python 3.7.
2017-02-11 02:21:38 +01:00
Donald Stufft 4538ddcacc Fix bpo-29528 Use a secure variable to stop spam (#13)
If the IRC notification is stored in plaintext, then anyone who forks
the repository and also adds it to travis will send notifications to
the IRC channel for their fork by default. Since the secure variable
is encrypted using a repository specific key, this will only work when
it is being built using the correct repository.
2017-02-11 01:58:34 +01:00
Victor Stinner 0d5f11061a Don't treat warnings as error in Travis docs job (#7)
bpo-29527.
2017-02-11 01:26:07 +01:00
Brett Cannon 79ab8be05f Support "bpo-" in Misc/NEWS (#1) 2017-02-10 17:10:13 -06:00
Brett Cannon f6516af8f3 Fix formatting issue with Codecov badge 2017-02-10 14:34:58 -08:00
Brett Cannon aa2a621c8b Add the Codecov badge for master 2017-02-10 14:33:55 -08:00
Brett Cannon 3f9339b569 Add a Travis badge for the master branch 2017-02-10 14:31:08 -08:00
Brett Cannon 34818577b8 Add a codecov configuration file 2017-02-10 14:24:16 -08:00
Brett Cannon bb09c863e9 Add a Travis configuration file 2017-02-10 14:21:15 -08:00
Brett Cannon 6f0eb93183 Delete old pull request template 2017-02-10 14:09:18 -08:00
Brett Cannon 0c719824de Add a CONTRIBUTING file
This file will be displayed to contributors when they create a pull request in any branch (hence why it is not written in a branch-specific way).
2017-02-10 14:08:55 -08:00
Victor Stinner d2306cec4d Backed out changeset f23fa1f7b68f
Sorry, I didn't want to push this change before the review :-( I was pushing a
change into the 2.7 branch.
2017-02-10 14:19:36 +01:00
Victor Stinner 766af559ad Issue #29465: Add Objects/call.c file
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
  called once.
* Export _PyEval_EvalCodeWithName() since it is now called
  from call.c.
2017-02-10 13:32:29 +01:00
Victor Stinner 109a9fe796 Merge 3.6 2017-02-10 12:38:02 +01:00
Victor Stinner 2a35c939cc Fix test_datetime on Windows
Issue #29100: On Windows, datetime.datetime.fromtimestamp(min_ts) fails with an
OSError in test_timestamp_limits().
2017-02-10 12:37:21 +01:00
Victor Stinner 07547cdad3 Merge 3.6 2017-02-10 11:45:28 +01:00
Victor Stinner 6f37e3645d Fix test_datetime on system with 32-bit time_t
Issue #29100: Catch OverflowError in the new test_timestamp_limits() test.
2017-02-10 11:45:14 +01:00
Victor Stinner 05e218c37d Merge 3.6 2017-02-10 10:34:37 +01:00
Victor Stinner b67f096738 Fix datetime.fromtimestamp(): check bounds
Issue #29100: Fix datetime.fromtimestamp() regression introduced in Python
3.6.0: check minimum and maximum years.
2017-02-10 10:34:02 +01:00
Łukasz Langa 40ee824d1d Merge 3.6 (fix #29519) 2017-02-10 00:20:16 -08:00
Łukasz Langa 57fe245e8c Merge 3.5 (fix #29519) 2017-02-10 00:16:10 -08:00
Łukasz Langa 9cd7e17640 Fix #29519: weakref spewing exceptions during interp finalization 2017-02-10 00:14:55 -08:00
Benjamin Peterson e5f2cc67be merge 3.6 2017-02-09 22:35:38 -08:00
Benjamin Peterson 35a1f7f62d massage English for -X descriptions a bit 2017-02-09 22:31:17 -08:00
Victor Stinner fe4ff83049 Issue #29507: Fix _PyObject_CallFunctionVa()
is_size_t test was reversed. Bug spotted by INADA Naoki.
2017-02-10 00:41:06 +01:00
Victor Stinner 331bbe6aaa Issue #29507: Update test_exceptions
test_unraisable() of test_exceptions expects that PyErr_WriteUnraisable(method)
fails on repr(method).

Before the previous change (7b8df4a5d81d), slot_tp_finalize() called
PyErr_WriteUnraisable() with a PyMethodObject. In this case, repr(method) calls
repr(self) which is BrokenRepr.__repr__() and the calls raises a new exception.

After the previous change, slot_tp_finalize() uses an unbound method: repr() is
called on a regular __del__() method which doesn't call repr(self). repr()
doesn't fail anymore.

PyErr_WriteUnraisable() doesn't call __repr__() anymore, so remove BrokenRepr
unit test.
2017-02-09 23:49:50 +01:00
Victor Stinner 516b98161a Optimize slots: avoid temporary PyMethodObject
Issue #29507: Optimize slots calling Python methods. For Python methods, get
the unbound Python function and prepend arguments with self, rather than
calling the descriptor which creates a temporary PyMethodObject.

Add a new _PyObject_FastCall_Prepend() function used to call the unbound Python
method with self. It avoids the creation of a temporary tuple to pass
positional arguments.

Avoiding temporary PyMethodObject and avoiding temporary tuple makes Python
slots up to 1.46x faster. Microbenchmark on a __getitem__() method implemented
in Python:

Median +- std dev: 121 ns +- 5 ns -> 82.8 ns +- 1.0 ns: 1.46x faster (-31%)

Co-Authored-by: INADA Naoki <songofacandy@gmail.com>
2017-02-09 22:53:47 +01:00
Serhiy Storchaka c42c65574d Null merge 2017-02-09 20:07:15 +02:00
Serhiy Storchaka 095ef73492 Issue #29513: Fix outdated comment and remove redundand code is os.scandir(). 2017-02-09 20:05:51 +02:00
Serhiy Storchaka d43ab05916 Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. 2017-02-09 20:02:37 +02:00
Nick Coghlan c7a24a7330 Merge issue #26355 fix from 3.6 2017-02-09 16:09:03 +01:00
Nick Coghlan e1857579f8 Merge issue #26355 fix from Python 3.5 2017-02-09 16:08:17 +01:00
Nick Coghlan e66244521c Issue #26355: Specify canonical URLs in docs pages
Add canonical header link on each page to corresponding major
version of the documentation.

Patch by Matthias Bussonnier.
2017-02-09 16:03:59 +01:00
Victor Stinner 12c5838dae Fix PyCFunction_Call() performance issue
Issue #29259, #29465: PyCFunction_Call() doesn't create anymore a redundant
tuple to pass positional arguments for METH_VARARGS.

Add a new cfunction_call() subfunction.
2017-02-09 02:01:37 +01:00
Victor Stinner 3722f1f483 support: temp_dir() and change_cwd() uses repr() in error message
Serhiy Storshaka pointed me that str(path) can emit a BytesWarning: use
repr(path) instead.
2017-02-08 15:49:10 +01:00
Victor Stinner 620580f280 Fix refleaks if Py_EnterRecursiveCall() fails
Issue #29306: Destroy argstuple and kwdict if Py_EnterRecursiveCall() fails.
2017-02-08 12:57:09 +01:00
Victor Stinner 17a63e2169 Fix regrtest -j0 -R output
Write also dots into stderr, instead of stdout.
2017-02-08 13:06:08 +01:00
Victor Stinner 04054d9ac2 Update test_support for my temp_dir/change_cwd changes 2017-02-08 12:49:02 +01:00