[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Sean Ochoa

Sean Ochoa added the comment:

After discussing with folks on the #python-dev tonight, I learned that I was 
testing with a list and I should've been using a set.  I'm working on a patch 
now, and I'm almost ready to have it reviewed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13349
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2012-11-04 Thread Fergus Noble

Fergus Noble added the comment:

GPS time doesn't include leap seconds so I think datetime is a good 
representation. If datetime doesn't know about leap seconds then there would 
still be some issues with finding the timedelta between a GPS time and a UTC 
time straddling a leap second but I guess a similar issue also exists with two 
UTC times.

For my application all the times I am dealing with are in a short period and 
will have the same UTC offset so its a little easier, I can probably avoid most 
of these issues.

However, wouldn't it be possible to implement the general case with a 
non-constant utcoffset function (and new fromutc implementation) in the tzinfo 
class? Of course there is no way to properly handle UTC times more than 6 
months or so in the future...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5288
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11842] slice.indices with negative step and default stop

2012-11-04 Thread Mark Dickinson

Mark Dickinson added the comment:

Agreed.  Closing.

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11842
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12634] Random Remarks in class documentation

2012-11-04 Thread Yongzhi Pan

Changes by Yongzhi Pan fossi...@users.sourceforge.net:


--
nosy: +fossilet

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12634
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

I've started looking into what would be needed to fix this. The basic problem 
is that the compilation process involves many recursive operations, but doesn't 
contain *any* calls to the recursion control functions 
(http://docs.python.org/3/c-api/exceptions.html#recursion-control).

Files to be investigated:
Python/ast.c
Python/symtable.c
Python/compile.c

Suspicion should fall immediately on any functions in these files which end 
with _stmt and _expr. The reason as that these are the self-recursive 
constructs in the Python grammar: statements can contain other statements (via 
the compound statements with their nested suites) and expressions can contain 
other expressions.

The symtable analysis also recurses through the block stack via the 
analyze_block function, making that another candidate for flagging with the 
recursive call functions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11383
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

One caveat on this idea: it may not be possible to use the standard recursion 
limiting functions here, since the Python level recursion limit is generally 
set quite low (1000 by default on my Fedora system).

While this crash *is* a design flaw in our compiler implementation, whatever 
enforced limit we choose, we run the risk of breaking currently working 
applications.

Thus, adjusting the target versions to 3.4. The problem still *affects* all 
versions since 2.5, I'm just indicating that any fix is almost certainly going 
to be too intrusive to risk in a maintenance release.

--
versions: +Python 3.4 -Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11383
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16392] import crashes on circular imports in ext modules

2012-11-04 Thread Stefan Behnel

Stefan Behnel added the comment:

The problem is a) that the module does not necessarily know to which place it 
eventually gets installed (Cython relies on the distutils Extension not lying 
to it, for example, which people do from time to time), and b) that the call to 
Py_InitModule() only receives the plain module name, not the package path. And 
yes, as mentioned in the other issue, passing a pointer to a context 
description struct into the module init function would have been the right 
thing to change for Py3 and still is the right thing to change for Py4.

BTW, I can confirm that registering the module in sys.modules explicitly right 
after creation works around this issue. Given that Cython needs to know the 
FQMN at compile time anyway, this works for us. It still leaves the problem 
open for other extension code.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16392
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Isn't it a duplicate of issue5765?

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11383
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - duplicate
superseder:  - stack overflow evaluating eval(() * 3)

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11383
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

We want to minimise the risk of breaking working code. Making it easy to adjust 
this recursion limit separately from the main recursion limit by using a 
scaling factor is a good way to do that. It shouldn't increase the maintenance 
burden in any significant way, since the ratio of the stack depth increase in 
the compiler vs the main interpreter loop should be relatively constant across 
platforms.

Autogenerated code could easily hit the 1000 term limit - if anything, I'd be 
inclined to set it *higher* than 4 rather than lower, as breaking previously 
working code in a maintenance release is a bad thing, regardless of our opinion 
of the sanity of that code.

--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-11-04 Thread Daniel Urban

Daniel Urban added the comment:

I've attached a patch addressing the comments on Rietveld. I've added another 
modification: inspect.signature uses inspect.unwrap. (It already tried to 
unwrap the function, but it wasn't protected from infinite recursion. I don't 
know if this worth fixing in 3.3.)

--
Added file: http://bugs.python.org/file27876/inspect_unwrap_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13266
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 I don't understand what you mean---can you elaborate?

The Python implementation of this method only 40 lines length, including blank 
lines, docstring and comments.  The C implementation requires over 160 lines 
and less clear.  Are there ways to use in Python interpreter core Python 
implementation for method of builtin class slice.  As already used C 
implementations for some Python-implemented classes.  May be add the file 
_builtins.py where Python version of some cumbersome methods will be 
implemented?  Then execute the followed code on interpreter initialization:

  from _builtins import slice_indices
  slice.indices = slice_indices
  del slice_indices

(or an analog in C).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16400] update default PyPI behavior in docs re: listing versions

2012-11-04 Thread Chris Jerdonek

New submission from Chris Jerdonek:

There is a mismatch between what PyPI and the docs say regarding listing 
versions of packages on PyPI.

The current docs say, By default PyPI will list all versions of a given 
package.

(from http://docs.python.org/3.4/distutils/packageindex.html )

However, PyPI says (and behaves) the opposite way, By default, each new 
release will hide all other release from the regular display.

(from the releases management page of a project)

--
assignee: eric.araujo
components: Distutils, Documentation
keywords: easy
messages: 174769
nosy: chris.jerdonek, eric.araujo, loewis, tarek
priority: normal
severity: normal
status: open
title: update default PyPI behavior in docs re: listing versions
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16400
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch looks good to me.  Now benchmarks and special casing for Py_ssize_t 
values needed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson

Mark Dickinson added the comment:

 Now benchmarks and special casing for Py_ssize_t values needed.

I thought about that, but I don't think it's worth it.  I did some quick 
timings, and as expected the new version of slice.indices is somewhat slower 
than the original.  But I think adding a special case for Py_ssize_t values 
would be premature optimization.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which reverts 3.1 implementation (and adds some optimization).

Microbenchmark:
$ ./python -m timeit -s import re  re._compile('', 0)

Results:
3.1: 1.45 usec per loop
3.2: 4.45 usec per loop
3.3: 9.91 usec per loop
3.4patched: 0.89 usec per loop

--
keywords: +patch
Added file: http://bugs.python.org/file27877/re_compile_cache.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16401] mention PKG-INFO in the documentation

2012-11-04 Thread Chris Jerdonek

New submission from Chris Jerdonek:

Currently, the documentation makes no mention of the PKG-INFO file.

It would be useful if the documentation mentioned what this file is and how it 
is created (e.g. via the sdist command), and also linked to PEP 314.  This can 
be covered somewhere in the distutils documentation:

http://docs.python.org/3.4/distutils/index.html

Index entries should also be created as appropriate.

--
assignee: eric.araujo
components: Distutils, Documentation
messages: 174773
nosy: chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl, tarek
priority: normal
severity: normal
status: open
title: mention PKG-INFO in the documentation
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16401
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Look at compute_slice_indices() in Objects/rangeobject.c.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16401] mention PKG-INFO in the documentation

2012-11-04 Thread Chris Jerdonek

Chris Jerdonek added the comment:

PEP 345 can also be linked to (Metadata version 1.2).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16401
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson

Mark Dickinson added the comment:

Hmm:  one more thing that needs to be fixed before this can be committed---the 
error messages for maltyped start, stop and step are less informative than they 
used to be.

Before the patch:

 slice(0, 2.3, 4).indices(5)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: slice indices must be integers or None or have an __index__ 
method

After the patch:

 slice(0, 2.3, 4).indices(5)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'float' object cannot be interpreted as an integer

I'll fix this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Autogenerated code could easily hit the 1000 term limit - if anything,
 I'd be inclined to set it *higher* than 4 rather than lower, as
 breaking previously working code in a maintenance release is a bad
 thing, regardless of our opinion of the sanity of that code.

We can simply apply the 1000 limit in Python 3.4 and mark the bug as
won't fix in other versions.

I don't think adding a scaling factor just to cope with hypothetical
silly code is a good thing in the long term.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson

Mark Dickinson added the comment:

New patch that fixes the error message for badly typed slice arguments.

Also tweaks a couple of other details:

 - replace Py_GE with Py_GT, Py_LE with Py_LT in the out-of-range comparisons, 
as suggested by Serhiy;  this also makes it more closely match the Python 
reference implementation (since max(x, y) and min(x, y) both return x when x 
and y are equal)

 - make sure exception messages match between the Python reference 
implementation and the C version.

 Look at compute_slice_indices() in Objects/rangeobject.c.

Will do.  I'm not quite sure I even understand how that code's managing to work 
at the moment:  I see the Py_ssize_t case, but I don't see the fallback code 
for the case when things are too large for a Py_ssize_t.

--
Added file: http://bugs.python.org/file27878/issue14794_v4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13424] Add examples for open’s new opener argument

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Isn't it be clearer?

   import os
   dir_fd = os.open('somedir', os.O_RDONLY)
   def opener(path, flags):
  ... return os.open(path, flags, dir_fd=dir_fd)
  ...
   with open('spamspam.txt', 'w', opener=opener) as f:
  ... print('This will be written to somedir/spamspam.txt', file=f)
  ...
   os.close(dir_fd)  # don't leak a file descriptor

Or if you want stronger example:

   import os, contextlib, functools
   @contextlib.contextmanager
  ... def open_relative(dirname):
  ... dir_fd = os.open(dirname, os.O_RDONLY)
  ... def opener(path, flags):
  ... return os.open(path, flags, dir_fd=dir_fd)
  ... try:
  ... yield functools.partial(open, opener=opener)
  ... finally:
  ... os.close(dir_fd)
  ...
   with open_relative('somedir') as open:
  ... with open('spamspam.txt', 'w') as f:
  ... print('This will be written to somedir/spamspam.txt', file=f)
  ...

Frankly speaking, all of these examples looks unconvincing to me.  Even the 
second example could be implemented without an opener argument.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13424
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16183] ZipExtFile object close without file handle closed

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
components:  -Windows

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16183
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

compute_slice_indices() and slice_indices() looks as partially duplicates.  I 
think the similar code should be merged and reused.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Previous issues like this include issue 962772 (from 5/2004) and issue 3686 
(from 8/2008).  Copying the nosy lists from those issues.

This issue affects me also because I maintain a project that I did not author.  
However, PyPI lists me as the author because of distutils's maintainer/author 
replacement logic when generating PKG-INFO.

This issue has come up before, and PyPI continues to list maintainers as 
authors because of it.  Whether or not we start sending both pieces of data, 
can PyPI perhaps be updated to display Contact instead of Author when 
Metadata-Version 1.1 is used?  This seems better to me because distutils is not 
actually sending the author but rather contact information in this case (method 
get_contact())?

http://hg.python.org/cpython/file/63b45c959a2a/Lib/distutils/dist.py#l1025

--
nosy: +akitada, chris.jerdonek, jbelmonte, lemburg, skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16108
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson

New submission from Mark Dickinson:

 class A(object):
... def __index__(self): raise ZeroDivisionError
... 
[66062 refs]
 a = A()
[66065 refs]
 range(10)[0:a]
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: slice indices must be integers or None or have an __index__ method
[66105 refs]

--
assignee: mark.dickinson
messages: 174782
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: range slicing swallows exceptions from __index__ methods.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16402
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch.

--
keywords: +patch
stage:  - patch review
type:  - behavior
versions: +Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27879/issue16402.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16402
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson

Mark Dickinson added the comment:

Agreed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16403] update distutils docs to say that maintainer replaces author

2012-11-04 Thread Chris Jerdonek

New submission from Chris Jerdonek:

As discussed in issue 16108 and other issues referenced there, distutils lists 
the maintainer as the author in PKG-INFO when the maintainer is provided.  
However, the documentation does not state this.

This issue is to update the distutils documentation to state this, e.g. here:

http://docs.python.org/dev/distutils/setupscript.html#additional-meta-data

and here:

http://docs.python.org/dev/distutils/apiref.html#distutils.core.setup

--
assignee: eric.araujo
components: Distutils, Documentation
keywords: easy
messages: 174785
nosy: chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl, tarek
priority: normal
severity: normal
status: open
title: update distutils docs to say that maintainer replaces author
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16403
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I also created issue 16403 to update the distutils docs to say that distutils 
lists the maintainer as the author in PKG-INFO when maintainer is provided.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16108
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
components: +Interpreter Core

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16402
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 94d15358ad6e by Mark Dickinson in branch '3.2':
Issue #16402: In range slicing, fix shadowing of exceptions from __index__ 
method.
http://hg.python.org/cpython/rev/94d15358ad6e

New changeset 2b656a2cf7ef by Mark Dickinson in branch '3.3':
Issue #16402: Merge fix from 3.2
http://hg.python.org/cpython/rev/2b656a2cf7ef

New changeset f02555353544 by Mark Dickinson in branch 'default':
Issue #16402: Merge fix from 3.3
http://hg.python.org/cpython/rev/f02555353544

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16402
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16402
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-04 Thread Ray Donnelly

Ray Donnelly added the comment:

I agree in principle about not having to maintain two implementations but I 
would worry about breaking external packages that depend on the python 
implementation.

In the meantime, please find an updated version of this patch that adds support 
for --configdir

--
Added file: http://bugs.python.org/file27880/-add-python-config-sh.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16235
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I quote from Gregory P. Smith (msg91897):


The decryption provided by the zipfile module is for the worthless
32-bit crc based encryption of zipfiles.  I think promoting the use of
that is a bad idea.

zipfile can be used by people to get their data out of such files.  We
should not encourage them to put it and/or their code into such a stupid
format.


I think that the effort required for speedup of this almost useless feature is 
excessive.

If someone want to implement the strong encryption for zip files - welcome.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-04 Thread Ray Donnelly

Ray Donnelly added the comment:

I also checked the Windows releases and python-config isn't included. However, 
I don't think there's a good reason for that. python-config would in theory 
work fine if people wanted to link their programs to Python on Windows, as 
would python-config.sh given a posix-y shell that e.g. Cygwin or MSYS provide.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16235
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also criticism in the original discussion: 
http://mail.python.org/pipermail/python-dev/2009-August/091450.html .

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Stefan Krah

Stefan Krah added the comment:

Would that result in displaying both author and maintainer info on the PyPI 
page?  For what cases is it useful?

It gives due credit to the original author if another person maintains
the package. I think it's a matter of common courtesy not to suppress
author information (or worse, list the maintainer as the author).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16108
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries

Robert de Vries added the comment:

My use case is decrypting files of 100's of megabytes. This is so slow that it 
is quite useless. About an hour or so.

I do agree that the encryption is worthless, but that is not important for my 
use case where I want to discourage people from reverse engineering the 
contents.
If it is so dangerous as some people have pointed out, it should be removed at 
the cost of not supporting a standard feature of ZIP files.
In my opinion you either support a feature and you support it good (efficient) 
or you don't. As it stands now, users will be disappointed in using a supported 
feature.

Some people argue that adding C code to Python is dangerous as it will lead to 
bugs, vulnerabilities etc.
You could dismiss every addition with C code to Python with this argument, so 
there must be some positive aspects to outweigh the negative side. The negative 
side is fairly small (50 lines of very simple C code), plus some standard 
Python glue code.
The benefit is a 100 fold increase in performance and the removal of 1 line of 
documentation telling that this feature is extremely slow.
(patch attached)

--
Added file: http://bugs.python.org/file27881/doc.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray

R. David Murray added the comment:

We aren't particularly interested in helping people make their files slightly 
harder to reverse engineer, either, so I don't think that is a good enough 
reason for accepting this.  There might be other reasons that are good enough, 
but I don't think that is one of them.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Christian Heimes

Christian Heimes added the comment:

From the zlib FAQ:

38. How can I encrypt/decrypt zip files with zlib?

zlib doesn't support encryption. The original PKZIP encryption is very weak
and can be broken with freely available programs. To get strong encryption,
use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
For PKZIP compatible encryption, look at http://www.info-zip.org/

I don't see the point of a weak and easily breakable encryption.

--
nosy: +christian.heimes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ab02cd145f56 by Nick Coghlan in branch '3.3':
Issue #5765: Apply a hard recursion limit in the compiler
http://hg.python.org/cpython/rev/ab02cd145f56

New changeset bd1db93d76e1 by Nick Coghlan in branch 'default':
Issue #5765: Merge from 3.3
http://hg.python.org/cpython/rev/bd1db93d76e1

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

You can take the scaling factor out if you really want, but it adds no real 
maintenance overhead, and better reflects the real stack usage.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

However, agreed on the won't fix for 3.2 and 2.7, although I'd consider it at 
least for 2.7 if someone went through and worked out a patch that applies 
cleanly.

For 3.2, this really isn't the kind of thing we'd want to do in the final 
regular maintenance release.

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 You can take the scaling factor out if you really want, but it adds no
 real maintenance overhead, and better reflects the real stack usage.

Can you also add a related snippet in
Tools/scripts/find_recursionlimit.py ?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

Note: if you do take the scaling factor out, don't forget to track down the 
reasons behind the original commit that added the test that broke *without* the 
scaling factor.

For me, the test suite fails without it is reason enough for me to say its 
needed - someone decided at some point to ensure that level of nesting worked, 
so if we're going to go back on that, we need to know the original reason why 
the test was added.

I think it's easier just to keep that code working, since we have a solution 
that *doesn't* break it and really isn't that complicated.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cf2515d0328b by Nick Coghlan in branch '3.3':
Issue #5765: Also check the compiler when finding the recursion limit
http://hg.python.org/cpython/rev/cf2515d0328b

New changeset 3712028a0c34 by Nick Coghlan in branch 'default':
Issue #5765: Merge from 3.3
http://hg.python.org/cpython/rev/3712028a0c34

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

The sanity check in the recursion limit finding script is definitely a good 
idea, so I added that (as the commits show).

For the record, running that script on the 3.3 branch with my 4 GB RAM Fedora 
17 ASUS Zenbook finds a maximum recursion limit around 16800, at which point 
test_add is the first one to die.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries

Robert de Vries added the comment:

If the encryption is so horrible why is there any support (with bad 
performance) at all in Python?
It would be better to remove it altogether.
This prevents users from building software using this feature only to find out 
later how bad the performance is. (This is the main reason why I have submitted 
this patch.)
If the support had not been in Python I would not have used this feature to 
begin with.

To reiterate my previous point. Either support something and do it well, or 
don't. Don't do a half job.

Please note that there are more attempts to fix this, so I am not completely 
alone here.
http://pypi.python.org/pypi/czipfile

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Mark Shannon

Mark Shannon added the comment:

I don't think there is any need for a scaling factor.
Expressions in auto-generated trees will tend to be trees of binary operator 
rather lists of purely unary operators. A tree of a billion items only has a 
depth of ~30.

There is no way an expression tree 1000 deep could possibly have any sane 
behaviour.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 The sanity check in the recursion limit finding script is definitely a
 good idea, so I added that (as the commits show).

Didn't you make a mistake in the recursion factor there? Or is it really
10 rather than 3?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 If the encryption is so horrible why is there any support (with bad
 performance) at all in Python?
 It would be better to remove it altogether.

