Commit 8f9c20b8 authored by Georg Brandl's avatar Georg Brandl

merge with 3.3.4 releasing repo

parents 72e77613 a37fcb28
......@@ -118,3 +118,5 @@ d047928ae3f6314a13b6137051315453d0ae89b6 v3.3.2
fd53c500f8b80f54f3ecedec9da2e8c7e52a6888 v3.3.3rc1
d32442c0e60dfbd71234e807d3d1dedd227495a9 v3.3.3rc2
c3896275c0f61b2510a6c7e6c458a750359a91b8 v3.3.3
fa92f5f940c6c0d839d7f0611e4b717606504a3c v3.3.4rc1
7ff62415e4263c432c8acf6e424224209211eadb v3.3.4
......@@ -5,7 +5,8 @@
Python/importlib.h: Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c
Include/ast.h: Parser/Python.asdl Parser/asdl.py Parser/asdl_c.py
Python/Python-ast.c: Include/ast.h
Include/Python-ast.h: Include/ast.h
Python/Python-ast.c: Include/Python-ast.h
Python/opcode_targets.h: Python/makeopcodetargets.py Lib/opcode.py
......
......@@ -287,3 +287,4 @@ whatsnew/changelog,,:PythonCmd,"With Tk < 8.5 _tkinter.c:PythonCmd() raised Unic
whatsnew/changelog,,::,": Fix FTP tests for IPv6, bind to ""::1"" instead of ""localhost""."
whatsnew/changelog,,::,": Use ""127.0.0.1"" or ""::1"" instead of ""localhost"" as much as"
whatsnew/changelog,,:password,user:password
whatsnew/changelog,,:gz,w:gz
......@@ -18,12 +18,12 @@
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 3
#define PY_MICRO_VERSION 3
#define PY_MICRO_VERSION 4
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
/* Version as a string */
#define PY_VERSION "3.3.3+"
#define PY_VERSION "3.3.4+"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
......
......@@ -13,5 +13,5 @@ used from a setup script as
# Updated automatically by the Python release process.
#
#--start constants--
__version__ = "3.3.3"
__version__ = "3.3.4"
#--end constants--
What's New in IDLE 3.3.4?
=========================
- Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
- Issue #18960: IDLE now ignores the source encoding declaration on the second
line if the first line contains anything except a comment.
- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
- Issue #19481: print() of string subclass instance in IDLE no longer hangs.
- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
shell window is present.
What's New in IDLE 3.3.3?
=========================
- Issue #18873: IDLE now detects Python source code encoding only in comment
lines.
- Issue #18988: The "Tab" key now works when a word is already autocompleted.
- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
- Issue #18429: Format / Format Paragraph, now works when comment blocks
are selected. As with text blocks, this works best when the selection
only includes complete lines.
- Issue #18226: Add docstrings and unittests for FormatParagraph.py.
Original patches by Todd Rovito and Phil Webster.
- Issue #18279: Format - Strip trailing whitespace no longer marks a file as
changed when it has not been changed. This fix followed the addition of a
test file originally written by Phil Webster (the issue's main goal).
- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
- Remove dead imports of imp.
- Issue #18196: Avoid displaying spurious SystemExit tracebacks.
- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition.
- Issue #17511: Keep IDLE find dialog open after clicking "Find Next".
Original patch by Sarah K.
- Issue #18055: Move IDLE off of imp and on to importlib.
- Issue #15392: Create a unittest framework for IDLE.
Initial patch by Rajagopalasarma Jayakrishnan.
See Lib/idlelib/idle_test/README.txt for how to run Idle tests.
- Issue #14146: Highlight source line while debugging on Windows.
- Issue #17532: Always include Options menu for IDLE on OS X.
Patch by Guilherme Simões.
What's New in IDLE 3.3.2?
=========================
......
IDLE_VERSION = "3.3.3"
IDLE_VERSION = "3.3.4"
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -62,6 +62,7 @@ SMTP_PORT = 25
SMTP_SSL_PORT = 465
CRLF = "\r\n"
bCRLF = b"\r\n"
_MAXLINE = 8192 # more than 8 times larger than RFC 821, 4.5.3
OLDSTYLE_AUTH = re.compile(r"auth=(.*)", re.I)
......@@ -364,7 +365,7 @@ class SMTP:
self.file = self.sock.makefile('rb')
while 1:
try:
line = self.file.readline()
line = self.file.readline(_MAXLINE + 1)
except socket.error as e:
self.close()
raise SMTPServerDisconnected("Connection unexpectedly closed: "
......@@ -374,6 +375,8 @@ class SMTP:
raise SMTPServerDisconnected("Connection unexpectedly closed")
if self.debuglevel > 0:
print('reply:', repr(line), file=stderr)
if len(line) > _MAXLINE:
raise SMTPResponseException(500, "Line too long.")
resp.append(line[4:].strip(b' \t\r\n'))
code = line[:3]
# Check that the error code is syntactically correct.
......
......@@ -21,8 +21,13 @@ class MockFile:
"""
def __init__(self, lines):
self.lines = lines
def readline(self):
return self.lines.pop(0) + b'\r\n'
def readline(self, limit=-1):
result = self.lines.pop(0) + b'\r\n'
if limit >= 0:
# Re-insert the line, removing the \r\n we added.
self.lines.insert(0, result[limit:-2])
result = result[:limit]
return result
def close(self):
pass
......
......@@ -569,6 +569,33 @@ class BadHELOServerTests(unittest.TestCase):
HOST, self.port, 'localhost', 3)
@unittest.skipUnless(threading, 'Threading required for this test.')
class TooLongLineTests(unittest.TestCase):
respdata = b'250 OK' + (b'.' * smtplib._MAXLINE * 2) + b'\n'
def setUp(self):
self.old_stdout = sys.stdout
self.output = io.StringIO()
sys.stdout = self.output
self.evt = threading.Event()
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.settimeout(15)
self.port = support.bind_port(self.sock)
servargs = (self.evt, self.respdata, self.sock)
threading.Thread(target=server, args=servargs).start()
self.evt.wait()
self.evt.clear()
def tearDown(self):
self.evt.wait()
sys.stdout = self.old_stdout
def testLineTooLong(self):
self.assertRaises(smtplib.SMTPResponseException, smtplib.SMTP,
HOST, self.port, 'localhost', 3)
sim_users = {'Mr.A@somewhere.com':'John A',
'Ms.B@xn--fo-fka.com':'Sally B',
'Mrs.C@somewhereesle.com':'Ruth C',
......@@ -885,7 +912,8 @@ class SMTPSimTests(unittest.TestCase):
def test_main(verbose=None):
support.run_unittest(GeneralTests, DebuggingServerTests,
NonConnectingTests,
BadHELOServerTests, SMTPSimTests)
BadHELOServerTests, SMTPSimTests,
TooLongLineTests)
if __name__ == '__main__':
test_main()
......@@ -2,10 +2,10 @@
Python News
+++++++++++
What's New in Python 3.3.4 release candidate 1?
What's New in Python 3.3.5 release candidate 1?
===============================================
*Not yet released, see sections below for changes released in 3.3.3*
*Release date: XXXX-XX-XX*
Core and Builtins
-----------------
......@@ -15,38 +15,6 @@ Core and Builtins
- Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
- Issue #17825: Cursor "^" is correctly positioned for SyntaxError and
IndentationError.
- Issue #2382: SyntaxError cursor "^" is now written at correct position in most
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
- Issue #18960: The first line of Python script could be executed twice when
the source encoding was specified on the second line. Now the source encoding
declaration on the second line isn't effective if the first line contains
anything except a comment. 'python -x' works now again with files with the
source encoding declarations, and can be used to make Python batch files
on Windows.
- Issue #17432: Drop UCS2 from names of Unicode functions in python3.def.
- Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"
argument is not in range [0; 255].
- Issue #14432: Generator now clears the borrowed reference to the thread
state. Fix a crash when a generator is created in a C thread that is
destroyed while the generator is still used. The issue was that a generator
contains a frame, and the frame kept a reference to the Python state of the
destroyed C thread. The crash occurs when a trace function is setup.
- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
- Issue #19729: In str.format(), fix recursive expansion in format spec.
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
billion characters) input strings in _Py_dg_strtod.
Library
-------
......@@ -111,6 +79,94 @@ Library
codecs.StreamReader returned incomplete data when were called after
readline() or read(size). Based on patch by Amaury Forgeot d'Arc.
IDLE
----
- Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
- Update the python.gif icon for the Idle classbrowser and pathbowser
from the old green snake to the new new blue and yellow snakes.
- Issue #17721: Remove non-functional configuration dialog help button until we
make it actually gives some help when clicked. Patch by Guilherme Simões.
Tests
-----
- Issue #20532: Tests which use _testcapi are now marked as CPython only.
- Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok.
- Issue #19990: Added tests for the imghdr module. Based on patch by
Claudiu Popa.
- Issue #20474: Fix test_socket "unexpected success" failures on OS X 10.7+.
Documentation
-------------
- Issue #20488: Importlib is no longer *an* implementation of import, it's *the*
implementation.
What's New in Python 3.3.4?
===========================
*Release date: 09-Feb-2014*
Library
-------
- Issue #20374: Fix build warnings of the readline module with libedit on Mac.
What's New in Python 3.3.4 release candidate 1?
===============================================
*Release date: 26-Jan-2014*
Core and Builtins
-----------------
- Issue #17825: Cursor "^" is correctly positioned for SyntaxError and
IndentationError.
- Issue #2382: SyntaxError cursor "^" is now written at correct position in most
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
- Issue #18960: The first line of Python script could be executed twice when
the source encoding was specified on the second line. Now the source encoding
declaration on the second line isn't effective if the first line contains
anything except a comment. 'python -x' works now again with files with the
source encoding declarations, and can be used to make Python batch files
on Windows.
- Issue #17432: Drop UCS2 from names of Unicode functions in python3.def.
- Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"
argument is not in range [0; 255].
- Issue #14432: Generator now clears the borrowed reference to the thread
state. Fix a crash when a generator is created in a C thread that is
destroyed while the generator is still used. The issue was that a generator
contains a frame, and the frame kept a reference to the Python state of the
destroyed C thread. The crash occurs when a trace function is setup.
- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
- Issue #19729: In str.format(), fix recursive expansion in format spec.
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
billion characters) input strings in _Py_dg_strtod.
Library
-------
- Issue #16042: CVE-2013-1752: smtplib: Limit amount of data read by
limiting the call to readline(). Original patch by Christian Heimes.
- Issue #20317: ExitStack.__exit__ could create a self-referential loop if an
exception raised by a cleanup operation already had its context set
correctly (for example, by the @contextmanager decorator). The infinite
......@@ -333,15 +389,6 @@ Library
IDLE
----
- Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
- Update the python.gif icon for the Idle classbrowser and pathbowser
from the old green snake to the new new blue and yellow snakes.
- Issue #17721: Remove non-functional configuration dialog help button until we
make it actually gives some help when clicked. Patch by Guilherme Simões.
- Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
......@@ -358,13 +405,6 @@ IDLE
Tests
-----
- Issue #20532: Tests which use _testcapi are now marked as CPython only.
- Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok.
- Issue #19990: Added tests for the imghdr module. Based on patch by
Claudiu Popa.
- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
......@@ -410,14 +450,9 @@ Tests
- Issue #19085: Added basic tests for all tkinter widget options.
- Issue #20474: Fix test_socket "unexpected success" failures on OS X 10.7+.
Documentation
-------------
- Issue #20488: Importlib is no longer *an* implementation of import, it's *the*
implementation.
- Issue #20265: Updated some parts of the Using Windows document.
- Issue #20266: Updated some parts of the Windows FAQ.
......
......@@ -39,7 +39,7 @@
%define name python
#--start constants--
%define version 3.3.3
%define version 3.3.4
%define libvers 3.3
#--end constants--
%define release 1pydotorg
......
This is Python version 3.3.3
This is Python version 3.3.4
============================
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
......
......@@ -36,12 +36,16 @@ def parse_config(repo):
result[o] = inputs
return result
def check_rule(ui, repo, modified, output, inputs):
def check_rule(ui, repo, modified, basedir, output, inputs):
"""Verify that the output is newer than any of the inputs.
Return (status, stamp), where status is True if the update succeeded,
and stamp is the newest time stamp assigned to any file (might be in
the future)."""
f_output = repo.wjoin(output)
the future).
If basedir is nonempty, it gives a directory in which the tree is to
be checked.
"""
f_output = repo.wjoin(os.path.join(basedir, output))
try:
o_time = os.stat(f_output).st_mtime
except OSError:
......@@ -51,7 +55,7 @@ def check_rule(ui, repo, modified, output, inputs):
backdate = None
backdate_source = None
for i in inputs:
f_i = repo.wjoin(i)
f_i = repo.wjoin(os.path.join(basedir, i))
try:
i_time = os.stat(f_i).st_mtime
except OSError:
......@@ -79,7 +83,13 @@ def check_rule(ui, repo, modified, output, inputs):
# Nothing to update
return True, 0
def do_touch(ui, repo):
def do_touch(ui, repo, basedir):
if basedir:
if not os.path.isdir(repo.wjoin(basedir)):
ui.warn("Abort: basedir %r does not exist\n" % basedir)
return
modified = []
else:
modified = repo.status()[0]
dependencies = parse_config(repo)
success = True
......@@ -93,8 +103,8 @@ def do_touch(ui, repo):
if i in dependencies:
hold_back[output] = inputs
continue
_success, _tstamp = check_rule(ui, repo, modified, output, inputs)
sucess = success and _success
_success, _tstamp = check_rule(ui, repo, modified, basedir, output, inputs)
success = success and _success
tstamp = max(tstamp, _tstamp)
# put back held back rules
dependencies.update(hold_back)
......@@ -109,11 +119,12 @@ def do_touch(ui, repo):
return False
return success
def touch(ui, repo):
def touch(ui, repo, basedir):
"touch generated files that are older than their sources after an update."
do_touch(ui, repo)
do_touch(ui, repo, basedir)
cmdtable = {
"touch": (touch, [],
"touch generated files according to the .hgtouch configuration")
"touch": (touch,
[('b', 'basedir', '', 'base dir of the tree to apply touching', 'BASEDIR')],
"hg touch [-b BASEDIR]")
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment