[issue20741] Documentation archives should be available also in tar.xz format

2014-02-23 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Source archives (e.g. in [1]) are available in tgz and tar.xz formats, but 
documentation archives (e.g. in [2]) are available only in tar.bz2 and zip 
formats.
I suggest that documentation archives be available also in tar.xz format.

[1] http://www.python.org/ftp/python/3.3.4/
[2] http://www.python.org/ftp/python/doc/3.3.4/

--
keywords: easy
messages: 211985
nosy: Arfrever, georg.brandl
priority: normal
severity: normal
status: open
title: Documentation archives should be available also in tar.xz format
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20712] Make inspect agnostic about whether functions are implemented in Python or C

2014-02-23 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20571] test_codecs currently failing on several Windows buildbots

2014-02-23 Thread STINNER Victor

STINNER Victor added the comment:

Ah yes, sorry. I forgot that the utf-7 change was also applied to 3.3.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20712] Make inspect agnostic about whether functions are implemented in Python or C

2014-02-23 Thread Nick Coghlan

Nick Coghlan added the comment:

The problem is that "ismethod()" is not a particularly well-defined concept, 
except insofar as it means "behaves the same way as the callable returned when 
a Python function is retrieved through a class instance".

"isboundmethod()" could be well-defined, especially if it was introduced in 
parallel with a types.BoundMethod ABC that standardised the __func__ property.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

2014-02-23 Thread akira

akira added the comment:

The point of the locale issue is that "notBefore", "notAfter" strings do not 
change if your locale changes. You don't need a new regex for each locale.

I've attached ssl_cert_time_seconds.py file that contains example 
cert_time_to_seconds(cert_time) implementation that fixes both the timezone and 
the locale issues.

--
Added file: http://bugs.python.org/file34197/ssl_cert_time_seconds.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20742] 2to3 zip fixer doesn't fix for loops.

2014-02-23 Thread David Jones

New submission from David Jones:

Consider the following code:

for z in zip([1]):pass

2to3 does not convert the zip in this code to list(zip(...)); it does not 
change this code at all.

That can be an (obscure) bug because the zip in Python 2 has different 
semantics from the zip in Python 3.

The output of this program

from __future__ import print_function
S = []

def l(c):
  for i in [0,1]:
S.append(c)
yield i
  S.append(c.upper())

la = l('a')
lb = l('b')

for a,b in zip(la, lb):
  S.append("#")
print(''.join(S))

is different in Python 2 and Python 3 (when converted with 2to3, which doesn't 
change the program).

In Python 2 the output is:

ababA##

In Python 3 the output is:

ab#ab#A


Obviously this example is somewhat contrived, but I have a non-contrived 
example involving decoding PNG images (if anyone is interested).

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 211989
nosy: drj
priority: normal
severity: normal
status: open
title: 2to3 zip fixer doesn't fix for loops.
type: behavior
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-02-23 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Terry, I had the same problem with that failing 
test_httpservers.test_invalid_request using the latest build on Windows. 
After debugging, I found out that the problem was caused by my antivirus 
solution. Its http scanning engine caught malformed http requests, like the one 
in the test ("gEt / hTTP/1.0\r\nhost: 127.0.0.1:50340\r\nAccept-Encoding: 
identity\r\n\r\n"; for instance) and it modified the first line by uppercasing 
it, thus making the perfect condition for a failing test.

--
nosy: +Claudiu.Popa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20742] 2to3 zip fixer doesn't fix for loops.

2014-02-23 Thread Peter Otten

Peter Otten added the comment:

Hm, I would expect that in 99 times out of 100 the extra list(...) would be 
removed in a manual step following the automated conversion.

I'd really like to see the non-contrived example with a justified use of this 
evil side effect ;)

--
nosy: +peter.otten

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

2014-02-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Akira, do you want to write a proper patch with tests? If you are interested, 
you can take a look at http://docs.python.org/devguide/

You'll also have to sign a contributor's agreement at 
http://www.python.org/psf/contrib/contrib-form/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-02-23 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch that is considerate towards Windows for Python 3.4. I'll fix 
the patch for Python 2.7 later.

--
Added file: http://bugs.python.org/file34198/add_unit_test_os_chown_v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-02-23 Thread Vajrasky Kok

Changes by Vajrasky Kok :


Removed file: http://bugs.python.org/file33266/add_unit_test_os_chown.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20199] status of module_for_loader and utils._module_to_load

2014-02-23 Thread R. David Murray

R. David Murray added the comment:

What you might want to do instead is wait until just before final (or until I 
say I am done, if we get that lucky) and copy the whole 3.4 whatsnew file over. 
 I'm up through Alpha 1 in the NEWS file at this point, and I do intend to 
continue to to work on it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20636] Better repr for tkinter widgets

2014-02-23 Thread Ezio Melotti

Ezio Melotti added the comment:

> 

Not knowing the internal of tkinter, this seems somewhat confusing.
Is that an "anonymous name/id"?

> 

This already looks more useful.  How is that determined?  Why the "first" 
object is missing (i.e. .panel seems to be an attribute of a missing object)?


Regarding the patch, are you sure that .__class__.__module__ is always 
available?  I seem to remember that it might be missing in some cases, e.g. 
modules written in C (but I might be confusing it with something else like 
__file__).

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20643] Strange dot in documentation (after generator.close)

2014-02-23 Thread Ezio Melotti

Ezio Melotti added the comment:

Serhiy, you seem to have added that line (in #19190).  Was it a mistake or is 
it supposed to do something?

--
nosy: +ezio.melotti, serhiy.storchaka
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20677] Minor typo in enum docs

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 569589d3abb5 by Ezio Melotti in branch 'default':
#20677: fix typo in enum docs.  Patch by Saimadhav Heblikar.
http://hg.python.org/cpython/rev/569589d3abb5

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20677] Minor typo in enum docs

2014-02-23 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-02-23 Thread Jeff Allen

Jeff Allen added the comment:

Thanks for adding to the evidence here. As discussed above, disabling the 
security product (which is Bitdefender) on my PC didn't stop the problem for 
me, and I'm reluctant to uninstall. I narrowed it to the Windows Base Filtering 
Engine, but perhaps the behaviour of the BFE is extended by installing BD.

If so, you could say this is not a Python problem, it is caused by BD 
"normalising" the HTTP. Or BD could say it is caused by expecting a defined 
result from abnormal HTTP.

I took the view it were best fixed at our end. I found I could test the same 
thing (AFAICT), but modify the tests so they don't get interfered with.
http://bugs.jython.org/issue2109
http://hg.python.org/jython/rev/6441fcfd940b

Would a patch made from this be applicable to CPython?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski

Artur R. Czechowski added the comment:

Proper patch with tests available in remote hg repo attached to this comment.

--
hgrepos: +217

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski

Changes by Artur R. Czechowski :


Removed file: http://bugs.python.org/file34167/minidom.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20636] Better repr for tkinter widgets

2014-02-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> > 
> 
> Not knowing the internal of tkinter, this seems somewhat confusing.
> Is that an "anonymous name/id"?

If the name parameter is not specified, repr(id(self)) is used. Here is a 
button with id() == 3066782348, its parent has id() == 3070343372 and its 
grandparent is root. str() for this button returns full name 
".3070343372.3066782348".

> > 
> 
> This already looks more useful.  How is that determined?  Why the "first"
> object is missing (i.e. .panel seems to be an attribute of a missing
> object)?

Tk widgets are organized in hierarchical structure and names look similar to 
file system names. "." is the root, ".frame" is a frame in the root, 
".frame.b1" is a button in frame ".frame".

> Regarding the patch, are you sure that .__class__.__module__ is always
> available?  I seem to remember that it might be missing in some cases, e.g.
> modules written in C (but I might be confusing it with something else like
> __file__).

Yes, for example __module__ is absent in _tkinter.TkappType. But I think that 
every Python implemented class has __module__.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20637] Support key-sharing dictionaries in subclasses

2014-02-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks. I've committed a patch after augmenting the tests a bit, so it'll be in 
3.4.1 as well as 3.5.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20637] Support key-sharing dictionaries in subclasses

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 16229573e73e by Antoine Pitrou in branch 'default':
Issue #20637: Key-sharing now also works for instance dictionaries of 
subclasses.  Patch by Peter Ingebretson.
http://hg.python.org/cpython/rev/16229573e73e

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-02-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Except where specifically indicated otherwise, the Python test suite should be 
the same, and correct, for all implementations. If that change is correct for 
Jython, it should be correct for CPython.

David, Ezio, or Senthil: does the change in the Jython patch look correct to 
any of you, enough that we should apply it?

--
components: +Tests
nosy: +ezio.melotti, orsenthil, r.david.murray
stage:  -> patch review
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20643] Strange dot in documentation (after generator.close)

2014-02-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It was supposed to reset current class. Perhaps correct way is to remove this 
directive (and other "class" directive above) at all.

--
keywords: +patch
nosy: +georg.brandl
stage: needs patch -> patch review
type: enhancement -> behavior
versions: +Python 2.7, Python 3.3
Added file: http://bugs.python.org/file34199/docs_generator_class.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6815] UnicodeDecodeError in os.path.expandvars

2014-02-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Witnessed on 2.7, 3.3, 3.4:

$ ./python -m test -uall -R3:3 test_tcl 
[1/1] test_tcl
beginning 6 repetitions
123456
..
test_tcl leaked [12, 12, 12] references, sum=36
test_tcl leaked [5, 5, 5] memory blocks, sum=15

--
components: Library (Lib), Tkinter
messages: 212006
nosy: pitrou, serhiy.storchaka
priority: high
severity: normal
stage: needs patch
status: open
title: test_tcl memory leak
type: resource usage
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20744] shutil should not use distutils

2014-02-23 Thread Matthias Klose

New submission from Matthias Klose:

shutil imports distutils in _call_external_zip just for the calling of an 
external command.  This should be done using subprocess these days.

--
components: Library (Lib)
messages: 212007
nosy: doko
priority: normal
severity: normal
stage: needs patch
status: open
title: shutil should not use distutils
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20745] test_statistics fails in refleak mode

2014-02-23 Thread Antoine Pitrou

New submission from Antoine Pitrou:

$ ./python -m test -W -R3:3 test_statistics
[1/1] test_statistics
[...]

==
FAIL: assertApproxEqual (test.test_statistics.NumericTestCase)
Doctest: test.test_statistics.NumericTestCase.assertApproxEqual
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 2193, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for 
test.test_statistics.NumericTestCase.assertApproxEqual
  File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 153, 
in assertApproxEqual

--
File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 165, in 
test.test_statistics.NumericTestCase.assertApproxEqual
Failed example:
class MyTest(NumericTestCase):
def test_number(self):
x = 1.0/6
y = sum([x]*6)
self.assertApproxEqual(y, 1.0, tol=1e-15)
def test_sequence(self):
a = [1.001, 1.001e-10, 1.001e10]
b = [1.0, 1e-10, 1e10]
self.assertApproxEqual(a, b, rel=1e-3)
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
class MyTest(NumericTestCase):
NameError: name 'NumericTestCase' is not defined
--
File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 177, in 
test.test_statistics.NumericTestCase.assertApproxEqual
Failed example:
suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
NameError: name 'MyTest' is not defined
--
File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 178, in 
test.test_statistics.NumericTestCase.assertApproxEqual
Failed example:
unittest.TextTestRunner(stream=StringIO()).run(suite)
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
unittest.TextTestRunner(stream=StringIO()).run(suite)
NameError: name 'suite' is not defined


==
FAIL: _DoNothing (test.test_statistics)
Doctest: test.test_statistics._DoNothing
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 2193, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_statistics._DoNothing
  File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 99, in 
_DoNothing

--
File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 112, in 
test.test_statistics._DoNothing
Failed example:
approx_equal(12.345, 12.346, tol=1e-3)
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
approx_equal(12.345, 12.346, tol=1e-3)
NameError: name 'approx_equal' is not defined
--
File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 114, in 
test.test_statistics._DoNothing
Failed example:
approx_equal(12.345e6, 12.346e6, tol=1e-3)  # tol is too small.
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
approx_equal(12.345e6, 12.346e6, tol=1e-3)  # tol is too small.
NameError: name 'approx_equal' is not defined
--
File "/home/antoine/cpython/default/Lib/test/test_statistics.py", line 120, in 
test.test_statistics._DoNothing
Failed example:
approx_equal(12.345, 12.346, rel=1e-4)
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
approx_equal(12.345, 12.346, rel=1e-4)
NameError: na

[issue20746] test_pdb fails in refleak mode

2014-02-23 Thread Antoine Pitrou

New submission from Antoine Pitrou:

$ ./python -m test -W -R3:3 test_pdb
[1/1] test_pdb
[...]

==
FAIL: test_list_commands (test.test_pdb)
Doctest: test.test_pdb.test_list_commands
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 2193, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_pdb.test_list_commands
  File "/home/antoine/cpython/default/Lib/test/test_pdb.py", line 288, in 
test_list_commands

--
File "/home/antoine/cpython/default/Lib/test/test_pdb.py", line 311, in 
test.test_pdb.test_list_commands
Failed example:
with PdbTestInput([  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
'list',  # list first function
'step',  # step into second function
'list',  # list second function
'list',  # continue listing to EOF
'list 1,3',  # list specific lines
'list x',# invalid argument
'next',  # step to import
'next',  # step over import
'step',  # step into do_nothing
'longlist',  # list all lines
'source do_something',  # list all lines of function
'source fooxxx',# something that doesn't exit
'continue',
]):
   test_function()
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
with PdbTestInput([  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
NameError: name 'PdbTestInput' is not defined


==
FAIL: test_next_until_return_at_return_event (test.test_pdb)
Doctest: test.test_pdb.test_next_until_return_at_return_event
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 2193, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for 
test.test_pdb.test_next_until_return_at_return_event
  File "/home/antoine/cpython/default/Lib/test/test_pdb.py", line 603, in 
test_next_until_return_at_return_event

--
File "/home/antoine/cpython/default/Lib/test/test_pdb.py", line 617, in 
test.test_pdb.test_next_until_return_at_return_event
Failed example:
with PdbTestInput(['break test_function_2',
   'continue',
   'return',
   'next',
   'continue',
   'return',
   'until',
   'continue',
   'return',
   'return',
   'continue']):
test_function()
Exception raised:
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 1324, in __run
compileflags, 1), test.globs)
  File "", 
line 1, in 
with PdbTestInput(['break test_function_2',
NameError: name 'PdbTestInput' is not defined


==
FAIL: test_pdb_basic_commands (test.test_pdb)
Doctest: test.test_pdb.test_pdb_basic_commands
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/doctest.py", line 2193, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_pdb.test_pdb_basic_commands
  File "/home/antoine/cpython/default/Lib/test/test_pdb.py", line 62, in 
test_pdb_basic_commands

--
File "/home/antoine/cpython/default/Lib/test/test_pdb.py", line 81, in 
test.test_pdb.test_pdb_basic_commands
Failed example:
with PdbTestInput([  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
'step',   # entering the function call
'args',   # display function args
'list',   # list function source
'bt', # display backtrace
'up', # step up to test_function()
'down',   # step down to test_function_2() again
'next',   # stepping to print(foo)
'next',   # stepping to the for loop
'step',   # stepping into the for loop
'until',  # continuing until out of the for loop
'next',   # executing the print(bar)
'jump 8', # jump over second for loop
'return', # return out of function
'retval', # display return value
   

[issue20744] shutil should not use distutils

2014-02-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Does it pose an actual problem?

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20747] Charset.header_encode in email.charset doesn't take a maxlinelen argument and has inconsistent behavior with different encodings

2014-02-23 Thread Rik

New submission from Rik:

If you look at the `header_encode` method in the `Charset` class in 
`email.charset`, you'll see that depending on the `header_encoding` that is set 
on the `Charset` instance, it will either encode it using base64 or 
quoted-printable (QP):

http://hg.python.org/cpython/file/3a1db0d2747e/Lib/email/charset.py#l351

However, QP always uses `maxlinelen=None` and base64 doesn't. This results in 
the following behaviour:

- If you use base64 encoding and your header size is longer than the default 
`maxlinelen`, it will be split over multiple lines.
- If you use QP encoding with the same header it doesn't get split over 
multiple lines.

You can easily test it with this snippet:

from email.charset import Charset, BASE64, QP

header = (
'tejkstj tlkjes takldjf aseio neaoiflk asnfoieas nflkdan foeias '
'naskln ioeasn kldan flkansoie naslk dnaslk fndaslk fneoisaf '
'neklasn dfklasnf oiasenf lkadsn lkfanldk fas dfknaioe nas'
)

charset = Charset('utf-8')

charset.header_encoding = BASE64
print 'BASE64:'
print charset.header_encode(header)

charset.header_encoding = QP
print 'QP:'
print charset.header_encode(header)

Which will output:

BASE64:
=?utf-8?b?dGVqa3N0aiB0bGtqZXMgdGFrbGRqZiBhc2VpbyBuZWFvaWZsayBhc25mb2llYXMg?=
 
=?utf-8?b?bmZsa2RhbiBmb2VpYXMgbmFza2xuIGlvZWFzbiBrbGRhbiBmbGthbnNvaWUgbmFz?=
 
=?utf-8?b?bGsgZG5hc2xrIGZuZGFzbGsgZm5lb2lzYWYgbmVrbGFzbiBkZmtsYXNuZiBvaWFz?=
 =?utf-8?b?ZW5mIGxrYWRzbiBsa2ZhbmxkayBmYXMgZGZrbmFpb2UgbmFz?=
QP:

=?utf-8?q?tejkstj_tlkjes_takldjf_aseio_neaoiflk_asnfoieas_nflkdan_foeias_naskln_ioeasn_kldan_flkansoie_naslk_dnaslk_fndaslk_fneoisaf_neklasn_dfklasnf_oiasenf_lkadsn_lkfanldk_fas_dfknaioe_nas?=

This is inconsistent behavior.

Aside from that, I think the `header_encode` method should accept an argument 
`maxlinelen` that defaults to an appropriate value (probably 76), but which you 
can overwrite on free will.

This is (I think) also necessary because the `Header` class in `email.header` 
has a `maxlinelen` attribute that is used for the same purpose. Normally this 
works fine, but when you specified a charset for your header, it uses the 
`Charset` class and the `maxlinelen` is lost. This is happening here:

http://hg.python.org/cpython/file/3a1db0d2747e/Lib/email/header.py#l368

You see, the `_encode_chunks` takes the `maxlinelen` argument but doesn't pass 
it on to the `header_encode` method of `charset` (which is a `Charset` 
instance).

As such, you can see this issue in action with the following snippet:

from email.header import Header

maxlinelen = 999

print 'No charset:'
print Header(
u'asdfjk lasjdf sajdfl ajsdfaj sdlkfjas kfladjs flkajsdflk jsadklf 
jadslkfj adslkfj asdlkjf lksadjfkldas jfkldasj fkadsj fladsjf kladsjfk 
asdjfkldasasd kfaj  kfladsj fkadsjf asdf ',
maxlinelen=maxlinelen
).encode()

print 'Charset with special characters:'
print Header(
u'attachment; filename="ajdsklfj klasdjfkl asdjfkl jadsfja sdflkads fad 
fads adsf dasjfkl jadslkfj dlasf asd \u6211\u6211\u6211 jo \u6211\u6211 jo 
\u6211\u6211"',
charset='utf-8',
maxlinelen=999
).encode()

Which will output:

No charset:
asdfjk lasjdf sajdfl ajsdfaj sdlkfjas kfladjs flkajsdflk jsadklf jadslkfj 
adslkfj asdlkjf lksadjfkldas jfkldasj fkadsj fladsjf kladsjfk asdjfkldasasd 
kfaj  kfladsj fkadsjf asdf
Charset with special characters:
=?utf-8?b?YXR0YWNobWVudDsgZmlsZW5hbWU9ImFqZHNrbGZqIGtsYXNkamZrbCBhc2RqZmts?=
 
=?utf-8?b?IGphZHNmamEgc2RmbGthZHMgZmFkIGZhZHMgYWRzZiBkYXNqZmtsIGphZHNsa2Zq?=
 =?utf-8?b?IGRsYXNmIGFzZCDmiJHmiJHmiJEgam8g5oiR5oiRIGpvIOaIkeaIkSI=?=

This is currently an issue we're experiencing in Django, see our issue in the 
issue tracker:
https://code.djangoproject.com/ticket/20889#comment:4

--
components: Library (Lib), email
messages: 212011
nosy: barry, r.david.murray, rednaw
priority: normal
severity: normal
status: open
title: Charset.header_encode in email.charset doesn't take a maxlinelen 
argument and has inconsistent behavior with different encodings
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This actually appeared with 89b738e3d0c9, i.e. it's not a regression but an 
existing leak that was uncovered by a new test.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, this looks mostly like a cleanup issue in the tests. Following patch 
seems to solve it:

diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -376,6 +376,7 @@ class TclTest(unittest.TestCase):
 result = arg
 return arg
 self.interp.createcommand('testfunc', testfunc)
+self.addCleanup(self.interp.tk.deletecommand, 'testfunc')
 def check(value, expected, eq=self.assertEqual):
 r = self.interp.call('testfunc', value)
 self.assertIsInstance(result, str)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Tests
priority: high -> normal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20748] 3.4rc2 MSI uninstallation leaves behind ensurepip _uninstall .pyc

2014-02-23 Thread Martin v . Löwis

New submission from Martin v. Löwis:

The installer currently leaves behind a single pyc file, namely 

Lib\ensurepip\__pycache__\_uninstall.cpython-34.pyc

I believe that the problem is that installer computes the list of files to be 
removed in the script generation phase, finding out what files match 
__pycache__\*.*. The _uninstall .pyc is not there yet. Then, during script 
execution, first pip uninstallation is run, creating the pyc file, then the 
(precomputed) list of files is removed.

In rc1, this was not a problem because PIP removal happened in the UI phase 
(i.e. before script execution); this was changed to support elevated privileges 
in #20641.

The simplest work-around could be to run pip uninstallation with -B. I just 
edited the MSI with orca, and that seems to work fine.

If anybody can suggest how installer could be instructed to remove the .pyc 
regularly through the RemoveFiles action, I'd appreciate any help.

--
messages: 212014
nosy: loewis
priority: release blocker
severity: normal
status: open
title: 3.4rc2 MSI uninstallation leaves behind ensurepip _uninstall .pyc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Martin v . Löwis

Changes by Martin v. Löwis :


Added file: http://bugs.python.org/file34167/minidom.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Artur: Please provide the follwing information (in this bug report, or in any 
other bug report you create in the future)
1. this is what I did
2. this is what happened
3. this is what should have happened instead
In this case, a Python script that ought to work but currently fails would be 
appreciated.

I fail to see how "two CDATA sections in one element" are related to "support 
for ]]> inside CDATA". In your example, there is no ]]> inside CDATA, just two 
subsequent CDATA sections.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1524639] Fix Tkinter Tcl-commands memory-leaks

