diff --git a/docs/3rd-party-py3k-compat-code/jinja2_compat.py b/docs/3rd-party-py3k-compat-code/jinja2_compat.py index 1326cbc6..0456faae 100644 --- a/docs/3rd-party-py3k-compat-code/jinja2_compat.py +++ b/docs/3rd-party-py3k-compat-code/jinja2_compat.py @@ -85,7 +85,7 @@ def encode_filename(filename): def with_metaclass(meta, *bases): # This requires a bit of explanation: the basic idea is to make a - # dummy metaclass for one level of class instanciation that replaces + # dummy metaclass for one level of class instantiation that replaces # itself with the actual metaclass. Because of internal type checks # we also need to make sure that we downgrade the custom metaclass # for one level to something closer to type (that's why __call__ and diff --git a/docs/notebooks/object special methods (next, bool, ...).ipynb b/docs/notebooks/object special methods (next, bool, ...).ipynb index 5729ddc5..7da31856 100644 --- a/docs/notebooks/object special methods (next, bool, ...).ipynb +++ b/docs/notebooks/object special methods (next, bool, ...).ipynb @@ -63,7 +63,7 @@ "collapsed": false, "input": [ "# Py3-style iterators written as new-style classes (subclasses of\n", - "# future.builtins.object) are backward compatibile with Py2:\n", + "# future.builtins.object) are backward compatible with Py2:\n", "class Upper(object):\n", " def __init__(self, iterable):\n", " self._iter = iter(iterable)\n", diff --git a/docs/standard_library_imports.rst b/docs/standard_library_imports.rst index 60442541..c09e9e30 100644 --- a/docs/standard_library_imports.rst +++ b/docs/standard_library_imports.rst @@ -15,7 +15,7 @@ As of version 0.14, the ``future`` package comes with top-level packages for Python 2.x that provide access to the reorganized standard library modules under their Python 3.x names. -Direct imports are the preferred mechanism for accesing the renamed standard +Direct imports are the preferred mechanism for accessing the renamed standard library modules in Python 2/3 compatible code. For example, the following clean Python 3 code runs unchanged on Python 2 after installing ``future``:: diff --git a/docs/whatsnew.rst b/docs/whatsnew.rst index 9018fdfe..a2b0fa55 100644 --- a/docs/whatsnew.rst +++ b/docs/whatsnew.rst @@ -95,7 +95,7 @@ This is a major bug-fix and feature release, including: - Fix an issue with copyreg import under Py3 that results in unexposed stdlib functionality - Export and document types in future.utils - Update behavior of newstr.__eq__() to match str.__eq__() as per reference docs -- Fix raising and the raising fixer to handle cases where the syntax is ambigious +- Fix raising and the raising fixer to handle cases where the syntax is ambiguous - Allow "default" parameter in min() and max() (Issue #334) - Implement __hash__() in newstr (Issue #454) - Future proof some version checks to handle the fact that Py4 won't be a major breaking release @@ -127,7 +127,7 @@ This is a major bug-fix release, including: - Fix ``past.translation`` on read-only file systems - Fix Tkinter import bug introduced in Python 2.7.4 (issue #262) - Correct TypeError to ValueError in a specific edge case for newrange -- Support inequality tests betwen newstrs and newbytes +- Support inequality tests between newstrs and newbytes - Add type check to __get__ in newsuper - Fix fix_divsion_safe to support better conversion of complex expressions, and skip obvious float division. diff --git a/src/future/backports/datetime.py b/src/future/backports/datetime.py index 3261014e..8cd62ddf 100644 --- a/src/future/backports/datetime.py +++ b/src/future/backports/datetime.py @@ -689,7 +689,7 @@ def today(cls): @classmethod def fromordinal(cls, n): - """Contruct a date from a proleptic Gregorian ordinal. + """Construct a date from a proleptic Gregorian ordinal. January 1 of year 1 is day 1. Only the year, month and day are non-zero in the result. diff --git a/src/future/backports/email/_header_value_parser.py b/src/future/backports/email/_header_value_parser.py index 43957edc..59b1b318 100644 --- a/src/future/backports/email/_header_value_parser.py +++ b/src/future/backports/email/_header_value_parser.py @@ -2867,7 +2867,7 @@ def parse_content_type_header(value): _find_mime_parameters(ctype, value) return ctype ctype.append(token) - # XXX: If we really want to follow the formal grammer we should make + # XXX: If we really want to follow the formal grammar we should make # mantype and subtype specialized TokenLists here. Probably not worth it. if not value or value[0] != '/': ctype.defects.append(errors.InvalidHeaderDefect( diff --git a/src/future/backports/email/parser.py b/src/future/backports/email/parser.py index df1c6e28..79f0e5a3 100644 --- a/src/future/backports/email/parser.py +++ b/src/future/backports/email/parser.py @@ -26,7 +26,7 @@ def __init__(self, _class=Message, **_3to2kwargs): textual representation of the message. The string must be formatted as a block of RFC 2822 headers and header - continuation lines, optionally preceeded by a `Unix-from' header. The + continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the string or by a blank line. @@ -92,7 +92,7 @@ def __init__(self, *args, **kw): textual representation of the message. The input must be formatted as a block of RFC 2822 headers and header - continuation lines, optionally preceeded by a `Unix-from' header. The + continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the input or by a blank line. diff --git a/src/future/backports/xmlrpc/client.py b/src/future/backports/xmlrpc/client.py index b78e5bad..cab75390 100644 --- a/src/future/backports/xmlrpc/client.py +++ b/src/future/backports/xmlrpc/client.py @@ -1251,7 +1251,7 @@ def close(self): # Send HTTP request. # # @param host Host descriptor (URL or (URL, x509 info) tuple). - # @param handler Targer RPC handler (a path relative to host) + # @param handler Target RPC handler (a path relative to host) # @param request_body The XML-RPC request body # @param debug Enable debugging if debug is true. # @return An HTTPConnection. diff --git a/src/future/standard_library/__init__.py b/src/future/standard_library/__init__.py index 2cee75db..08a2828a 100644 --- a/src/future/standard_library/__init__.py +++ b/src/future/standard_library/__init__.py @@ -17,7 +17,7 @@ import socketserver import winreg # on Windows only import test.support - import html, html.parser, html.entites + import html, html.parser, html.entities import http, http.client, http.server import http.cookies, http.cookiejar import urllib.parse, urllib.request, urllib.response, urllib.error, urllib.robotparser diff --git a/src/future/types/newint.py b/src/future/types/newint.py index 04a411e9..2c86ce18 100644 --- a/src/future/types/newint.py +++ b/src/future/types/newint.py @@ -318,7 +318,7 @@ def to_bytes(self, length, byteorder='big', signed=False): bits = length * 8 num = (2**bits) + self if num <= 0: - raise OverflowError("int too smal to convert") + raise OverflowError("int too small to convert") else: if self < 0: raise OverflowError("can't convert negative int to unsigned") diff --git a/src/future/types/newrange.py b/src/future/types/newrange.py index 6d4ebe2f..dc5eb802 100644 --- a/src/future/types/newrange.py +++ b/src/future/types/newrange.py @@ -105,7 +105,7 @@ def index(self, value): raise ValueError('%r is not in range' % value) def count(self, value): - """Return the number of ocurrences of integer `value` + """Return the number of occurrences of integer `value` in the sequence this range represents.""" # a value can occur exactly zero or one times return int(value in self) diff --git a/src/libfuturize/fixer_util.py b/src/libfuturize/fixer_util.py index 48e4689d..cf646b61 100644 --- a/src/libfuturize/fixer_util.py +++ b/src/libfuturize/fixer_util.py @@ -116,7 +116,7 @@ def suitify(parent): """ for node in parent.children: if node.type == syms.suite: - # already in the prefered format, do nothing + # already in the preferred format, do nothing return # One-liners have no suite node, we have to fake one up diff --git a/src/libfuturize/fixes/fix_metaclass.py b/src/libfuturize/fixes/fix_metaclass.py index 2ac41c97..a7eee40d 100644 --- a/src/libfuturize/fixes/fix_metaclass.py +++ b/src/libfuturize/fixes/fix_metaclass.py @@ -37,7 +37,7 @@ def has_metaclass(parent): """ we have to check the cls_node without changing it. - There are two possiblities: + There are two possibilities: 1) clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta') 2) clsdef => simple_stmt => expr_stmt => Leaf('__meta') """ @@ -63,7 +63,7 @@ def fixup_parse_tree(cls_node): # already in the preferred format, do nothing return - # !%@#! oneliners have no suite node, we have to fake one up + # !%@#! one-liners have no suite node, we have to fake one up for i, node in enumerate(cls_node.children): if node.type == token.COLON: break diff --git a/tests/test_future/test_http_cookiejar.py b/tests/test_future/test_http_cookiejar.py index 079026bc..8a98ed68 100644 --- a/tests/test_future/test_http_cookiejar.py +++ b/tests/test_future/test_http_cookiejar.py @@ -380,7 +380,7 @@ class CookieTests(unittest.TestCase): ## comma-separated list, it'll be a headache to parse (at least my head ## starts hurting every time I think of that code). ## - Expires: You'll get all sorts of date formats in the expires, -## including emtpy expires attributes ("expires="). Be as flexible as you +## including empty expires attributes ("expires="). Be as flexible as you ## can, and certainly don't expect the weekday to be there; if you can't ## parse it, just ignore it and pretend it's a session cookie. ## - Domain-matching: Netscape uses the 2-dot rule for _all_ domains, not @@ -1734,7 +1734,7 @@ def test_session_cookies(self): key = "%s_after" % cookie.value counter[key] = counter[key] + 1 - # a permanent cookie got lost accidently + # a permanent cookie got lost accidentally self.assertEqual(counter["perm_after"], counter["perm_before"]) # a session cookie hasn't been cleared self.assertEqual(counter["session_after"], 0) diff --git a/tests/test_future/test_standard_library.py b/tests/test_future/test_standard_library.py index 1028f6fc..ad7e1486 100644 --- a/tests/test_future/test_standard_library.py +++ b/tests/test_future/test_standard_library.py @@ -593,7 +593,7 @@ def test_future_moves_dbm(self): from future.moves.dbm import ndbm -# Running the following tkinter test causes the following bizzare test failure: +# Running the following tkinter test causes the following bizarre test failure: # # ====================================================================== # FAIL: test_open_default_encoding (future.tests.test_builtins.BuiltinTest) diff --git a/tests/test_future/test_urllib.py b/tests/test_future/test_urllib.py index 278bafb5..64e89760 100644 --- a/tests/test_future/test_urllib.py +++ b/tests/test_future/test_urllib.py @@ -1,4 +1,4 @@ -"""Regresssion tests for urllib""" +"""Regression tests for urllib""" from __future__ import absolute_import, division, unicode_literals import io @@ -1229,7 +1229,7 @@ def open_spam(self, url): # Everywhere else they work ok, but on those machines, sometimes # fail in one of the tests, sometimes in other. I have a linux, and # the tests go ok. -# If anybody has one of the problematic enviroments, please help! +# If anybody has one of the problematic environments, please help! # . Facundo # # def server(evt): diff --git a/tests/test_future/test_urllib_toplevel.py b/tests/test_future/test_urllib_toplevel.py index 93364e6d..442d00e5 100644 --- a/tests/test_future/test_urllib_toplevel.py +++ b/tests/test_future/test_urllib_toplevel.py @@ -1,4 +1,4 @@ -"""Regresssion tests for urllib""" +"""Regression tests for urllib""" from __future__ import absolute_import, division, unicode_literals import io @@ -1247,7 +1247,7 @@ def open_spam(self, url): # Everywhere else they work ok, but on those machines, sometimes # fail in one of the tests, sometimes in other. I have a linux, and # the tests go ok. -# If anybody has one of the problematic enviroments, please help! +# If anybody has one of the problematic environments, please help! # . Facundo # # def server(evt):