We don't remove it as it would break existing programs which rely on
this feature. However adding a bunch of C code to improve performance of
such a questionable feature is controversial.

I wouldn't be against the acceleration myself, however I am not
interested in reviewing or accepting it, sorry.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-11-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 The patch is probably trivial - however I would still like some
 verification.
 Would it be correct to call self.close() when fp.read returns ''? In
 case self.length is not present, I don't see a way around this anyway.
 When it is present, and fp.read returns '', how should we go about
 that? We can either return less data, or raise an exception to
 indicate that the connection terminated prematurely.

It's probably better to return less data. No need to break user programs
when they download from a slightly misbehaved Web site.

The patch should include some kind of unit test, if possible. See
Lib/test/test_httplib.py.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

Antoine: The scaling is deliberate higher in the recursion limit finder because 
we just want to ensure it hits the recursion limit (or blows the stack, if the 
scaling is wrong). In the tests, I cut it finer because I wanted to ensure we 
were straddling the allowed/disallowed boundary fairly closely in order to 
properly test the code that accounts for the *existing* recursion depth when 
initialising the compiler's internal state.

Mark: same answer I gave Antoine earlier. Without the scaling factor, a test 
fails. If you want to advocate for removing or changing that test instead, 
track down why it was added and provide a rationale for why it's no longer 
applicable. However, before you invest too much time in that, note that the 
trees generated by binary operators of the same precedence in CPython are *not* 
balanced (IIRC, the LHS is handled as a leaf expression), thus they also suffer 
from this recursion problem (if you look at the patch I committed, I added an 
extra test beyond those Andrea provided: a multiplication expression with a 
ridiculously large number of terms). I agree that path is the only one 
generated code is likely to hit, though, which is why I added a specific test 
for it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5765
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-04 Thread Ned Batchelder

New submission from Ned Batchelder:

Examining the CPython sources, there are a number of places where 
PyLong_FromLong is used without checking its return value. In places where it 
is done correctly, PyErr_Occurred is often used to avoid having to check every 
call.

Here are places where it isn't done properly.  I can make patches if desired, 
though I can't build and test on Windows.  This code is from CPython tip, but 
the same issues exist in the 2.7 branch.

In Modules/arraymodule.c:

static PyObject *
array_buffer_info(arrayobject *self, PyObject *unused)
{
PyObject* retval = NULL;
retval = PyTuple_New(2);
if (!retval)
return NULL;

PyTuple_SET_ITEM(retval, 0, PyLong_FromVoidPtr(self-ob_item));
PyTuple_SET_ITEM(retval, 1, PyLong_FromLong((long)(Py_SIZE(self;

return retval;
}

In Modules/ossaudiodev.c

/* Construct the return value: a (fmt, channels, rate) tuple that
   tells what the audio hardware was actually set to. */
rv = PyTuple_New(3);
if (rv == NULL)
return NULL;
PyTuple_SET_ITEM(rv, 0, PyLong_FromLong(fmt));
PyTuple_SET_ITEM(rv, 1, PyLong_FromLong(channels));
PyTuple_SET_ITEM(rv, 2, PyLong_FromLong(rate));
return rv;

These 7 lines could be replaced simply with:

return Py_BuildValue((iii), fmt, channels, rate);


In Python/sysmodule.c, where the PyUnicode_FromString is far more worrisome:

static PyObject *
sys_getwindowsversion(PyObject *self)
{
PyObject *version;
int pos = 0;
OSVERSIONINFOEX ver;
ver.dwOSVersionInfoSize = sizeof(ver);
if (!GetVersionEx((OSVERSIONINFO*) ver))
return PyErr_SetFromWindowsErr(0);

version = PyStructSequence_New(WindowsVersionType);
if (version == NULL)
return NULL;

PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.dwMajorVersion));
PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.dwMinorVersion));
PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.dwBuildNumber));
PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.dwPlatformId));
PyStructSequence_SET_ITEM(version, pos++, 
PyUnicode_FromString(ver.szCSDVersion));
PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.wServicePackMajor));
PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.wServicePackMinor));
PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wSuiteMask));
PyStructSequence_SET_ITEM(version, pos++, 
PyLong_FromLong(ver.wProductType));

return version;
}

In Doc/extending/extending.rst, as an example of a correct function!:

   void
   no_bug(PyObject *list)
   {
   PyObject *item = PyList_GetItem(list, 0);

   Py_INCREF(item);
   PyList_SetItem(list, 1, PyLong_FromLong(0L));
   PyObject_Print(item, stdout, 0);
   Py_DECREF(item);
   }

--
messages: 174809
nosy: nedbat
priority: normal
severity: normal
status: open
title: Uses of PyLong_FromLong that don't check for errors
versions: Python 2.7, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16404
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Nick Coghlan

New submission from Nick Coghlan:

Setting up the same commit checks locally that the main repo enforces for 
incoming patch sets can save a great deal of frustration with the server 
rejecting hg push for changes (this can be especially frustrating if you have 
already merged changes across branches).

The committer section of the devguide [1] should explain how to:

1. Check out the hooks repo from hg.python.org
2. Configure the whitespace checking hook by adding this to hgrc for the 
relevant repo(s) (adjusting the path appropriately for the checked out location 
of the hooks repo):

[hooks]
commit = python:~/devel/hg_hooks/checkwhitespace.py:check_whitespace_single


[1] 
http://docs.python.org/devguide/committing.html#committing-and-pushing-changes

--
components: Devguide
messages: 174810
nosy: ezio.melotti, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Explain how to set up the whitespace commit hook locally
type: enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16392] import crashes on circular imports in ext modules

2012-11-04 Thread Brett Cannon

Brett Cannon added the comment:

It sounds like Cython has its fix and CPython knows what should eventually be 
changed in Python 4 to bring extension module initialization closer to how 
Python module code is initialized.

Maybe we should add a warning in some documentation somewhere about this and 
then close the issue?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16392
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Configuring the editor to remove trailing whitespace, and using make patchcheck 
are other valid solutions to this problem.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2012-11-04 Thread Christian Heimes

Christian Heimes added the comment:

I'm all with Antoine's suggestion. readprofile() should not be executed when 
sys.flags.ignore_environment is set.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16248
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

Sure, but both of those can fail (forgetting to run make patchcheck, using a 
different editor from your normal one for some reason)

Once the commit hook is set up properly, you get alerted to the problem as soon 
as you try to commit, rather than having to untangle a merge chain when you 
realise on pushing that you stuffed up the whitespace in the original bugfix 
commit.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Ezio Melotti

Ezio Melotti added the comment:

I'm not against your proposal.  If the goal is to explain how to get rid of 
trailing whitespace then the other solutions should be mentioned too (I think 
made patchcheck already is).  If the goal is to show how to set up local hooks 
and where to get them, then the other solutions don't belong there.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which optimize (speed up 2x) Python implementation of ZIP 
decryptor.  It is almost the maximum of what can be achieved without 
significant degradation of maintainability.

Of course, 2x is less then 100x, but it more portable and costs almost nothing. 
 If that's not enough, I suggest to use an external unzip. You can even run 
multiple unzips at a time for the parallel extraction of multiple files.

If in the future someone will implement the strong encryption for ZIP files, it 
is possible it will required a C accelerator module and it is possible there 
will be a place for PKWARE's traditional encryption.

--
Added file: http://bugs.python.org/file27882/zipfile_decryptor_speedup.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Rafik Draoui

Rafik Draoui added the comment:

Here is a patch with an implementation of os.path.commonpath, along with tests 
and documentation. At the moment, this is only implemented for POSIX, as I 
don't feel like I know enough about Windows to tackle drive letters and UNC in 
paths without spending some more time on it.

This probably needs more tests for corner cases.

--
nosy: +rafik
Added file: http://bugs.python.org/file27883/patch10395

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10395
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue15989.

--
assignee:  - docs@python
components: +Documentation, Extension Modules, Interpreter Core
nosy: +docs@python, mark.dickinson, serhiy.storchaka
stage:  - needs patch
type:  - behavior
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16404
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10395
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 At the moment, this is only implemented for POSIX, as I don't feel like I 
 know enough about Windows to tackle drive letters and UNC in paths without 
 spending some more time on it.

Just use splitdrive() and first ensure that all drivespecs are same, then find 
common prefix for pathspecs.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10395
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError(Non-UTF-8 code starting with...)

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - needs patch
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14811
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: patch review - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14377
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Sean Ochoa

Sean Ochoa added the comment:

Ready for review.

--
keywords: +patch
Added file: http://bugs.python.org/file27884/issue-13349.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13349
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13968] Support recursive globs

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: patch review - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13968
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Ezio Melotti

Ezio Melotti added the comment:

You should use assertRaises/assertRaisesRegex to check the error message and 
add more tests to cover all the changes.  I also noticed an inconsistence 
between 'element not in container' and 'element is not in container' (note the 
extra 'is').  FWIW I prefer the version without 'is'.

--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13349
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16163] Wrong name in Lib/pkgutil.py:iter_importers

2012-11-04 Thread Berker Peksag

Berker Peksag added the comment:

 I don't think it's necessary to check for UnboundLocalError/NameError
 in the tests.

Thanks for the review.

Attached a new patch.

--
Added file: http://bugs.python.org/file27885/pkgutil-name-with-test_v3.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15276] unicode format does not really work in Python 2.x

2012-11-04 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy:  -berker.peksag

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15276
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray

R. David Murray added the comment:

 If the encryption is so horrible why is there any support (with bad 
 performance) at all in Python?

I would say it there so that people can use python to decrypt an encrypted 
zip archive they have been sent that was generated by some other tool.  I would 
say this is not a particularly strong use case since there are other tools that 
can be used for this, but as Antoine said removing the feature could break 
existing working code, so we are unlikely to do it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6478] time.tzset does not reset _strptime's locale time cache

2012-11-04 Thread Berker Peksag

Berker Peksag added the comment:

Alexander: Did you have a chance to review the test?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6478
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16406] move the Uploading Packages section to distutils/packageindex.rst

2012-11-04 Thread Chris Jerdonek

New submission from Chris Jerdonek:

I think the Package Index (PyPI) documentation would be clearer if the section 
called Uploading Packages to the Package Index:

http://docs.python.org/3.4/distutils/uploading.html

were made a part of the previous section about PyPI (now called Registering 
with the Package Index):

http://docs.python.org/3.4/distutils/packageindex.html

The combined section could then be renamed simply to The Python Package Index 
(PyPI).

Both sections are small and very closely related.  For example, the second half 
of the section on uploading (the subsection called PyPI package display) is 
not actually about uploading but rather about registering and PyPI in general.  
Similarly, the second half of the first section on registering (the subsection 
called The .pypirc file) applies equally to uploading as it does to 
registering.

I was affected by the current organization, for example, because it gave the 
impression that uploading updates the PyPI package display (which is 
conceivable since PKG-INFO is part of the uploaded files).  Rather, it is 
registering a version which updates the package display for that version.

A combined section on PyPI would better reflect how things should be understood.

--
assignee: eric.araujo
components: Distutils, Documentation
keywords: easy
messages: 174825
nosy: chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl, tarek
priority: normal
severity: normal
status: open
title: move the Uploading Packages section to distutils/packageindex.rst
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16406
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6478] time.tzset does not reset _strptime's locale time cache

2012-11-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

issue6478_v2.patch looks good to me.  There is a long line in _strptime.py 
which I will fix before committing.

--
stage: test needed - commit review
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6478
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16407] Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace support

2012-11-04 Thread yrammos

New submission from yrammos:

I am building Python 2.7.3 using Homebrew as follows:

 brew install --with-dtrace --quicktest python

The failing tests are: 
test_ctypes
test_sys

Omitting --with-dtrace reduces the failures to one test:
test_ctypes

@samueljohn from github suggested that I ping Jesús Cea Avión or Ronald 
Oussoren for this.

--
components: Tests
messages: 174827
nosy: yrammos
priority: normal
severity: normal
status: open
title: Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace 
support
type: compile error
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16407
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file25709/issue8271-3.3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file26116/issue8271-3.3-fast-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What about commit?  All Ezio's tests passsed, microbenchmark shows less than 
10% differences:

vanilla  patched
MB/s MB/s

2076 (-3%)   2007   decode  utf-8  'A'*1
414 (-0%)413decode  utf-8  '\x80'*1
1283 (-1%)   1275   decode  utf-8'\x80'+'A'*
556 (-8%)514decode  utf-8  '\u0100'*1
1227 (-4%)   1172   decode  utf-8'\u0100'+'A'*
556 (-8%)514decode  utf-8'\u0100'+'\x80'*
406 (+10%)   447decode  utf-8  '\u8000'*1
1225 (-5%)   1167   decode  utf-8'\u8000'+'A'*
554 (-7%)513decode  utf-8'\u8000'+'\x80'*
552 (-8%)508decode  utf-8'\u8000'+'\u0100'*
358 (-4%)345decode  utf-8  '\U0001'*1
1173 (-5%)   1118   decode  utf-8'\U0001'+'A'*
492 (+1%)495decode  utf-8'\U0001'+'\x80'*
492 (+1%)496decode  utf-8'\U0001'+'\u0100'*
383 (+5%)401decode  utf-8'\U0001'+'\u8000'*

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Eric Busboom

New submission from Eric Busboom:

The zipfile.testzip() method will open each of the files in a zip archive, but 
does not close the files, resulting in a file descriptor leak.

--
components: Library (Lib)
messages: 174829
nosy: Eric.Busboom
priority: normal
severity: normal
status: open
title: zipfile.testzip() opens file but does not close it.
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries

Robert de Vries added the comment:

The current situation is now that the decryption is part of Python. It is well 
known to be computationally intensive and should therefore be implemented in C.

This patch provides that support.

The discussion if Python should support the decryption is behind us, as the 
support is already in.

The only discussion should be about if there are enough users wanting this 
performance improvement to add it.

From the download statistics of czipfile I would say that there are roughly 
2500 users interested.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10030
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: test needed - patch review
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12892
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5962f192a483 by Ezio Melotti in branch '3.3':
#8271: the utf-8 decoder now outputs the correct number of U+FFFD  characters 
when used with the replace error handler on invalid utf-8 sequences.  Patch 
by Serhiy Storchaka, tests by Ezio Melotti.
http://hg.python.org/cpython/rev/5962f192a483

New changeset 5b205fff1972 by Ezio Melotti in branch 'default':
#8271: merge with 3.3.
http://hg.python.org/cpython/rev/5b205fff1972

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for updating the patch!
I committed it on 3.3 too, and while this could have gone on 2.7/3.2 too IMHO, 
it's to much work to port it there and not worth it.

--
status: open - closed
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

