Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Doc/library/optparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ An option group is obtained using the class :class:`OptionGroup`:

where

* parser is the :class:`OptionParser` instance the group will be insterted in
* parser is the :class:`OptionParser` instance the group will be inserted in
to
* title is the group title
* description, optional, is a long description of the group
Expand Down
3 changes: 1 addition & 2 deletions Doc/library/ossaudiodev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the standard audio interface for Linux and recent versions of FreeBSD.
.. Things will get more complicated for future Linux versions, since
ALSA is in the standard kernel as of 2.5.x. Presumably if you
use ALSA, you'll have to make sure its OSS compatibility layer
is active to use ossaudiodev, but you're gonna need it for the vast
is active to use ossaudiodev, but you're going to need it for the vast
majority of Linux audio apps anyway.

Sounds like things are also complicated for other BSDs. In response
Expand Down Expand Up @@ -447,4 +447,3 @@ The remaining methods are specific to audio mixing:
microphone input::

mixer.setrecsrc (1 << ossaudiodev.SOUND_MIXER_MIC)

@srinivasreddy srinivasreddy Jan 10, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls do not remove existing lines. In other places too

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can revert this, but I'm curious, why do you want two empty lines at the bottom?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry. I didn't look at the file. If it is at bottom, you can keep it. I am worried about introducing unnecessary git diffs in the middle of a file.

4 changes: 2 additions & 2 deletions Lib/ctypes/_aix.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
In documentation the archive is also referred to as the "base" and the shared
library object is referred to as the "member".

For dlopen() on AIX (read initAndLoad()) the calls are similiar.
For dlopen() on AIX (read initAndLoad()) the calls are similar.
Default activity occurs when no path information is provided. When path
information is provided dlopen() does not search any other directories.

Expand Down Expand Up @@ -90,7 +90,7 @@ def get_ld_header_info(p):
if re.match("[0-9]", line):
info.append(line)
else:
# blank line (seperator), consume line and end for loop
# blank line (separator), consume line and end for loop
break
return info

Expand Down
2 changes: 1 addition & 1 deletion Lib/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def _process_class(cls, repr, eq, order, hash, init, frozen):


# _cls should never be specified by keyword, so start it with an
# underscore. The presense of _cls is used to detect if this
# underscore. The presence of _cls is used to detect if this
# decorator is being called with parameters or not.
def dataclass(_cls=None, *, init=True, repr=True, eq=True, order=False,
hash=None, frozen=False):
Expand Down
4 changes: 2 additions & 2 deletions Lib/email/_header_value_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2739,8 +2739,8 @@ def _fold_mime_parameters(part, lines, maxlen, encoding):

Using the decoded list of parameters and values, format them according to
the RFC rules, including using RFC2231 encoding if the value cannot be
expressed in 'encoding' and/or the paramter+value is too long to fit within
'maxlen'.
expressed in 'encoding' and/or the parameter+value is too long to fit
within 'maxlen'.

"""
# Special case for RFC2231 encoding: start from decoded values and use
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def create_page_font_tab(self):
Changing any of the font vars invokes var_changed_font, which
adds all 3 font options to changes and calls set_samples.
Set_samples applies a new font constructed from the font vars to
font_sample and to highlight_sample on the hightlight page.
font_sample and to highlight_sample on the highlight page.

Tabs: Enable users to change spaces entered for indent tabs.
Changing indent_scale value with the mouse sets Var space_num,
Expand Down Expand Up @@ -646,7 +646,7 @@ def set_samples(self, event=None):

Called on font initialization and change events.
Accesses font_name, font_size, and font_bold Variables.
Updates font_sample and hightlight page highlight_sample.
Updates font_sample and highlight page highlight_sample.
"""
font_name = self.font_name.get()
font_weight = tkFont.BOLD if self.font_bold.get() else tkFont.NORMAL
Expand Down
2 changes: 1 addition & 1 deletion Lib/opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def jabs_op(name, op):
def_op('BUILD_TUPLE', 102) # Number of tuple items
def_op('BUILD_LIST', 103) # Number of list items
def_op('BUILD_SET', 104) # Number of set items
def_op('BUILD_MAP', 105) # Number of dict entries (upto 255)
def_op('BUILD_MAP', 105) # Number of dict entries (up to 255)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"(up to 255)" is outdated (in 3.6 too). Just remove it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elopio or whoever makes the change should refresh the patch against master.

name_op('LOAD_ATTR', 106) # Index in name list
def_op('COMPARE_OP', 107) # Comparison operator
hascompare.append(107)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/datetimetester.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ def test_tz_independent_comparing(self):

# Make sure comparison doesn't forget microseconds, and isn't done
# via comparing a float timestamp (an IEEE double doesn't have enough
# precision to span microsecond resolution across years 1 thru 9999,
# precision to span microsecond resolution across years 1 through 9999,
# so comparing via timestamp necessarily calls some distinct values
# equal).
dt1 = self.theclass(MAXYEAR, 12, 31, 23, 59, 59, 999998)
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/decimaltestdata/abs.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
version: 2.59

-- This set of tests primarily tests the existence of the operator.
-- Additon, subtraction, rounding, and more overflows are tested

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an external source. I would prefer not to maintain our own version, even for typos.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted.

-- Addition, subtraction, rounding, and more overflows are tested
-- elsewhere.

precision: 9
Expand Down Expand Up @@ -158,4 +158,3 @@ absx527 abs -sNaN33 -> -NaN33 Invalid_operation

-- Null tests
absx900 abs # -> NaN Invalid_operation

4 changes: 2 additions & 2 deletions Lib/test/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class samplecmdclass(cmd.Cmd):

Test for the function completedefault():
>>> mycmd.completedefault()
This is the completedefault methode
This is the completedefault method
>>> mycmd.completenames("a")
['add']

Expand Down Expand Up @@ -140,7 +140,7 @@ def postloop(self):
print("Hello from postloop")

def completedefault(self, *ignored):
print("This is the completedefault methode")
print("This is the completedefault method")

def complete_command(self):
print("complete command")
Expand Down
12 changes: 6 additions & 6 deletions Lib/test/test_concurrent_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def test_del_shutdown(self):
queue_management_thread = executor._queue_management_thread
del executor

# Make sure that all the executor ressources were properly cleaned by
# Make sure that all the executor resources were properly cleaned by
# the shutdown process
queue_management_thread.join()
for p in processes.values():
Expand Down Expand Up @@ -886,32 +886,32 @@ def test_crash(self):
# extensive testing for deadlock caused by crashes in a pool.
self.executor.shutdown(wait=True)
crash_cases = [
# Check problem occuring while pickling a task in
# Check problem occurring while pickling a task in
# the task_handler thread
(id, (ErrorAtPickle(),), PicklingError, "error at task pickle"),
# Check problem occuring while unpickling a task on workers
# Check problem occurring while unpickling a task on workers
(id, (ExitAtUnpickle(),), BrokenProcessPool,
"exit at task unpickle"),
(id, (ErrorAtUnpickle(),), BrokenProcessPool,
"error at task unpickle"),
(id, (CrashAtUnpickle(),), BrokenProcessPool,
"crash at task unpickle"),
# Check problem occuring during func execution on workers
# Check problem occurring during func execution on workers
(_crash, (), BrokenProcessPool,
"crash during func execution on worker"),
(_exit, (), SystemExit,
"exit during func execution on worker"),
(_raise_error, (RuntimeError, ), RuntimeError,
"error during func execution on worker"),
# Check problem occuring while pickling a task result
# Check problem occurring while pickling a task result
# on workers
(_return_instance, (CrashAtPickle,), BrokenProcessPool,
"crash during result pickle on worker"),
(_return_instance, (ExitAtPickle,), SystemExit,
"exit during result pickle on worker"),
(_return_instance, (ErrorAtPickle,), PicklingError,
"error during result pickle on worker"),
# Check problem occuring while unpickling a task in
# Check problem occurring while unpickling a task in
# the result_handler thread
(_return_instance, (ErrorAtUnpickle,), BrokenProcessPool,
"error during result unpickle in result_handler"),
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ def second():
succs[final].remove(corner)
add_to_successors(this)

# Generate moves 3 thru m*n-1.
# Generate moves 3 through m*n-1.
def advance(len=len):
# If some successor has only one exit, must take it.
# Else favor successors with fewer exits.
Expand All @@ -1538,7 +1538,7 @@ def advance(len=len):
yield i
add_to_successors(i)

# Generate moves 3 thru m*n-1. Alternative version using a
# Generate moves 3 through m*n-1. Alternative version using a
# stronger (but more expensive) heuristic to order successors.
# Since the # of backtracking levels is m*n, a poor move early on
# can take eons to undo. Smallest square board for which this
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_weakref.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ def __eq__(self, other):
# has to keep looping to find the first object we delete.
objs.reverse()

# Turn on mutation in C.__eq__. The first time thru the loop,
# Turn on mutation in C.__eq__. The first time through the loop,
# under the iterkeys() business the first comparison will delete
# the last item iterkeys() would see, and that causes a
# RuntimeError: dictionary changed size during iteration
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/test/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def loadTestsFromModule(module, pattern=None):
['a_directory', 'test_directory', 'test_directory2'])

# load_tests should have been called once with loader, tests and pattern
# (but there are no tests in our stub module itself, so thats [] at the
# (but there are no tests in our stub module itself, so that's [] at the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'that is' would maybe be even better

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

# time of call.
self.assertEqual(Module.load_tests_args,
[(loader, [], 'test*')])
Expand Down
2 changes: 1 addition & 1 deletion Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ is_coroutine(PyObject *coro)
return _is_coroutine(coro);
}

/* either an error has occured or
/* either an error has occurred or
type(coro) is in iscoroutine_typecache
*/
return has_it;
Expand Down
16 changes: 8 additions & 8 deletions Modules/_ctypes/libffi_msvc/win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
win32.S - Copyright (c) 1996, 1998, 2001, 2002 Red Hat, Inc.
Copyright (c) 2001 John Beniton
Copyright (c) 2002 Ranjit Mathew

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize we have our own copy of libffi for Windows. Wouldn't changes to these files cause porting upstream changes more difficult? I suggest we not change any libffi files. See Modules/_ctypes/libffi_osx/README.ctypes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted.



X86 Foreign Function Interface

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Expand Down Expand Up @@ -56,7 +56,7 @@ ffi_call_x86(void (* prepfunc)(char *, extended_cif *), /* 8 */
// Make room for all of the new args.
mov ecx, [ebp+16]
sub esp, ecx // sub esp, bytes

mov eax, esp

// Place all of the ffi_prep_args in position
Expand All @@ -74,7 +74,7 @@ ffi_call_x86(void (* prepfunc)(char *, extended_cif *), /* 8 */
mov ecx, [ebp + 12]
mov ecx, [ecx]ecif.cif
mov ecx, [ecx]ecif.cif.abi

cmp ecx, FFI_STDCALL
je noclean
// STDCALL: Remove the space we pushed for the args
Expand All @@ -90,7 +90,7 @@ ffi_call_x86(void (* prepfunc)(char *, extended_cif *), /* 8 */

// If the return value pointer is NULL, assume no return value.
/*
Intel asm is weird. We have to explicitely specify 'DWORD PTR' in the nexr instruction,
Intel asm is weird. We have to explicitly specify 'DWORD PTR' in the nexr instruction,
otherwise only one BYTE will be compared (instead of a DWORD)!
*/
cmp DWORD PTR [ebp + 24], 0
Expand Down
8 changes: 4 additions & 4 deletions Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ ffi_call(
+---------------------------------------+ 160
| result area 8 |
+---------------------------------------+ 168
| alignement to the next multiple of 16 |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment with this file:

I realize we have our own copy of libffi for OS-X. Wouldn't changes to these files cause porting upstream changes more difficult? I suggest we not change any libffi files. See Modules/_ctypes/libffi_osx/README.pyobjc.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted.

| alignment to the next multiple of 16 |
SP current --> +---------------------------------------+ 176 <- parent frame
| back chain to caller 4 |
+---------------------------------------+ 180
Expand Down Expand Up @@ -891,7 +891,7 @@ ffi_closure_helper_DARWIN(
avalue[i] = alloca(arg_types[i]->size);
ffi64_struct_to_ram_form(arg_types[i], (const char*)pgr,
&gprSize, (const char*)pfr, &fprSize, &nf, avalue[i], NULL);

ng += gprSize / sizeof(long);
pgr += gprSize / sizeof(long);
pfr += (fprSize - savedFPRSize) / sizeof(double);
Expand Down Expand Up @@ -1479,7 +1479,7 @@ ffi64_struct_to_reg_form(
memcpy(&outGPRs[destGMarker],
&inStruct[srcMarker], inType->size);
}

srcMarker += inType->size;
destGMarker += inType->size;
i += inType->size - 1;
Expand Down Expand Up @@ -1561,7 +1561,7 @@ ffi64_struct_to_reg_form(
case FFI_TYPE_STRUCT:
recurseCount++;
ffi64_struct_to_reg_form(inType->elements[i],
inStruct, &srcMarker, &fprsUsed, outGPRs,
inStruct, &srcMarker, &fprsUsed, outGPRs,
&destGMarker, outFPRs, &destFMarker);
recurseCount--;
break;
Expand Down
4 changes: 2 additions & 2 deletions Modules/_datetimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ static int parse_isoformat_date(const char *dtstr,
if (NULL == p) {
return -1;
}

if (*(p++) != '-') {
return -2;
}
Expand Down Expand Up @@ -3373,7 +3373,7 @@ tzinfo_fromutc(PyDateTime_TZInfo *self, PyObject *dt)
PyErr_SetString(PyExc_ValueError, "fromutc: tz.dst() gave"
"inconsistent results; cannot convert");

/* fall thru to failure */
/* fall through to failure */
Fail:
Py_XDECREF(off);
Py_XDECREF(dst);
Expand Down
2 changes: 1 addition & 1 deletion Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ generate_hash_name_list(void)
* This macro generates constructor function definitions for specific
* hash algorithms. These constructors are much faster than calling
* the generic one passing it a python string and are noticeably
* faster than calling a python new() wrapper. Thats important for
* faster than calling a python new() wrapper. That's important for
* code that wants to make hashes of a bunch of small strings.
* The first call will lazy-initialize, which reports an exception
* if initialization fails.
Expand Down
2 changes: 1 addition & 1 deletion Modules/_pickle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ _Pickler_OpcodeBoundary(PicklerObject *self)
if(_Pickler_CommitFrame(self)) {
return -1;
}
/* Flush the content of the commited frame to the underlying
/* Flush the content of the committed frame to the underlying
* file and reuse the pickler buffer for the next frame so as
* to limit memory usage when dumping large complex objects to
* a file.
Expand Down
2 changes: 1 addition & 1 deletion Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ md5_done(struct md5_state *md5, unsigned char *out)
md5->curlen = 0;
}

/* pad upto 56 bytes of zeroes */
/* pad up to 56 bytes of zeroes */
while (md5->curlen < 56) {
md5->buf[md5->curlen++] = (unsigned char)0;
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -6017,7 +6017,7 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
}
#if defined(__APPLE__) && defined(AI_NUMERICSERV)
if ((flags & AI_NUMERICSERV) && (pptr == NULL || (pptr[0] == '0' && pptr[1] == 0))) {
/* On OSX upto at least OSX 10.8 getaddrinfo crashes
/* On OSX up to at least OSX 10.8 getaddrinfo crashes
* if AI_NUMERICSERV is set and the servname is NULL or "0".
* This workaround avoids a segfault in libsystem.
*/
Expand Down
2 changes: 1 addition & 1 deletion Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ pool_is_in_list(const poolp target, poolp list)
* checks.
*
* Return 0 if the memory debug hooks are not installed or no statistics was
* writen into out, return 1 otherwise.
* written into out, return 1 otherwise.
*/
int
_PyObject_DebugMallocStats(FILE *out)
Expand Down
2 changes: 1 addition & 1 deletion Objects/tupleobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ tuplerepr(PyTupleObject *v)

/* The addend 82520, was selected from the range(0, 1000000) for
generating the greatest number of prime multipliers for tuples
upto length eight:
up to length eight:

1082527, 1165049, 1082531, 1165057, 1247581, 1330103, 1082533,
1330111, 1412633, 1165069, 1247599, 1495177, 1577699
Expand Down
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5121,7 +5121,7 @@ PyType_Ready(PyTypeObject *type)
/* PyType_Ready is the closest thing we have to a choke point
* for type objects, so is the best place I can think of to try
* to get type objects into the doubly-linked list of all objects.
* Still, not all type objects go thru PyType_Ready.
* Still, not all type objects go through PyType_Ready.
*/
_Py_AddToAllObjects((PyObject *)type, 0);
#endif
Expand Down
Loading