2014-02-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

There is a little related but more complex issue1524639.

--
assignee:  -> pitrou
stage: needs patch -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 38a06e411698 by Antoine Pitrou in branch '3.3':
Issue #20743: Fix a reference leak in test_tcl.
http://hg.python.org/cpython/rev/38a06e411698

New changeset 10b1f60a72fa by Antoine Pitrou in branch 'default':
Issue #20743: Fix a reference leak in test_tcl.
http://hg.python.org/cpython/rev/10b1f60a72fa

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 00393de6919d by Antoine Pitrou in branch '2.7':
Issue #20743: Fix a reference leak in test_tcl.
http://hg.python.org/cpython/rev/00393de6919d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20743] test_tcl memory leak

2014-02-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, fixed now.

--
resolution:  -> invalid
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6143] IDLE - an extension to clear the shell window

2014-02-23 Thread Tal Einat

Tal Einat added the comment:

Terry, please do give Squeezer a try before making a decision! Squeezer may be 
slightly more complex than ClearWindow in concept and in code, but IMO it is 
simpler and more appropriate for use by a novice user.

I'm attaching a screenshot to give a feeling of what working in the IDLE shell 
with Squeezer looks like. This screenshot was taken on Windows. Note that the 
second squeezed text is the very long "Max recursion depth" exception 
traceback, which I manually squeezed after it was printed.

Now I'll try to make the case for Squeezer one last time...


Nobody expects a Squeezer Inquisition! Amongst Squeezer's weaponry are such 
diverse elements as:

1. No fear! Squeezer automatically catches overly long outputs for users, so 
they need not fear crashing IDLE or losing their history just by printing 
something long accidentally.

2. No surprise! Squeezer requires no learning and is completely 
self-explanatory. It's an in-line button with a label of the form "Squeezed 
text (13412 lines)". Hovering over it with the mouse shows tooltip listing the 
various available interactions (expand, copy, preview). Don't want the text to 
be squeezed? Double-click and the button is replaced by the original text!

3. Ruthless efficiency! With Squeezer, IDLE will never slow down to a crawl 
again! (Well, unless you explicitly expand a very long output.)

4. Dashing red uniforms! Okay, not really, but it does look nice.

Also, beware *the comfy chair*! Squeezer conveniently allows one to manually 
squeeze exception tracebacks and other outputs to clean up the shell history. 
This is available via the right-click context menu.


Finally, I'll mention that ClearWindow forces a user to choose: delete your 
entire shell history, or keep it all. Squeezer allows a user to choose which 
parts to hide and which to keep, and nothing is ever lost since squeezed text 
can always be expanded again.

That's it. If this doesn't convince people of the utility of Squeezer, I truly 
believe nothing else will.

--
Added file: http://bugs.python.org/file34200/Squeezer Screenshot.PNG

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1529353] Squeezer - squeeze large output in the interpreter

2014-02-23 Thread Tal Einat

Tal Einat added the comment:

See msg212020 for a Python-style explanation of the utility of the Squeezer 
extension.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

2014-02-23 Thread akira

akira added the comment:

Antoine, I've signed the agreement. I've added ssl_cert_time_toseconds.patch 
with code, tests, and documention updates.

--
keywords: +patch
Added file: http://bugs.python.org/file34201/ssl_cert_time_to_seconds.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-02-23 Thread ipatrol

ipatrol added the comment:

The latest patch has an indentation error in an if-else clause, but I can't 
figure out what exactly was intended by the author.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Peter Otten

Changes by Peter Otten <__pete...@web.de>:


--
nosy: +peter.otten

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20646] 3.4 cherry-pick: 180e4b678003 select and kqueue round the timeout aways from zero

2014-02-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I don't see why this cannot wait until 3.4.1.

True, rounding away from zero is desirable in these cases but it seems like 
this should be a non issue most of the time and any distro (ubuntu) that picks 
up 3.4.0 can apply this fix to their own python package if they ever find this 
causing an actual problem.

It was never explained in the original #20320 why anything considers it sane to 
call a selector with a non-zero microscopic timeout in the first place and 
expect well defined behavior. IMNSHO desiring any timeout less than a 
millisecond is asking for trouble from a variety of OS APIs.

--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski

Artur R. Czechowski added the comment:

Martin, the exact information you need are:

1. this is what I did:

#!/usr/bin/env python
import unittest
import xmlrunner

class Foo(unittest.TestCase):
def testFoo(self):
self.assertTrue(False, ']]>')

unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports'))

2. this is what happened:
arturcz@szczaw:/tmp$ ./cdata.py 

Running tests...
--
F
==
FAIL [0.000s]: testFoo (__main__.Foo)
--
Traceback (most recent call last):
  File "./cdata.py", line 7, in testFoo
self.assertTrue(False, ']]>')
AssertionError: ]]>

--
Ran 1 test in 0.001s

FAILED (failures=1)

Generating XML reports...
Traceback (most recent call last):
  File "./cdata.py", line 9, in 
unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports'))
  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
self.runTests()
  File "/usr/lib/python2.7/unittest/main.py", line 232, in runTests
self.result = testRunner.run(self.test)
  File "/usr/lib/python2.7/dist-packages/xmlrunner/__init__.py", line 415, in 
run
result.generate_reports(self)
  File "/usr/lib/python2.7/dist-packages/xmlrunner/__init__.py", line 312, in 
generate_reports
xml_content = doc.toprettyxml(indent='\t')
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 58, in toprettyxml
self.writexml(writer, "", indent, newl, encoding)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1749, in writexml
node.writexml(writer, indent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 814, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1150, in writexml
raise ValueError("']]>' not allowed in a CDATA section")
ValueError: ']]>' not allowed in a CDATA section

and empty directory test-reports has been created.

3. this is what should have happened instead:
arturcz@szczaw:/tmp$ ./cdata.py 

Running tests...
--
F
==
FAIL [0.000s]: testFoo (__main__.Foo)
--
Traceback (most recent call last):
  File "./cdata.py", line 7, in testFoo
self.assertTrue(False, ']]>')
AssertionError: ]]>

--
Ran 1 test in 0.001s

FAILED (failures=1)

Generating XML reports...

and file test-reports/TEST-Foo-${timestamp}.xml is created with following 
content:




 







however, on the level of minidom.py module, there is an exact test provided in 
attached repository.

PS. I removed the patch by purpose - it's wrong and someone could be misleaded 
by it. The correct solution I propose is in the attached repository.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2014-02-23 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-02-23 Thread Jeff Allen

Jeff Allen added the comment:

Actual patch for your convenience. I'm not set up to build CPython from source, 
so I've tested this with my installed CPython 2.7.6, and it's clean.

[As for keeping the tests in sync, yes that's our aim. Jython's Lib contains 
only the customised versions, and everything else comes from a copy of 
CPython's in lib-python/2.7. I'm always looking for a chance to delete one 
(i.e. use the common file).]

--
keywords: +patch
nosy: +fwierzbicki
Added file: http://bugs.python.org/file34202/issue20155_py.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Martin v . Löwis

Changes by Martin v. Löwis :


Removed file: http://bugs.python.org/file34167/minidom.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I fail to see the bug in Python. minidom is behaving correctly. The error is in 
xmlrunner, which does

  error_info = str(test_result.get_error_info())
  failureText = xml_document.createCDATASection(error_info)

This is incorrect - it would have to check that error_info does not contain ]]> 
(since CDATA sections must not contain ]]>). If it finds ]]> in the error_info, 
it would have to create two CDATA sections, e.g. one up to and including ]], 
and the second one starting at > (repeated if there is more than one occurrence 
of ]]> in error_info.

Alternatively, it should just create a text node, since writing a text node 
will properly escape all special characters in error_info.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20328] mailbox: add method to delete mailbox

2014-02-23 Thread Jonathan Dowland

Jonathan Dowland added the comment:

Hi,

On Fri, Jan 31, 2014 at 03:03:09PM +, R. David Murray wrote:
> I think your arguments are good ones.  So, if you want to propose a
> patch that defines some semantics for delete (and possibly address the
> maildir folder delete similarly), I will review it.  Also fine if you
> want to discuss it more before working on a patch.  (Also OK if you
> *don't* want to work on a patch, although in that case it is a lot
> less likely to happen :)

Thanks - I intend to write a patch (my first for Python proper), it will
take me quite a long time (simply due to lack of free time) but when I
have any interesting WIP to share I'll update this bug.

Thanks again

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20749] shutil.unpack_archive(): security concerns not documented

2014-02-23 Thread Jakub Wilk

New submission from Jakub Wilk:

shutil.unpack_archive() uses tarfile.extractall() under the hood, so it's not 
suitable for unpacking untrusted archives. But this fact is not documented.

Please add a security warning to shutil.unpack_archive() documentation.

--
assignee: docs@python
components: Documentation
messages: 212029
nosy: docs@python, jwilk
priority: normal
severity: normal
status: open
title: shutil.unpack_archive(): security concerns not documented

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-02-23 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
assignee: loewis -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-02-23 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Steve: Why are you providing a Python 3.3 patch? AFAICT, the issue does not 
exist with VS 2010 (express).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20735] Documentation: mark stringprep as deprecated

2014-02-23 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I'm not quite sure why the module is marked as deprecated - IMO it's not 
deprecated.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Artur R. Czechowski

Artur R. Czechowski added the comment:

Martin,
I partially agree with you.
After rethinking the issue I agree that changing the behavior of 
createCDATASection maybe is not a good idea.
On the other hand anyone in need of adding ]]> into CDATA must write a few 
lines of code, which will be essentially the same for each application. This 
part of code could be embedded into minidom module and it could be provided to 
each needing party. Please consider extending the interface of minidom module 
with method creating CDATA sections regardless of the provided data, splitting 
it into two CDATA if necessary.

If you disagree, feel free to close this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20714] Allow for ]]> in CDATA in minidom

2014-02-23 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I don't think your proposal can be implemented. createXYZ, in DOM, only creates 
a single node, which is not yet attached at all into a tree. So if you would 
want a convenience function to create multiple CDATA section, the application 
would then still have to loop over them to insert them individually into the 
tree.

Personally, I would not have my application create multiple CDATA sections. 
Instead, I would use

if ']]>' in error_info:
failureText = xml_document.createTextNode(error_info)
else:
failureText = xml_document.createCDATASection(error_info)

instead. So I doubt that all application authors would really agree on a single 
solution to this problem.

Closing this as "won't fix".

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20750] Roundtrip-test tokenize.untokenize(iterable_of_5_tuples)

2014-02-23 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Currently, test_tokenize.roundtrip only tests the 2-tuple mode of untokenize. 
The currently buggy 5-tuple mode needs to be tested also, as far as possible, 
to reduce the chance of introducing more bugs when fixing current bugs. When 
this is done, all the constructed tests pass. Good so far.

The doctest normally tests 10 files selected from test/test_*.py and a few 
tries showed no problem. However, when testing all with -ucpu. 
F:\Python\dev> 3\py33\pcbuild\python_d -m test -ucpu test_tokenize
7 failed. So we must remove these from the list of candidates until the failure 
cause is determined and either fixed or determined not fixable (as with 
test_3131.py).

As suggested in the revised docstring, finding the failure items for these 7 
would be much easier if the file roundtrip test were removed from the doctest 
and made into a unittest with assertEqual.

--
assignee: terry.reedy
components: Library (Lib), Tests
messages: 212034
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Roundtrip-test tokenize.untokenize(iterable_of_5_tuples)
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20751] Misleading examples indDescriptor protocol documentation

2014-02-23 Thread Jan Kaliszewski

New submission from Jan Kaliszewski:

1. One misleading detail in the descriptor protocol documentation for super 
bindings is that the following fragment of the 
http://docs.python.org/reference/datamodel.html#invoking-descriptors page:

"""
Super Binding
If a is an instance of super, then the binding super(B, obj).m() searches 
obj.__class__.__mro__ for the base class A immediately preceding B and then 
invokes the descriptor with the call: A.__dict__['m'].__get__(obj, 
obj.__class__).
"""

...introduces the method *call* (".m()") which AFAIK has nothing to do with the 
actual matter of the description (attribute resolution).

Also, the "If *a* is an instance of super" fragment is strange, as *a* is not 
used in the following sentences at all.

I believe the description should be:

"""
Super Binding
If binding to a super instance, super(B, obj).x searches 
obj.__class__.__mro__ for the base class A immediately preceding B and then 
invokes the descriptor with the call: A.__dict__['x'].__get__(obj, 
obj.__class__).
"""

(using 'x' as the attribute name, as for the other kinds of binding).

***

2. Also, in some earlier fragment of the same page:

"""
Direct Call
The simplest and least common call is when user code directly invokes a 
descriptor method: x.__get__(a).
"""

The call x.__get__(a) without the second argument seems to be wrong if  __get__ 
is implemented according to the specification "object.__get__(self, instance, 
owner)" from the same documentation page.

--
assignee: docs@python
components: Documentation
messages: 212035
nosy: docs@python, zuo
priority: normal
severity: normal
status: open
title: Misleading examples indDescriptor protocol documentation
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20752] Difflib should provide the option of overriding the SequenceMatcher

2014-02-23 Thread Chris Rose

New submission from Chris Rose:

It should be possible to provide subclasses or implementations of the 
SequenceMatcher interface to difflib's various methods that do formatting (for 
example, unified_diff/context_diff et al).

I've included a patch for it that satisfies my personal itch on the subject 
(attached). I'd like to have this reviewed for inclusion in 3.5.

--
components: Library (Lib)
files: difflib-sm.patch
keywords: patch
messages: 212036
nosy: offby1
priority: normal
severity: normal
status: open
title: Difflib should provide the option of overriding the SequenceMatcher
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file34203/difflib-sm.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20752] Difflib should provide the option of overriding the SequenceMatcher

2014-02-23 Thread Chris Rose

Chris Rose added the comment:

I've regenerated the patch with doc additions and Misc/ACKS changed as well.

--
Added file: http://bugs.python.org/file34204/difflib-sm.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20731] Python 3.3.4: SyntaxError with correct source code encoding # -*- coding: latin-1 -*-

2014-02-23 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I can reproduce the problem. I started debugging it; the issue is that, after 
reading the two comment lines (and detecting the source encoding), 
fileio_readinto gets called, which calls read(), and read() returns 17 (bytes 
read), with are

"-\n\nprint('test')"

So for some reason, the - is not consumed yet, even though it was previously 
read out of the file descriptor.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20751] Misleading examples in the descriptor protocol documentation

2014-02-23 Thread Jan Kaliszewski

Changes by Jan Kaliszewski :


--
title: Misleading examples indDescriptor protocol documentation -> Misleading 
examples in the descriptor protocol documentation

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-02-23 Thread Steve Dower

Steve Dower added the comment:

My patches (which I've backed away from now - between wheels and monkey 
patching Distutils from a setup.py, there are enough workarounds) also handled 
the fact that VS 2008 is no longer freely/officially available, and presumably 
VS 2010 will eventually go the same way. From my point of view, VC++ 2008 
Express not including 64-bit compilers is less of a concern than VC++ 2008 
Express not being available at all.

The Windows SDK is the only way that VC9 is distributed now, but it doesn't 
install the vcvarsall.bat file that Distutils needs. The same goes for the 
version of the SDK that includes VC10. These patches look in the registry for 
the actual paths, rather than just to find a batch file that isn't a component 
of the compiler.

(FWIW, the patches should be identical apart from some Python 2/3 differences - 
the version number is parameterised.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20731] Python 3.3.4: SyntaxError with correct source code encoding # -*- coding: latin-1 -*-

2014-02-23 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12691] tokenize.untokenize is broken

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d6dd02a973f by Terry Jan Reedy in branch '3.3':
Issue #20750, Enable roundtrip tests for new 5-tuple untokenize. The
http://hg.python.org/cpython/rev/8d6dd02a973f

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8478] tokenize.untokenize first token missing failure case

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d6dd02a973f by Terry Jan Reedy in branch '3.3':
Issue #20750, Enable roundtrip tests for new 5-tuple untokenize. The
http://hg.python.org/cpython/rev/8d6dd02a973f

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20750] Roundtrip-test tokenize.untokenize(iterable_of_5_tuples)

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d6dd02a973f by Terry Jan Reedy in branch '3.3':
Issue #20750, Enable roundtrip tests for new 5-tuple untokenize. The
http://hg.python.org/cpython/rev/8d6dd02a973f

New changeset 73aa6d672b81 by Terry Jan Reedy in branch 'default':
Merge with 3.3, #20750
http://hg.python.org/cpython/rev/73aa6d672b81

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20750] Roundtrip-test tokenize.untokenize(iterable_of_5_tuples)

2014-02-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The 2.7 tokenize tests do not have roundtrip tests.
 
Excluding the 7 files is a temporary hack. The issue should stay open until 
each either passes and is removed from the exclusion list or is determined to 
be a permanent exclusion, like test_pep3131.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-02-23 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20753] disable test_robotparser

2014-02-23 Thread Larry Hastings

New submission from Larry Hastings:

Lib/tests/test_robotparser.py uses the following url:
http://mueblesmoraleda.com/robots.txt

That file now serves a 404.

This should be disabled for 3.4, and the test rewritten for 3.5.  If we get a 
patch quickly I would probably cherry-pick it for 3.4 final.

Aside: it is REALLY IRRITATING that we have tests in the standard library that 
hit external web sites.  The standard library regression test suite should 
*not* rely on network access.  Can the rewritten test please spin up a local 
web server (http.server) and serve a robotx.txt that way?

--
messages: 212044
nosy: larry
priority: high
severity: normal
stage: needs patch
status: open
title: disable test_robotparser
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20753] disable test_robotparser test that uses an invalid URL

2014-02-23 Thread Larry Hastings

Changes by Larry Hastings :


--
title: disable test_robotparser -> disable test_robotparser test that uses an 
invalid URL

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20747] Charset.header_encode in email.charset doesn't take a maxlinelen argument and has inconsistent behavior with different encodings

2014-02-23 Thread R. David Murray

R. David Murray added the comment:

The line wrapping is done by Header, not header_encode.  The bug appears to be 
that maxlinelen=None is not passed to base64mime's header_encode the way it is 
to quoprimime's header_encode...and that base64mime doesn't handle a maxlinelen 
of None.  Using maxlinelen=999 in the base64mime.header_encode calll, your 
base64 example also results in a single line header.

This should be fixed.  It does not affect python3, which uses a different 
folding algorithm.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20731] Python 3.3.4: SyntaxError with correct source code encoding # -*- coding: latin-1 -*-

2014-02-23 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20731] Python 3.3.4: SyntaxError with correct source code encoding # -*- coding: latin-1 -*-

2014-02-23 Thread R. David Murray

R. David Murray added the comment:

Oops, I missed the fact that it was Benjamin that added Serhiy...Benjamin can 
add himself if he wants :)

--
nosy:  -benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20753] disable test_robotparser test that uses an invalid URL

2014-02-23 Thread R. David Murray

R. David Murray added the comment:

There are tests where we have good reasons why we hit external servers, and 
this is why the 'network' resource is not on by default.

That said, this doesn't appear to be a test that has a good reason to hit an 
external resource, since it should certainly be possible to serve a password 
protected 'site' locally.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20739] PEP 463 (except expression) implementation

2014-02-23 Thread Thomas Wouters

Thomas Wouters added the comment:

http://hg.python.org/features/pep-463-except-expr now contains a version of the 
patch that makes the parentheses mandatory, similar to generator expressions. 
(Leaving the old patch for reference.)

--
hgrepos: +218

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20754] distutils should use SafeConfigParser

2014-02-23 Thread Alex Brandt

New submission from Alex Brandt:

I first noticed this issue when configuring nose via setup.cfg and reported the 
behavior in this issue on their tracker: 
https://github.com/nose-devs/nose/issues/733

I'll repaste the important bits here:

When using a setup.cfg with the following contents (including minor variations):

[nosetests]
logging-format = %(lineno)d: %(process)d: %(message)s
With any setup.py file the following error is raised when trying to run 
setup.py (python2.7 used for example, error also occurs in 3.3):

alunduil@elijah margarine % python2.7 setup.py nosetests
Traceback (most recent call last):
  File "setup.py", line 108, in 
setup(**PARAMS)
  File "/usr/lib64/python2.7/distutils/core.py", line 125, in setup
dist.parse_config_files()
  File "/usr/lib64/python2.7/distutils/dist.py", line 397, in parse_config_files
val = parser.get(section,opt)
  File "/usr/lib64/python2.7/ConfigParser.py", line 623, in get
return self._interpolate(section, option, value, d)
  File "/usr/lib64/python2.7/ConfigParser.py", line 669, in _interpolate
option, section, rawval, e.args[0])
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
section: [nosetests]
option : logging-format
key: pathname
rawval : %(pathname)s:%(lineno)d: %(process)d: %(message)s

The suggested fix of using %% to pass the interpolation through to nose 
requires that distutils use SafeConfigParser rather than ConfigParser.

I've verified that this does indeed appear to work (at least fixing the 
distutils interaction).  The only place the change needs to be made is on lines 
378 and 386 in distutils/dist.py.

I can attach a patch or send a pull request with this fix if there are no 
objections to this solution.

--
components: Distutils
messages: 212048
nosy: alunduil
priority: normal
severity: normal
status: open
title: distutils should use SafeConfigParser
type: behavior
versions: Python 2.7, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20739] PEP 463 (except expression) implementation

2014-02-23 Thread Thomas Wouters

Changes by Thomas Wouters :


Added file: http://bugs.python.org/file34205/5c078eb8da39.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20755] 3.3.4: doc build fails on Sphinx < 1.2

2014-02-23 Thread fk

New submission from fk:

With 5d1324b20804, building the docs with Sphinx < 1.2 doesn't work anymore. 
Unfortunately, I don't have the specific exception handy, but in line 34, 
`versionlabels[node['type']]` produces a KeyError because versionlabels is 
missing a 'deprecated-removed' key. Re-adding the 
"versionlabels['deprecated-removed'] = ..." lines seems to help; see also 
https://bitbucket.org/fk/deadsnakes-python3.3/src/8e82e76578cd20ba08ab5addd04651c8abc7f05b/debian/patches/fix-non-1.2-sphinx-builds.diff

--
components: Build
messages: 212050
nosy: fkrull
priority: normal
severity: normal
status: open
title: 3.3.4: doc build fails on Sphinx < 1.2
type: compile error
versions: Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6143] IDLE - an extension to clear the shell window

2014-02-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

OK, I will.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20755] 3.3.4: doc build fails on Sphinx < 1.2

2014-02-23 Thread Ned Deily

Changes by Ned Deily :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20756] Segmentation fault with unoconv

2014-02-23 Thread Sworddragon

New submission from Sworddragon:

With Python 3.4.0 RC1 on using the command "unoconv -o test.pdf test.odt" I'm 
getting a segmentation fault. In the attachments are the used LibreOffice 
document and a GDB backtrace. The used version of unoconv was 0.6-6 from Ubuntu 
14.04 dev and can be currently found here: 
http://packages.ubuntu.com/de/source/trusty/unoconv

