Merge with 3.3
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 28 Feb 2014 14:43:36 +0000 (15:43 +0100)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 28 Feb 2014 14:43:36 +0000 (15:43 +0100)
1  2 
.hgeol
Lib/test/coding20731.py
Lib/test/test_source_encoding.py
Misc/NEWS
Parser/tokenizer.c

diff --cc .hgeol
Simple merge
index 0000000000000000000000000000000000000000,ca4962ee8efa8231cc0e97b06e4fa5013d67c314..b0e227ad110e94554194adf031619c7a174e4b4f
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,4 +1,4 @@@
 -#coding:latin1
 -
 -
 -
++#coding:latin1\r
++\r
++\r
++\r
index cd9d2b374c735f316cee040b5439721c597b0369,324ae3861965d1f9500fe21872ac58fab61ac2ca..39b623e637fe2ac99cbbf1691ab7dae0373de9ea
@@@ -1,12 -1,9 +1,13 @@@
  # -*- coding: koi8-r -*-
  
  import unittest
 -from test import support
 +from test.support import TESTFN, unlink, unload
 +import importlib
 +import os
 +import sys
++import subprocess
  
 -class PEP263Test(unittest.TestCase):
 +class SourceEncodingTest(unittest.TestCase):
  
      def test_pep263(self):
          self.assertEqual(
          # two bytes in common with the UTF-8 BOM
          self.assertRaises(SyntaxError, eval, b'\xef\xbb\x20')
  
++    def test_20731(self):
++        sub = subprocess.Popen([sys.executable, 
++                        os.path.join(os.path.dirname(__file__),
++                                     'coding20731.py')],
++                        stderr=subprocess.PIPE)
++        err = sub.communicate()[1]
++        self.assertEquals(err, b'')
++
      def test_error_message(self):
          compile(b'# -*- coding: iso-8859-15 -*-\n', 'dummy', 'exec')
          compile(b'\xef\xbb\xbf\n', 'dummy', 'exec')
diff --cc Misc/NEWS
index 77b969cecfb13a09d4a810cab86bf0bce9654a55,3b707839e2ba6f985ab16d684fa4fccf9bd720fd..80c8913f1330f5590f541e49cd4a23b9778f54fd
+++ b/Misc/NEWS
@@@ -8,58 -10,21 +8,61 @@@ What's New in Python 3.4.1
  Core and Builtins
  -----------------
  
 -- Issue #19619: str.encode, bytes.decode and bytearray.decode now use an
 -  internal API to throw LookupError for known non-text encodings, rather
 -  than attempting the encoding or decoding operation and then throwing a
 -  TypeError for an unexpected output type. (The latter mechanism remains
 -  in place for third party non-text encodings)
+ - Issue #20731: Properly position in source code files even if they
+   are opened in text mode. Patch by Serhiy Storchaka.
 +- Issue #20637: Key-sharing now also works for instance dictionaries of
 +  subclasses.  Patch by Peter Ingebretson.
  
 -- Issue #20588: Make Python-ast.c C89 compliant.
 +Library
 +-------
 +
 +- Issue #20791: copy.copy() now doesn't make a copy when the input is
 +  a bytes object.  Initial patch by Peter Otten.
  
 -- Issue #20437: Fixed 21 potential bugs when deleting objects references.
 +- Issue #19748: On AIX, time.mktime() now raises an OverflowError for year
 +  outsize range [1902; 2037].
  
 -- Issue #20538: UTF-7 incremental decoder produced inconsistant string when
 -  input was truncated in BASE64 section.
 +Documentation
 +-------------
 +
 +- Issue #20765: Add missing documentation for PurePath.with_name() and
 +  PurePath.with_suffix().
 +
 +Tests
 +-----
 +
 +- Issue #20743: Fix a reference leak in test_tcl.
 +
 +Tools/Demos
 +-----------
 +
 +- Issue #20535: PYTHONWARNING no longer affects the run_tests.py script.
 +  Patch by Arfrever Frehtes Taifersar Arahesis.
 +
 +
 +What's New in Python 3.4.0 release candidate 2?
 +===============================================
 +
 +Release date: 2014-02-23
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #20261: In pickle, lookup __getnewargs__ and __getnewargs_ex__ on the
 +  type of the object.
 +
 +- Issue #20619: Give the AST nodes of keyword-only arguments a column and line
 +  number.
 +
 +- Issue #20526: Revert changes of issue #19466 which introduces a regression:
 +  don't clear anymore the state of Python threads early during the Python
 +  shutdown.
 +
 +- Issue #20595: Make getargs.c C89 compliant.
 +
 +- Issue #20625: Parameter names in __annotations__ were not mangled properly.
 +  Discovered by Jonas Wielicki, patch by Yury Selivanov.
  
  Library
  -------
Simple merge