Skip to content

Commit c0a2689

Browse files
Merge branch 'master' into pr_2261
2 parents 1113472 + fc1ce81 commit c0a2689

File tree

988 files changed

+63980
-23898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

988 files changed

+63980
-23898
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Lib/test/decimaltestdata/*.decTest -text
2626
Lib/test/test_email/data/*.txt -text
2727
Lib/test/xmltestdata/* -text
2828
Lib/test/coding20731.py -text
29+
Lib/test/test_importlib/data01/* -text
2930

3031
# CRLF files
3132
*.bat text eol=crlf

.github/CODEOWNERS

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

77
# asyncio
8-
**/*asyncio* @1st1
8+
**/*asyncio* @1st1 @asvetlov
99

1010
# Core
11+
**/*context* @1st1
1112
**/*genobject* @1st1
13+
**/*hamt* @1st1
1214

1315
# Hashing
1416
**/*hashlib* @python/crypto-team
1517
**/*pyhash* @python/crypto-team
1618

17-
# Import (including importlib)
18-
**/*import* @python/import-team
19+
# Import (including importlib).
20+
# Ignoring importlib.h so as to not get flagged on
21+
# all pull requests that change the the emitted
22+
# bytecode.
23+
**/*import*.c @python/import-team
24+
**/*import*.py @python/import-team
25+
1926

2027
# SSL
2128
**/*ssl* @python/crypto-team
@@ -50,4 +57,8 @@ Python/bootstrap_hash.c @python/crypto-team
5057
**/*functools* @ncoghlan @rhettinger
5158
**/*decimal* @rhettinger @skrah
5259

60+
**/*dataclasses* @ericvsmith
61+
5362
**/*idlelib* @terryjreedy
63+
64+
**/*typing* @gvanrossum @ilevkivskyi

.github/appveyor.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
version: 3.7.0a0.{build}
1+
version: 3.8build{build}
22
clone_depth: 5
33
branches:
44
only:
55
- master
66
- /\d\.\d/
77
- buildbot-custom
88
cache:
9-
- externals -> PCbuild\*
9+
- externals -> PCbuild
1010
build_script:
1111
- cmd: PCbuild\build.bat -e
1212
- cmd: PCbuild\win32\python.exe -m test.pythoninfo
@@ -16,20 +16,3 @@ environment:
1616
HOST_PYTHON: C:\Python36\python.exe
1717
image:
1818
- Visual Studio 2017
19-
20-
# Only trigger AppVeyor if actual code or its configuration changes
21-
only_commits:
22-
files:
23-
- .github/appveyor.yml
24-
- .gitattributes
25-
- Grammar/
26-
- Include/
27-
- Lib/
28-
- Modules/
29-
- Objects/
30-
- PC/
31-
- PCbuild/
32-
- Parser/
33-
- Programs/
34-
- Python/
35-
- Tools/

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# added for local development
2+
.buildaix/
3+
Modules/python.exp
4+
buildaix/
5+
installp/
6+
.gitignore
7+
18
# Two-trick pony for OSX and other case insensitive file systems:
29
# Ignore ./python binary on Unix but still look into ./Python/ directory.
310
/python

.travis.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ group: beta
77
cache:
88
- pip
99
- ccache
10+
- directories:
11+
- $HOME/multissl
12+
13+
env:
14+
global:
15+
- OPENSSL=1.1.0g
16+
- OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}"
17+
- PATH="${OPENSSL_DIR}/bin:$PATH"
18+
- CFLAGS="-I${OPENSSL_DIR}/include"
19+
- LDFLAGS="-L${OPENSSL_DIR}/lib"
20+
# Set rpath with env var instead of -Wl,-rpath linker flag
21+
# OpenSSL ignores LDFLAGS when linking bin/openssl
22+
- LD_RUN_PATH="${OPENSSL_DIR}/lib"
1023

1124
branches:
1225
only:
@@ -48,6 +61,10 @@ matrix:
4861
echo "Only docs were updated, stopping build process."
4962
exit
5063
fi
64+
python3 Tools/ssl/multissltests.py --steps=library \
65+
--base-directory ${HOME}/multissl \
66+
--openssl ${OPENSSL} >/dev/null
67+
openssl version
5168
./configure
5269
make -s -j4
5370
# Need a venv that can parse covered code.
@@ -66,11 +83,32 @@ matrix:
6683
before_script:
6784
- |
6885
set -e
69-
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
86+
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
87+
files_changed=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
88+
else
89+
# Pull requests are slightly complicated because merging the PR commit without
90+
# rebasing causes it to retain its old commit date. Meaning in history if any
91+
# commits have been made on master that post-date it, they will be accidentally
92+
# included in the diff if we use the TRAVIS_COMMIT_RANGE variable.
93+
files_changed=$(git diff --name-only HEAD $(git merge-base HEAD $TRAVIS_BRANCH))
94+
fi
95+
96+
# Prints changed files in this commit to help debug doc-only build issues.
97+
echo "Files changed: "
98+
echo $files_changed
99+
100+
if ! echo $files_changed | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
70101
then
71102
echo "Only docs were updated, stopping build process."
72103
exit
73104
fi
105+
if [ "${TESTING}" != "docs" ]; then
106+
# clang complains about unused-parameter a lot, redirect stderr
107+
python3 Tools/ssl/multissltests.py --steps=library \
108+
--base-directory ${HOME}/multissl \
109+
--openssl ${OPENSSL} >/dev/null 2>&1
110+
fi
111+
openssl version
74112
./configure --with-pydebug
75113
make -j4
76114
make -j4 regen-all clinic

Doc/bugs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ taken on the bug.
6868

6969
.. seealso::
7070

71-
`How to Report Bugs Effectively <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>`_
71+
`How to Report Bugs Effectively <https://www.chiark.greenend.org.uk/~sgtatham/bugs.html>`_
7272
Article which goes into some detail about how to create a useful bug report.
7373
This describes what kind of information is useful and why it is useful.
7474

Doc/c-api/datetime.rst

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ the module initialisation function. The macro puts a pointer to a C structure
1313
into a static variable, :c:data:`PyDateTimeAPI`, that is used by the following
1414
macros.
1515

16+
Macro for access to the UTC singleton:
17+
18+
.. c:var:: PyObject* PyDateTime_TimeZone_UTC
19+
20+
Returns the time zone singleton representing UTC, the same object as
21+
:attr:`datetime.timezone.utc`.
22+
23+
.. versionadded:: 3.7
24+
25+
1626
Type-check macros:
1727

1828
.. c:function:: int PyDate_Check(PyObject *ob)
@@ -79,27 +89,41 @@ Macros to create objects:
7989
8090
.. c:function:: PyObject* PyDate_FromDate(int year, int month, int day)
8191
82-
Return a ``datetime.date`` object with the specified year, month and day.
92+
Return a :class:`datetime.date` object with the specified year, month and day.
8393
8494
8595
.. c:function:: PyObject* PyDateTime_FromDateAndTime(int year, int month, int day, int hour, int minute, int second, int usecond)
8696
87-
Return a ``datetime.datetime`` object with the specified year, month, day, hour,
97+
Return a :class:`datetime.datetime` object with the specified year, month, day, hour,
8898
minute, second and microsecond.
8999
90100
91101
.. c:function:: PyObject* PyTime_FromTime(int hour, int minute, int second, int usecond)
92102
93-
Return a ``datetime.time`` object with the specified hour, minute, second and
103+
Return a :class:`datetime.time` object with the specified hour, minute, second and
94104
microsecond.
95105
96106
97107
.. c:function:: PyObject* PyDelta_FromDSU(int days, int seconds, int useconds)
98108
99-
Return a ``datetime.timedelta`` object representing the given number of days,
100-
seconds and microseconds. Normalization is performed so that the resulting
101-
number of microseconds and seconds lie in the ranges documented for
102-
``datetime.timedelta`` objects.
109+
Return a :class:`datetime.timedelta` object representing the given number
110+
of days, seconds and microseconds. Normalization is performed so that the
111+
resulting number of microseconds and seconds lie in the ranges documented for
112+
:class:`datetime.timedelta` objects.
113+
114+
.. c:function:: PyObject* PyTimeZone_FromOffset(PyDateTime_DeltaType* offset)
115+
116+
Return a :class:`datetime.timezone` object with an unnamed fixed offset
117+
represented by the *offset* argument.
118+
119+
.. versionadded:: 3.7
120+
121+
.. c:function:: PyObject* PyTimeZone_FromOffsetAndName(PyDateTime_DeltaType* offset, PyUnicode* name)
122+
123+
Return a :class:`datetime.timezone` object with a fixed offset represented
124+
by the *offset* argument and with tzname *name*.
125+
126+
.. versionadded:: 3.7
103127
104128
105129
Macros to extract fields from date objects. The argument must be an instance of
@@ -199,11 +223,11 @@ Macros for the convenience of modules implementing the DB API:
199223
200224
.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args)
201225
202-
Create and return a new ``datetime.datetime`` object given an argument tuple
203-
suitable for passing to ``datetime.datetime.fromtimestamp()``.
226+
Create and return a new :class:`datetime.datetime` object given an argument
227+
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`.
204228
205229
206230
.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args)
207231
208-
Create and return a new ``datetime.date`` object given an argument tuple
209-
suitable for passing to ``datetime.date.fromtimestamp()``.
232+
Create and return a new :class:`datetime.date` object given an argument
233+
tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`.

0 commit comments

Comments
 (0)