--
components: Interpreter Core
files: backtrace.txt
messages: 212052
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Segmentation fault with unoconv
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file34206/backtrace.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20756] Segmentation fault with unoconv

2014-02-23 Thread Sworddragon

Changes by Sworddragon :


Added file: http://bugs.python.org/file34207/test.odt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18882] Add threading.main_thread() function

2014-02-23 Thread R. David Murray

R. David Murray added the comment:

In msg196529 Antoine says there are two possible interpretations of 
main_thread, and we must choose one.  However, the documentation does not 
indicate which one was chosen.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20756] Segmentation fault with unoconv

2014-02-23 Thread Ned Deily

Ned Deily added the comment:

I don't know anything about these programs but it appears libpyuno.so is linked 
with a specific version of Python 3.  Was it rebuilt linked against Python 3.4, 
instead of Python 3.3?

http://packages.ubuntu.com/en/trusty/python3-uno

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20756] Segmentation fault with unoconv

2014-02-23 Thread Sworddragon

Sworddragon added the comment:

> Was it rebuilt linked against Python 3.4, instead of Python 3.3?

I don't know. Is ../Python/pystate.c that throws the error not a part of Python?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20756] Segmentation fault with unoconv

2014-02-23 Thread Ned Deily

Ned Deily added the comment:

The point is that you may be inadvertently mixing a shared library 
(libpyuno.so) linked to a Python 3.3 interpreter with a base Python 3.4 
interpreter.  Unless python3-uno is very careful to use the stable ABI there is 
no guarantee of binary level compatibility between Python versions (3.3 vs 3.4):

http://docs.python.org/dev/c-api/stable.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-02-23 Thread Eric Floehr

Eric Floehr added the comment:

I have attached a patch file for test_tarfile.py that uses the attached 
'bad.tar' to test this issue.

After applying this test patch, put 'bad.tar' in Lib/test with the name 
'issue15858.tar'.

This tests Tarfile.next(), but the issue can be seen via the command line 
interface, which uses .next() under the covers:

Pre-patch:
$ ./python -m tarfile -l Lib/test/issue15858.tar 
foo/ 

Post-patch:
$ ./python -m tarfile -l Lib/test/issue15858.tar 
foo/ 
foo/a

--
keywords: +patch
nosy: +efloehr
Added file: http://bugs.python.org/file34208/test_tarfile.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9974] tokenizer.untokenize not invariant with line continuations

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0f0e9b7d4f1d by Terry Jan Reedy in branch '2.7':
Issue #9974: When untokenizing, use row info to insert backslash+newline.
http://hg.python.org/cpython/rev/0f0e9b7d4f1d

New changeset 24b4cd5695d9 by Terry Jan Reedy in branch '3.3':
Issue #9974: When untokenizing, use row info to insert backslash+newline.
http://hg.python.org/cpython/rev/24b4cd5695d9

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12691] tokenize.untokenize is broken

2014-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0f0e9b7d4f1d by Terry Jan Reedy in branch '2.7':
Issue #9974: When untokenizing, use row info to insert backslash+newline.
http://hg.python.org/cpython/rev/0f0e9b7d4f1d

New changeset 24b4cd5695d9 by Terry Jan Reedy in branch '3.3':
Issue #9974: When untokenizing, use row info to insert backslash+newline.
http://hg.python.org/cpython/rev/24b4cd5695d9

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9974] tokenizer.untokenize not invariant with line continuations

2014-02-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I added 5-tuple mode to roundtrip() in #20750. I solved the ENDMARKER problem 
by breaking out of the token loop if and when it appears. Reconstructing 
trailing whitespace other than \n is hopeless. The roundtrip test currently 
only tests equality of token sequences. But my own tests show that code with 
backslash-newline is reconstructed correctly as long as there is no space 
before it and something other than ENDMARKER after it.

I discovered that tokenize will tokenize '\\' but not '\\\n'. So the latter 
will never appear as tokenizer output. Even if we did use ENDMARKER to create 
the latter, it would fail the current roundtrip test.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20731] Python 3.3.4: SyntaxError with correct source code encoding # -*- coding: latin-1 -*-

2014-02-23 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1529353] Squeezer - squeeze large output in the interpreter

2014-02-23 Thread Tal Einat

Tal Einat added the comment:

Added screenshot of what working with the IDLE shell with the Squeezer 
extension looks like (on Windows).

Note that the second squeezed text is the very long "Max recursion depth" 
exception traceback, which I manually squeezed after it was printed.

--
Added file: http://bugs.python.org/file34209/Squeezer_Screenshot.PNG

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20757] 3.4rc2 Traceback on Windows compilation script

2014-02-23 Thread Jeroen Ruigrok van der Werven

New submission from Jeroen Ruigrok van der Werven:

Just tried the rc2 MSI on Windows 7 x64. Go through the normal setup I always 
pick the Advanced option of compiling the .py files. In rc1 the script it 
spawns works as it should, with rc2 I see it pop up, have a Traceback before it 
quickly closes again.

And this fails the install.

--
keywords: 3.4regression
messages: 212062
nosy: asmodai, larry
priority: release blocker
severity: normal
status: open
title: 3.4rc2 Traceback on Windows compilation script
type: crash
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20731] Python 3.3.4: SyntaxError with correct source code encoding # -*- coding: latin-1 -*-

2014-02-23 Thread Musashi Tamura

Musashi Tamura added the comment:

You can avoid this by changing end of line to CRLF. (I don't know why)

I attach a simpler test case.

--
nosy: +miwa
Added file: http://bugs.python.org/file34210/test1.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20757] 3.4rc2 Traceback on Windows compilation script

2014-02-23 Thread Jeroen Ruigrok van der Werven

Jeroen Ruigrok van der Werven added the comment:

This is, by the way, an upgrade install over rc1. Need to test a clean install 
at some point as well.

Running the MSI with /L* gives me:

Action 8:13:22: RemovePip. 
Action start 8:13:22: RemovePip.
CustomAction RemovePip returned actual error code 1 (note this may not be 100% 
accurate if translation happened inside sandbox)
Error 1722. There is a problem with this Windows Installer package. A program 
run as part of the setup did not finish as expected. Contact your support 
personnel or package vendor.  Action RemovePip, location: 
F:\Python34\python.exe, command: -m ensurepip._uninstall 
MSI (s) (84:50) [08:13:27:188]: Product: Python 3.4.0rc1 (64-bit) -- Error 
1722. There is a problem with this Windows Installer package. A program run as 
part of the setup did not finish as expected. Contact your support personnel or 
package vendor.  Action RemovePip, location: F:\Python34\python.exe, command: 
-m ensurepip._uninstall 

Action ended 8:13:27: RemovePip. Return value 3.
Action ended 8:13:27: INSTALL. Return value 3.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >