Skip to content

Commit 7aa5341

Browse files
committed
Reverting my previous commit.
Something went horribly wrong when I was doing `hg rebase`.
1 parent 802d45b commit 7aa5341

File tree

19 files changed

+787
-1101
lines changed

19 files changed

+787
-1101
lines changed

Doc/tutorial/interpreter.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
3.6.. _tut-using:
1+
.. _tut-using:
22

33
****************************
44
Using the Python Interpreter
@@ -10,25 +10,25 @@ Using the Python Interpreter
1010
Invoking the Interpreter
1111
========================
1212

13-
The Python interpreter is usually installed as :file:`/usr/local/bin/python3.6`
13+
The Python interpreter is usually installed as :file:`/usr/local/bin/python3.5`
1414
on those machines where it is available; putting :file:`/usr/local/bin` in your
1515
Unix shell's search path makes it possible to start it by typing the command:
1616

1717
.. code-block:: text
1818
19-
python3.6
19+
python3.5
2020
2121
to the shell. [#]_ Since the choice of the directory where the interpreter lives
2222
is an installation option, other places are possible; check with your local
2323
Python guru or system administrator. (E.g., :file:`/usr/local/python` is a
2424
popular alternative location.)
2525

2626
On Windows machines, the Python installation is usually placed in
27-
:file:`C:\\Python36`, though you can change this when you're running the
27+
:file:`C:\\Python35`, though you can change this when you're running the
2828
installer. To add this directory to your path, you can type the following
2929
command into the command prompt in a DOS box::
3030

31-
set path=%path%;C:\python36
31+
set path=%path%;C:\python35
3232

3333
Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` on
3434
Windows) at the primary prompt causes the interpreter to exit with a zero exit
@@ -96,8 +96,8 @@ with the *secondary prompt*, by default three dots (``...``). The interpreter
9696
prints a welcome message stating its version number and a copyright notice
9797
before printing the first prompt::
9898

99-
$ python3.6
100-
Python 3.6 (default, Sep 16 2015, 09:25:04)
99+
$ python3.5
100+
Python 3.5 (default, Sep 16 2015, 09:25:04)
101101
[GCC 4.8.2] on linux
102102
Type "help", "copyright", "credits" or "license" for more information.
103103
>>>

Doc/tutorial/stdlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ operating system::
1515

1616
>>> import os
1717
>>> os.getcwd() # Return the current working directory
18-
'C:\\Python36'
18+
'C:\\Python35'
1919
>>> os.chdir('/server/accesslogs') # Change current working directory
2020
>>> os.system('mkdir today') # Run the command mkdir in the system shell
2121
0

Doc/tutorial/stdlib2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ applications include caching objects that are expensive to create::
277277
Traceback (most recent call last):
278278
File "<stdin>", line 1, in <module>
279279
d['primary'] # entry was automatically removed
280-
File "C:/python36/lib/weakref.py", line 46, in __getitem__
280+
File "C:/python35/lib/weakref.py", line 46, in __getitem__
281281
o = self.data[key]()
282282
KeyError: 'primary'
283283

Doc/whatsnew/3.6.rst

Lines changed: 0 additions & 166 deletions
This file was deleted.

Doc/whatsnew/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ anyone wishing to stay up-to-date after a new release.
1111
.. toctree::
1212
:maxdepth: 2
1313

14-
3.6.rst
1514
3.5.rst
1615
3.4.rst
1716
3.3.rst

Include/patchlevel.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
/* Version parsed out into numeric values */
1818
/*--start constants--*/
1919
#define PY_MAJOR_VERSION 3
20-
#define PY_MINOR_VERSION 6
20+
#define PY_MINOR_VERSION 5
2121
#define PY_MICRO_VERSION 0
22-
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
23-
#define PY_RELEASE_SERIAL 0
22+
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
23+
#define PY_RELEASE_SERIAL 1
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.6.0a0"
26+
#define PY_VERSION "3.5.0b1+"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

Lib/string.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ def convert(mo):
112112
# Check the most common path first.
113113
named = mo.group('named') or mo.group('braced')
114114
if named is not None:
115-
return str(mapping[named])
115+
val = mapping[named]
116+
# We use this idiom instead of str() because the latter will
117+
# fail if val is a Unicode containing non-ASCII characters.
118+
return '%s' % (val,)
116119
if mo.group('escaped') is not None:
117120
return self.delimiter
118121
if mo.group('invalid') is not None:
@@ -139,7 +142,9 @@ def convert(mo):
139142
named = mo.group('named') or mo.group('braced')
140143
if named is not None:
141144
try:
142-
return str(mapping[named])
145+
# We use this idiom instead of str() because the latter
146+
# will fail if val is a Unicode containing non-ASCII
147+
return '%s' % (mapping[named],)
143148
except KeyError:
144149
return mo.group()
145150
if mo.group('escaped') is not None:

Lib/test/test_collections.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,14 +1965,7 @@ def test_sizeof(self):
19651965
od = OrderedDict(**d)
19661966
self.assertGreater(sys.getsizeof(od), sys.getsizeof(d))
19671967

1968-
def test_views(self):
19691968
OrderedDict = self.module.OrderedDict
1970-
# See http://bugs.python.org/issue24286
1971-
s = 'the quick brown fox jumped over a lazy dog yesterday before dawn'.split()
1972-
od = OrderedDict.fromkeys(s)
1973-
self.assertEqual(od.keys(), dict(od).keys())
1974-
self.assertEqual(od.items(), dict(od).items())
1975-
19761969
def test_override_update(self):
19771970
OrderedDict = self.module.OrderedDict
19781971
# Verify that subclasses can override update() without breaking __init__()

Lib/test/test_dictviews.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import collections
21
import unittest
32

43
class DictSetTest(unittest.TestCase):
@@ -198,27 +197,6 @@ def test_recursive_repr(self):
198197
d[42] = d.values()
199198
self.assertRaises(RuntimeError, repr, d)
200199

201-
def test_abc_registry(self):
202-
d = dict(a=1)
203-
204-
self.assertIsInstance(d.keys(), collections.KeysView)
205-
self.assertIsInstance(d.keys(), collections.MappingView)
206-
self.assertIsInstance(d.keys(), collections.Set)
207-
self.assertIsInstance(d.keys(), collections.Sized)
208-
self.assertIsInstance(d.keys(), collections.Iterable)
209-
self.assertIsInstance(d.keys(), collections.Container)
210-
211-
self.assertIsInstance(d.values(), collections.ValuesView)
212-
self.assertIsInstance(d.values(), collections.MappingView)
213-
self.assertIsInstance(d.values(), collections.Sized)
214-
215-
self.assertIsInstance(d.items(), collections.ItemsView)
216-
self.assertIsInstance(d.items(), collections.MappingView)
217-
self.assertIsInstance(d.items(), collections.Set)
218-
self.assertIsInstance(d.items(), collections.Sized)
219-
self.assertIsInstance(d.items(), collections.Iterable)
220-
self.assertIsInstance(d.items(), collections.Container)
221-
222200

223201
if __name__ == "__main__":
224202
unittest.main()

Lib/test/test_symbol.py

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)