issue5057-3.diff LGTM.

I added debug output in peepholer, ran tests and found that this optimization 
happened for unicode strings only in test_multibytecodec (where it used 
deliberately) and test_peepholer.  Seems as this is very rare case.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5057
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agree.  In 2.7 UTF-8 codec still broken in corner cases (it accepts 
surrogates) and 3.2 is coming to an end of maintaining.  In any case it is 
only recomendation, not demands.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
keywords: +easy
stage:  - needs patch
type: behavior - resource usage
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9481e062fe26 by Ezio Melotti in branch '2.7':
#5057: the peepholer no longer optimizes subscription on unicode literals (e.g. 
ufoo[0]) in order to produce compatible pyc files between narrow and wide 
builds.
http://hg.python.org/cpython/rev/9481e062fe26

New changeset 56bc323288d1 by Ezio Melotti in branch '3.2':
#5057: the peepholer no longer optimizes subscription on unicode literals (e.g. 
ufoo[0]) in order to produce compatible pyc files between narrow and wide 
builds.
http://hg.python.org/cpython/rev/56bc323288d1

New changeset 3b4f2f9272b4 by Ezio Melotti in branch '3.3':
#5057: null merge with 3.2 (only add tests).
http://hg.python.org/cpython/rev/3b4f2f9272b4

New changeset 0790c16bb275 by Ezio Melotti in branch 'default':
#5057: null merge with 3.3 (only add tests).
http://hg.python.org/cpython/rev/0790c16bb275

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5057
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-11-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5057
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-04 Thread anatoly techtonik

New submission from anatoly techtonik:

Renamed urllib.urlretrieve changed behaviour in Py3k, which leads to 
ZeroDivisionErrors in applications that use block_size parameter for 
calculations. Previously, block size was constant. Now it varies making it 
impossible to exactly calculate value transferred so far. Test file attached.


C:\Python33\python.exe test.py
0 0 59654
1 8192 59654
2 8192 59654
3 8192 59654
4 8192 59654
5 8192 59654
6 8192 59654
7 8192 59654
8 2310 59654

C:\Python27\python.exe test.py
(0, 8192, 59654)
(1, 8192, 59654)
(2, 8192, 59654)
(3, 8192, 59654)
(4, 8192, 59654)
(5, 8192, 59654)
(6, 8192, 59654)
(7, 8192, 59654)
(8, 8192, 59654)

--
components: Library (Lib)
files: test.py
messages: 174836
nosy: techtonik
priority: normal
severity: normal
status: open
title: urlretrieve regression: first call returns block size as 0
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27886/test.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16409
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Eric Busboom

Eric Busboom added the comment:

I've tried just closing the ZipExtFile created in testzip, but that didn't 
actually close the file. It looks like ZipExtClose.close() also doesn't close 
the file descriptor, at least when the ZipFile is constructed on a filename.

This code worked (Addition of f._fileobj.close() )

f = zf.open(zinfo.filename, r)
while f.read( 2 ** 20): # Check CRC-32
  pass
f.close()
f._fileobj.close() # This shoulnd't be necessary, but it is.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16410] rewrite winsound with ctypes

2012-11-04 Thread anatoly techtonik

New submission from anatoly techtonik:

http://hg.python.org/cpython/file/tip/PC/winsound.c

No need to maintain this in C. It doesn't seem like a critical part of code. 
Will there be significant performance penalty?

--
components: Library (Lib), ctypes
messages: 174838
nosy: techtonik
priority: normal
severity: normal
status: open
title: rewrite winsound with ctypes
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16410
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13740] winsound.SND_NOWAIT ignored on modern Windows platforms

2012-11-04 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13740
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 96f4cee8ea5e by Victor Stinner in branch '3.3':
Issue #8271: Fix compilation on Windows
http://hg.python.org/cpython/rev/96f4cee8ea5e

New changeset 6f44f33460cd by Victor Stinner in branch 'default':
(Merge 3.3) Issue #8271: Fix compilation on Windows
http://hg.python.org/cpython/rev/6f44f33460cd

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16410] rewrite winsound with ctypes

2012-11-04 Thread Martin v . Löwis

Martin v. Löwis added the comment:

ctypes is not an acceptable implementation strategy for modules in the standard 
library. No need to reimplement it.

--
nosy: +loewis
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16410
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread STINNER Victor

STINNER Victor added the comment:

test_cmd_line_script.test_non_utf8() is failing on Mac OS X since the changeset 
95d1adf144ee.

==
FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest)
--
Traceback (most recent call last):
  File 
/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_cmd_line_script.py,
 line 381, in test_non_utf8
rc, out, _ = assert_python_ok(*run_args)
  File 
/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/script_helper.py,
 line 54, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/script_helper.py,
 line 46, in _assert_python
stderr follows:\n%s % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is 2, stderr follows:
/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/python.exe:
 can't open file 'unprintable file name': [Errno 92] Illegal byte sequence

http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/404/steps/test/logs/stdio

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >