Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
96e12d5f
Commit
96e12d5f
authored
Jul 22, 2019
by
Min ho Kim
Committed by
Terry Jan Reedy
Jul 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos in docs, comments and test assert messages (#14872)
parent
8e3a7380
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
24 additions
and
24 deletions
+24
-24
Doc/library/ctypes.rst
Doc/library/ctypes.rst
+1
-1
Lib/asyncio/unix_events.py
Lib/asyncio/unix_events.py
+1
-1
Lib/collections/__init__.py
Lib/collections/__init__.py
+1
-1
Lib/dataclasses.py
Lib/dataclasses.py
+1
-1
Lib/email/headerregistry.py
Lib/email/headerregistry.py
+1
-1
Lib/importlib/_bootstrap_external.py
Lib/importlib/_bootstrap_external.py
+1
-1
Lib/test/support/__init__.py
Lib/test/support/__init__.py
+1
-1
Lib/test/test_dataclasses.py
Lib/test/test_dataclasses.py
+3
-3
Lib/test/test_eintr.py
Lib/test/test_eintr.py
+1
-1
Lib/test/test_fstring.py
Lib/test/test_fstring.py
+1
-1
Lib/test/test_importlib/test_main.py
Lib/test/test_importlib/test_main.py
+1
-1
Lib/test/test_math.py
Lib/test/test_math.py
+2
-2
Lib/test/test_random.py
Lib/test/test_random.py
+1
-1
Misc/NEWS.d/3.5.2rc1.rst
Misc/NEWS.d/3.5.2rc1.rst
+1
-1
Misc/NEWS.d/3.6.0a1.rst
Misc/NEWS.d/3.6.0a1.rst
+1
-1
Misc/NEWS.d/3.6.3rc1.rst
Misc/NEWS.d/3.6.3rc1.rst
+1
-1
Misc/NEWS.d/3.8.0a1.rst
Misc/NEWS.d/3.8.0a1.rst
+1
-1
Misc/NEWS.d/next/Build/2019-06-17-09-40-59.bpo-37189.j5ebdT.rst
...EWS.d/next/Build/2019-06-17-09-40-59.bpo-37189.j5ebdT.rst
+1
-1
Modules/_pickle.c
Modules/_pickle.c
+1
-1
Modules/_xxtestfuzz/fuzzer.c
Modules/_xxtestfuzz/fuzzer.c
+1
-1
Python/initconfig.c
Python/initconfig.c
+1
-1
No files found.
Doc/library/ctypes.rst
View file @
96e12d5f
...
...
@@ -1175,7 +1175,7 @@ Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays
doesn't *copy* the sub-object, instead it retrieves a wrapper object accessing
the root-object's underlying buffer.
Another example that may behave different from what one would expect is this::
Another example that may behave different
ly
from what one would expect is this::
>>> s = c_char_p()
>>> s.value = b"abc def ghi"
...
...
Lib/asyncio/unix_events.py
View file @
96e12d5f
...
...
@@ -1243,7 +1243,7 @@ class ThreadedChildWatcher(AbstractChildWatcher):
It doesn't require subscription on POSIX signal
but a thread creation is not free.
The watcher has O(1) complexity, its perfomance doesn't depend
The watcher has O(1) complexity, its perfo
r
mance doesn't depend
on amount of spawn processes.
"""
...
...
Lib/collections/__init__.py
View file @
96e12d5f
...
...
@@ -440,7 +440,7 @@ def namedtuple(typename, field_names, *, rename=False, defaults=None, module=Non
'__slots__'
:
(),
'_fields'
:
field_names
,
'_field_defaults'
:
field_defaults
,
# alternate spelling for backward compatiblity
# alternate spelling for backward compatib
i
lity
'_fields_defaults'
:
field_defaults
,
'__new__'
:
__new__
,
'_make'
:
_make
,
...
...
Lib/dataclasses.py
View file @
96e12d5f
...
...
@@ -1189,7 +1189,7 @@ def make_dataclass(cls_name, fields, *, bases=(), namespace=None, init=True,
raise
TypeError
(
f'Invalid field:
{
item
!
r
}
'
)
if
not
isinstance
(
name
,
str
)
or
not
name
.
isidentifier
():
raise
TypeError
(
f'Field names must be valid identifers:
{
name
!
r
}
'
)
raise
TypeError
(
f'Field names must be valid identif
i
ers:
{
name
!
r
}
'
)
if
keyword
.
iskeyword
(
name
):
raise
TypeError
(
f'Field names must not be keywords:
{
name
!
r
}
'
)
if
name
in
seen
:
...
...
Lib/email/headerregistry.py
View file @
96e12d5f
...
...
@@ -245,7 +245,7 @@ class BaseHeader(str):
the header name and the ': ' separator.
"""
# At some point we need to put fws here i
i
f it was in the source.
# At some point we need to put fws here if it was in the source.
header
=
parser
.
Header
([
parser
.
HeaderLabel
([
parser
.
ValueTerminal
(
self
.
name
,
'header-name'
),
...
...
Lib/importlib/_bootstrap_external.py
View file @
96e12d5f
...
...
@@ -261,7 +261,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.7a2 3391 (update GET_AITER #31709)
# Python 3.7a4 3392 (PEP 552: Deterministic pycs #31650)
# Python 3.7b1 3393 (remove STORE_ANNOTATION opcode #32550)
# Python 3.7b5 3394 (restored docstring as the fir
ts
stmt in the body;
# Python 3.7b5 3394 (restored docstring as the fir
st
stmt in the body;
# this might affected the first line number #32911)
# Python 3.8a1 3400 (move frame block handling to compiler #17611)
# Python 3.8a1 3401 (add END_ASYNC_FOR #33041)
...
...
Lib/test/support/__init__.py
View file @
96e12d5f
...
...
@@ -2978,7 +2978,7 @@ def fd_count():
if
sys
.
platform
.
startswith
((
'linux'
,
'freebsd'
)):
try
:
names
=
os
.
listdir
(
"/proc/self/fd"
)
# Sub
stract one because listdir() opens internally
a file
# Sub
tract one because listdir() internally opens
a file
# descriptor to list the content of the /proc/self/fd/ directory.
return
len
(
names
)
-
1
except
FileNotFoundError
:
...
...
Lib/test/test_dataclasses.py
View file @
96e12d5f
...
...
@@ -3043,11 +3043,11 @@ class TestMakeDataclass(unittest.TestCase):
def
test_non_identifier_field_names
(
self
):
for
field
in
[
'()'
,
'x,y'
,
'*'
,
'2@3'
,
''
,
'little johnny tables'
]:
with
self
.
subTest
(
field
=
field
):
with
self
.
assertRaisesRegex
(
TypeError
,
'must be valid identifers'
):
with
self
.
assertRaisesRegex
(
TypeError
,
'must be valid identif
i
ers'
):
make_dataclass
(
'C'
,
[
'a'
,
field
])
with
self
.
assertRaisesRegex
(
TypeError
,
'must be valid identifers'
):
with
self
.
assertRaisesRegex
(
TypeError
,
'must be valid identif
i
ers'
):
make_dataclass
(
'C'
,
[
field
])
with
self
.
assertRaisesRegex
(
TypeError
,
'must be valid identifers'
):
with
self
.
assertRaisesRegex
(
TypeError
,
'must be valid identif
i
ers'
):
make_dataclass
(
'C'
,
[
field
,
'a'
])
def
test_underscore_field_names
(
self
):
...
...
Lib/test/test_eintr.py
View file @
96e12d5f
...
...
@@ -22,7 +22,7 @@ class EINTRTests(unittest.TestCase):
print
()
print
(
"--- run eintr_tester.py ---"
,
flush
=
True
)
# In verbose mode, the child process inherit stdout and stdout,
# to see output in realtime and reduce the risk of lo
o
sing output.
# to see output in realtime and reduce the risk of losing output.
args
=
[
sys
.
executable
,
"-E"
,
"-X"
,
"faulthandler"
,
*
args
]
proc
=
subprocess
.
run
(
args
)
print
(
f"--- eintr_tester.py completed: "
...
...
Lib/test/test_fstring.py
View file @
96e12d5f
...
...
@@ -1161,7 +1161,7 @@ non-important content
# These next lines contains tabs. Backslash escapes don'
t
# work in f-strings.
# patchcheck doe
ns
't like these tabs. So the only way to test
# patchcheck doe
sn
't like these tabs. So the only way to test
# this will be to dynamically created and exec the f-strings. But
# that's such a hassle I'll save it for another day. For now, convert
# the tabs to spaces just to shut up patchcheck.
...
...
Lib/test/test_importlib/test_main.py
View file @
96e12d5f
...
...
@@ -32,7 +32,7 @@ class BasicTests(fixtures.DistInfoPkg, unittest.TestCase):
class ImportTests(fixtures.DistInfoPkg, unittest.TestCase):
def test_import_nonexistent_module(self):
# Ensure that the MetadataPathFinder does not crash an import of a
# non
-exista
nt module.
# non
existe
nt module.
with self.assertRaises(ImportError):
importlib.import_module('
does_not_exist
')
...
...
Lib/test/test_math.py
View file @
96e12d5f
...
...
@@ -1875,7 +1875,7 @@ class IsCloseTests(unittest.TestCase):
def
testPerm
(
self
):
perm
=
math
.
perm
factorial
=
math
.
factorial
# Test if factorial defintion is satisfied
# Test if factorial defin
i
tion is satisfied
for
n
in
range
(
100
):
for
k
in
range
(
n
+
1
):
self
.
assertEqual
(
perm
(
n
,
k
),
...
...
@@ -1939,7 +1939,7 @@ class IsCloseTests(unittest.TestCase):
def
testComb
(
self
):
comb
=
math
.
comb
factorial
=
math
.
factorial
# Test if factorial defintion is satisfied
# Test if factorial defin
i
tion is satisfied
for
n
in
range
(
100
):
for
k
in
range
(
n
+
1
):
self
.
assertEqual
(
comb
(
n
,
k
),
factorial
(
n
)
...
...
Lib/test/test_random.py
View file @
96e12d5f
...
...
@@ -228,7 +228,7 @@ class TestBasicOps:
choices
([],
cum_weights
=
[],
k
=
5
)
def
test_choices_subnormal
(
self
):
# Subnormal weights would occas
s
ionally trigger an IndexError
# Subnormal weights would occasionally trigger an IndexError
# in choices() when the value returned by random() was large
# enough to make `random() * total` round up to the total.
# See https://bugs.python.org/msg275594 for more detail.
...
...
Misc/NEWS.d/3.5.2rc1.rst
View file @
96e12d5f
...
...
@@ -2005,7 +2005,7 @@ Adds validation of ucrtbase[d].dll version with warning for old versions.
..
nonce
:
102
DA
-
..
section
:
Build
Avoid
error
about
nonexist
a
nt
fileblocks
.
o
file
by
using
a
lower
-
level
check
Avoid
error
about
nonexist
e
nt
fileblocks
.
o
file
by
using
a
lower
-
level
check
for
st_blocks
in
struct
stat
.
..
...
...
Misc/NEWS.d/3.6.0a1.rst
View file @
96e12d5f
...
...
@@ -3694,7 +3694,7 @@ Adds validation of ucrtbase[d].dll version with warning for old versions.
.. nonce: 102DA-
.. section: Build
Avoid error about nonexist
a
nt fileblocks.o file by using a lower-level check
Avoid error about nonexist
e
nt fileblocks.o file by using a lower-level check
for st_blocks in struct stat.
..
...
...
Misc/NEWS.d/3.6.3rc1.rst
View file @
96e12d5f
...
...
@@ -877,7 +877,7 @@ The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'. Any (global)
customizations made before 3.6.3 will not affect their keyset-specific
customization after 3.6.3. and vice versa.
Inital patch by Charles Wohlganger.
Init
i
al patch by Charles Wohlganger.
..
...
...
Misc/NEWS.d/3.8.0a1.rst
View file @
96e12d5f
...
...
@@ -1358,7 +1358,7 @@ Improved syntax error messages for unbalanced parentheses.
.. section: Core and Builtins
The list constructor will pre-size and not over-allocate when the input
leng
ht
is known.
leng
th
is known.
..
...
...
Misc/NEWS.d/next/Build/2019-06-17-09-40-59.bpo-37189.j5ebdT.rst
View file @
96e12d5f
Many ``PyRun_XXX()`` functions like :c:func:`PyRun_String` were no longer
exported in ``libpython38.dll`` by mistake. Export them again to fix the ABI
compatibiliy.
compatibili
t
y.
Modules/_pickle.c
View file @
96e12d5f
...
...
@@ -2119,7 +2119,7 @@ save_long(PicklerObject *self, PyObject *obj)
/* How many bytes do we need? There are nbits >> 3 full
* bytes of data, and nbits & 7 leftover bits. If there
* are any leftover bits, then we clearly need another
* byte. W
n
at's not so obvious is that we *probably*
* byte. W
h
at's not so obvious is that we *probably*
* need another byte even if there aren't any leftovers:
* the most-significant bit of the most-significant byte
* acts like a sign bit, and it's usually got a sense
...
...
Modules/_xxtestfuzz/fuzzer.c
View file @
96e12d5f
...
...
@@ -210,7 +210,7 @@ static int fuzz_sre_compile(const char* data, size_t size) {
/* Some random patterns used to test re.match.
Be careful not to add catostraphically slow regexes here, we want to
ex
c
ercise the matching code without causing timeouts.*/
exercise the matching code without causing timeouts.*/
static
const
char
*
regex_patterns
[]
=
{
"."
,
"^"
,
"abc"
,
"abc|def"
,
"^xxx$"
,
"
\\
b"
,
"()"
,
"[a-zA-Z0-9]"
,
"abc+"
,
"[^A-Z]"
,
"[x]"
,
"(?=)"
,
"a{z}"
,
"a+b"
,
"a*?"
,
"a??"
,
"a+?"
,
...
...
Python/initconfig.c
View file @
96e12d5f
...
...
@@ -300,7 +300,7 @@ PyStatus
PyWideStringList_Append
(
PyWideStringList
*
list
,
const
wchar_t
*
item
)
{
if
(
list
->
length
==
PY_SSIZE_T_MAX
)
{
/* leng
ht
+1 would overflow */
/* leng
th
+1 would overflow */
return
_PyStatus_NO_MEMORY
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment