Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' of github.com:python/cpython into blurb-split-m…
…aster
  • Loading branch information
larryhastings committed Jul 22, 2017
commit 43ac1401acfedae3cbd7486fc993b6ba1d03d548
2 changes: 2 additions & 0 deletions .github/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ build_script:
- cmd: PCbuild\build.bat -e
test_script:
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 --fail-env-changed -j0
environment:
HOST_PYTHON: C:\Python36\python.exe

# Only trigger AppVeyor if actual code or its configuration changes
only_commits:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ matrix:
./venv/bin/python -m pip install -U coverage
script:
# Skip tests that re-run the entire test suite.
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu,-tzdata -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
- source ./venv/bin/activate
Expand Down Expand Up @@ -95,7 +95,7 @@ script:
# Only run on Linux as the check only needs to be run once.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi
# `-r -w` implicitly provided through `make buildbottest`.
- make buildbottest TESTOPTS="-j4 -uall,-cpu,-tzdata"
- make buildbottest TESTOPTS="-j4 -uall,-cpu"

notifications:
email: false
Expand Down
11 changes: 11 additions & 0 deletions Doc/installing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ On such systems, it is often better to use a virtual environment or a
per-user installation when installing packages with ``pip``.


Pip not installed
-----------------

It is possible that ``pip`` does not get installed by default. One potential fix is::

python -m ensurepip --default-pip

There are also additional resources for `installing pip.
<https://packaging.python.org/tutorials/installing-packages/#install-pip-setuptools-and-wheel>`__


Installing binary extensions
----------------------------

Expand Down
6 changes: 6 additions & 0 deletions Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,12 @@ The :mod:`multiprocessing` package mostly replicates the API of the
acquired a lock or semaphore etc. then terminating it is liable to
cause other processes to deadlock.

.. method:: kill()

Same as :meth:`terminate()` but using the ``SIGKILL`` signal on Unix.

.. versionadded:: 3.7

.. method:: close()

Close the :class:`Process` object, releasing all resources associated
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/turtle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ The demo scripts are:
| wikipedia | a pattern from the wikipedia | :func:`clone`, |
| | article on turtle graphics | :func:`undo` |
+----------------+------------------------------+-----------------------+
| yingyang | another elementary example | :func:`circle` |
| yinyang | another elementary example | :func:`circle` |
+----------------+------------------------------+-----------------------+

Have fun!
Expand Down
13 changes: 12 additions & 1 deletion Doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@ pushd %~dp0

set this=%~n0

if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
call ..\PCBuild\find_python.bat %PYTHON%
if "%SPHINXBUILD%" EQU "" if "%PYTHON%" NEQ "" (
set SPHINXBUILD=%PYTHON%\..\Scripts\sphinx-build.exe
rem Cannot use %SPHINXBUILD% in the same block where we set it
if not exist "%PYTHON%\..\Scripts\sphinx-build.exe" (
echo Installing sphinx with %PYTHON%
"%PYTHON%" -m pip install sphinx
if errorlevel 1 exit /B
)
)

if "%PYTHON%" EQU "" set PYTHON=py
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build

if "%1" NEQ "htmlhelp" goto :skiphhcsearch
if exist "%HTMLHELP%" goto :skiphhcsearch
Expand Down
18 changes: 9 additions & 9 deletions Doc/tools/templates/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ <h1>Download Python {{ release }} Documentation</h1>
<table class="docutils">
<tr><th>Format</th><th>Packed as .zip</th><th>Packed as .tar.bz2</th></tr>
<tr><td>PDF (US-Letter paper size)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.zip">Download</a> (ca. 8 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.tar.bz2">Download</a> (ca. 8 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.zip">Download</a> (ca. 13 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.tar.bz2">Download</a> (ca. 13 MB)</td>
</tr>
<tr><td>PDF (A4 paper size)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.zip">Download</a> (ca. 8 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.tar.bz2">Download</a> (ca. 8 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.zip">Download</a> (ca. 13 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.tar.bz2">Download</a> (ca. 13 MB)</td>
</tr>
<tr><td>HTML</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.zip">Download</a> (ca. 6 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.tar.bz2">Download</a> (ca. 4 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.zip">Download</a> (ca. 9 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.tar.bz2">Download</a> (ca. 6 MB)</td>
</tr>
<tr><td>Plain Text</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.zip">Download</a> (ca. 2 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.tar.bz2">Download</a> (ca. 1.5 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.zip">Download</a> (ca. 3 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.tar.bz2">Download</a> (ca. 2 MB)</td>
</tr>
<tr><td>EPUB</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs.epub">Download</a> (ca. 4.5 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs.epub">Download</a> (ca. 5.5 MB)</td>
<td></td>
</tr>
</table>
Expand Down
9 changes: 5 additions & 4 deletions Include/fileobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
#endif /* Py_LIMITED_API */

/* A routine to check if a file descriptor can be select()-ed. */
#ifdef HAVE_SELECT
#define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
#ifdef _MSC_VER
/* On Windows, any socket fd can be select()-ed, no matter how high */
#define _PyIsSelectable_fd(FD) (1)
#else
#define _PyIsSelectable_fd(FD) (1)
#endif /* HAVE_SELECT */
#define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
#endif

#ifdef __cplusplus
}
Expand Down
3 changes: 2 additions & 1 deletion Lib/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2271,7 +2271,8 @@ def _name_from_offset(delta):
_check_tzinfo_arg, _check_tzname, _check_utc_offset, _cmp, _cmperror,
_date_class, _days_before_month, _days_before_year, _days_in_month,
_format_time, _is_leap, _isoweek1monday, _math, _ord2ymd,
_time, _time_class, _tzinfo_class, _wrap_strftime, _ymd2ord)
_time, _time_class, _tzinfo_class, _wrap_strftime, _ymd2ord,
_divide_and_round)
# XXX Since import * above excludes names that start with _,
# docstring does not get overwritten. In the future, it may be
# appropriate to maintain a single module level docstring and
Expand Down
2 changes: 2 additions & 0 deletions Lib/ftplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def sanitize(self, s):

# Internal: send one line to the server, appending CRLF
def putline(self, line):
if '\r' in line or '\n' in line:
raise ValueError('an illegal newline character should not be contained')
line = line + CRLF
if self.debugging > 1:
print('*put*', self.sanitize(line))
Expand Down
22 changes: 8 additions & 14 deletions Lib/idlelib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import sys

from tkinter.font import Font
import idlelib

class InvalidConfigType(Exception): pass
class InvalidConfigSet(Exception): pass
Expand Down Expand Up @@ -159,14 +160,15 @@ class IdleConf:
for config_type in self.config_types:
(user home dir)/.idlerc/config-{config-type}.cfg
"""
def __init__(self):
def __init__(self, _utest=False):
self.config_types = ('main', 'highlight', 'keys', 'extensions')
self.defaultCfg = {}
self.userCfg = {}
self.cfg = {} # TODO use to select userCfg vs defaultCfg
self.CreateConfigHandlers()
self.LoadCfgFiles()

if not _utest:
self.CreateConfigHandlers()
self.LoadCfgFiles()

def CreateConfigHandlers(self):
"Populate default and user config parser dictionaries."
Expand Down Expand Up @@ -215,7 +217,8 @@ def GetUserCfgDir(self):
except OSError:
warn = ('\n Warning: unable to create user config directory\n' +
userDir + '\n Check path and permissions.\n Exiting!\n')
print(warn, file=sys.stderr)
if not idlelib.testing:
print(warn, file=sys.stderr)
raise SystemExit
# TODO continue without userDIr instead of exit
return userDir
Expand Down Expand Up @@ -463,16 +466,7 @@ def GetExtensions(self, active_only=True,

def RemoveKeyBindNames(self, extnNameList):
"Return extnNameList with keybinding section names removed."
# TODO Easier to return filtered copy with list comp
names = extnNameList
kbNameIndicies = []
for name in names:
if name.endswith(('_bindings', '_cfgBindings')):
kbNameIndicies.append(names.index(name))
kbNameIndicies.sort(reverse=True)
for index in kbNameIndicies: #delete each keybinding section name
del(names[index])
return names
return [n for n in extnNameList if not n.endswith(('_bindings', '_cfgBindings'))]

def GetExtnNameForEvent(self, virtualEvent):
"""Return the name of the extension binding virtualEvent, or None.
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.