[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2012-07-02 Thread Tim Golden

Tim Golden  added the comment:

On 30/06/2012 06:45, Daniel Lenski wrote:
> My preferred solution would be to replace the binary delete argument of the 
> current NamedTemporaryFile implementation with finer-grained options:
>delete=False # don't delete
>delete=True  # delete after file closed, current behavior
>delete=AFTER_CLOSE   # delete after file closed
>delete=AFTER_CM_EXIT # delete after context manager exits
>delete=AFTER_CM_EXIT_NO_EXCEPTION # delete after CM exit, unless this is 
> due to an exception

I'm aware that Richard & others are fleshing out alternatives. But my
having asked you to propose something I wanted to come back on this
particular suggestion. I think it's just too complex an API. Not least
because, on Windows, we're making use of a filesystem feature which will
delete on closure regardless (so the implementation on Windows skips the
context-based delete).

I'm not sure what we'll end up with but I'm more inclined towards the
sort of method-based closer/reopener which is more explicit.

--
title: tempfile.NamedTemporaryFile not particularly useful on Windows -> 
tempfile.NamedTemporaryFile not particularly useful on Windows

___
Python tracker 

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



[issue15239] Abandoned Tools/unicode/mkstringprep.py

2012-07-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

>  If it produces different output today, we should investigate why.

Lib/stringprep.py differs from updated Tools/unicode/mkstringprep.py output 
only by additional entity 0x130:'i\u0307' in b3_exceptions.

In 3.2 and lower '\u0130'.lower() == '\u0069', in 3.3 '\u0130'.lower() == 
'\u0069\u0307'.

--

___
Python tracker 

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



[issue7897] Support parametrized tests in unittest

2012-07-02 Thread Borja Ruiz Castro

Borja Ruiz Castro  added the comment:

Hi Murray!

I use a lot od parametrized tests. I usually use the ENV to pass these
parameters and/or a custon configuration file.

What is your approach to parametrize all the test stuff?

Regards,

Borja.

On 31 May 2012 03:57, R. David Murray  wrote:

>
> R. David Murray  added the comment:
>
> People interested in this issue might be interested in changeset
> e6a33938b03f.  I use parameterized unit tests in email a lot, and was
> annoyed by the fact that I couldn't run the tests individually using the
> unittest CLI.  The fix for that turned out to be trivial, but by the time I
> figured it out, I'd already written most of the metaclass.  So since the
> metaclass reduces the boilerplate (albeit at the cost of looking like black
> magic), I decided to go with it.  And the metaclass at least avoids the
> rather questionable use of the "modify locals()" hack I was using before.
>
> --
>
> ___
> Python tracker 
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe:
> http://mail.python.org/mailman/options/python-bugs-list/isec%40alienvault.com
>
>

--
nosy: +borja.ruiz

___
Python tracker 

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



[issue7897] Support parametrized tests in unittest

2012-07-02 Thread Borja Ruiz Castro

Borja Ruiz Castro  added the comment:

Sorry, I failed to mention that I use Testify to launch all my tests!

On 2 July 2012 13:23, Borja Ruiz Castro  wrote:

>
> Borja Ruiz Castro  added the comment:
>
> Hi Murray!
>
> I use a lot od parametrized tests. I usually use the ENV to pass these
> parameters and/or a custon configuration file.
>
> What is your approach to parametrize all the test stuff?
>
> Regards,
>
> Borja.
>
> On 31 May 2012 03:57, R. David Murray  wrote:
>
> >
> > R. David Murray  added the comment:
> >
> > People interested in this issue might be interested in changeset
> > e6a33938b03f.  I use parameterized unit tests in email a lot, and was
> > annoyed by the fact that I couldn't run the tests individually using the
> > unittest CLI.  The fix for that turned out to be trivial, but by the
> time I
> > figured it out, I'd already written most of the metaclass.  So since the
> > metaclass reduces the boilerplate (albeit at the cost of looking like
> black
> > magic), I decided to go with it.  And the metaclass at least avoids the
> > rather questionable use of the "modify locals()" hack I was using before.
> >
> > --
> >
> > ___
> > Python tracker 
> > 
> > ___
> > ___
> > Python-bugs-list mailing list
> > Unsubscribe:
> >
> http://mail.python.org/mailman/options/python-bugs-list/isec%40alienvault.com
> >
> >
>
> --
> nosy: +borja.ruiz
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue15223] datetime instances lack __module__ attribute

2012-07-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

In PyPy, datetime.py is a pure Python module (similar to the one in 3.x, but 
without the _datetime acceleration module).  So comparison with CPython is not 
relevant here.

In CPython, __module__ is not an attribute of the type, but a property: it is 
defined in the 'type' object.  The situation is similar to the following script 
(2.x syntax); the "foo" attribute can be found on the class, but not on 
instances of the class.

class Type(type):
foo = 42
class Datetime:
__metaclass__ = Type
print Datetime.foo
print Datetime().foo

This is a good thing sometimes: for example 'str' has a __dict__ (containing 
methods) but strings don't have a __dict__ -- storage is optimized and only has 
an array of chars.  In this case you wouldn't want the class __dict__ be 
returned instead.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2012-07-02 Thread Richard Oudkerk

Richard Oudkerk  added the comment:

I wrote in an earlier message that a file opened with O_TEMPORARY must be 
reopened with O_TEMPORARY.  This is not quite accurate.

Using O_TEMPORARY causes the FILE_SHARE_DELETE sharing mode to be used, and a 
file currently opened with FILE_SHARE_DELETE can only be reopened with 
FILE_SHARE_DELETE.

Unfortunately using O_TEMPORARY is the only way allowed by msvcrt to get 
FILE_SHARE_DELETE, even though it also has the orthogonal effect of unlinking 
the file when all handles are closed.

The nice thing about FILE_SHARE_DELETE is that it gives Unix-like behaviour: 
the file can be renamed or deleted while you have an open handle, and you can 
still continue to use the handle.

Attached is a mostly untested attempt at writing replacements for open() and 
os.open() which use the FILE_SHARE_DELETE sharing mode.  Among other things, 
these can be used for reopening temporary files.

Even if tempfile does not use make use of this, I think something similar would 
be useful in the stdlib.

--
Added file: http://bugs.python.org/file26229/share.py

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Larry Hastings

Larry Hastings  added the comment:

Storchaka: change of plan.  Since doc changes are much lower risk than code 
changes, how about we go with your existing patch and I'll fix up the docs 
separately.

So, please make the relevant code changes I proposed on Rietveld (adding "*," 
everywhere was it iirc) and resubmit and we can get that in.  I'll give you a 
code-only review of the other patch too--I'll start on that now.

--

___
Python tracker 

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings

Larry Hastings  added the comment:

Here's a patch.  I read the implementation to find out what it does, then 
documented it.  Happily it does the sane thing.

--
keywords: +patch
Added file: http://bugs.python.org/file26230/larry.atexit.1.diff

___
Python tracker 

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Here's a patch.  I read the implementation to find out what it does,
> then documented it.  Happily it does the sane thing.

Is it tested for?

--

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> So, please make the relevant code changes I proposed on Rietveld (adding "*," 
> everywhere was it iirc) and resubmit and we can get that in.  I'll give you a 
> code-only review of the other patch too--I'll start on that now.

Here is a changed patches.

Personally, I doubt that followlinks-to-follow_symlinks-4.patch is
better than followlinks-to-follow_symlinks-3.patch. Also my concern is
the incompatibility of the arguments of os.walk and os.fwalk.

--
Added file: 
http://bugs.python.org/file26231/followlinks-to-follow_symlinks-4.patch
Added file: http://bugs.python.org/file26232/symlinks-to-follow_symlinks-4.patch

___
Python tracker 

___diff -r a1c8302e6b27 Doc/library/os.rst
--- a/Doc/library/os.rstSun Jul 01 12:24:20 2012 +0200
+++ b/Doc/library/os.rstMon Jul 02 18:07:59 2012 +0300
@@ -2211,7 +2211,7 @@
   os.rmdir(os.path.join(root, name))
 
 
-.. function:: fwalk(top='.', topdown=True, onerror=None, followlinks=False, *, 
dir_fd=None)
+.. function:: fwalk(top='.', topdown=True, onerror=None, *, 
follow_symlinks=False, dir_fd=None)
 
.. index::
   single: directory; walking
diff -r a1c8302e6b27 Lib/os.py
--- a/Lib/os.py Sun Jul 01 12:24:20 2012 +0200
+++ b/Lib/os.py Mon Jul 02 18:07:59 2012 +0300
@@ -424,7 +424,7 @@
 
 if {open, stat} <= supports_dir_fd and {listdir, stat} <= supports_fd:
 
-def fwalk(top=".", topdown=True, onerror=None, followlinks=False, *, 
dir_fd=None):
+def fwalk(top=".", topdown=True, onerror=None, *, follow_symlinks=False, 
dir_fd=None):
 """Directory tree generator.
 
 This behaves exactly like walk(), except that it yields a 4-tuple
@@ -435,7 +435,7 @@
 and `dirfd` is a file descriptor referring to the directory `dirpath`.
 
 The advantage of fwalk() over walk() is that it's safe against symlink
-races (when followlinks is False).
+races (when follow_symlinks is False).
 
 If dir_fd is not None, it should be a file descriptor open to a 
directory,
   and top should be relative; top will then be relative to that 
directory.
@@ -462,13 +462,13 @@
 orig_st = stat(top, follow_symlinks=False, dir_fd=dir_fd)
 topfd = open(top, O_RDONLY, dir_fd=dir_fd)
 try:
-if (followlinks or (st.S_ISDIR(orig_st.st_mode) and
-path.samestat(orig_st, stat(topfd:
-yield from _fwalk(topfd, top, topdown, onerror, followlinks)
+if (follow_symlinks or (st.S_ISDIR(orig_st.st_mode) and
+path.samestat(orig_st, stat(topfd:
+yield from _fwalk(topfd, top, topdown, onerror, 
follow_symlinks)
 finally:
 close(topfd)
 
-def _fwalk(topfd, toppath, topdown, onerror, followlinks):
+def _fwalk(topfd, toppath, topdown, onerror, follow_symlinks):
 # Note: This uses O(depth of the directory tree) file descriptors: if
 # necessary, it can be adapted to only require O(1) FDs, see issue
 # #13734.
@@ -499,16 +499,16 @@
 
 for name in dirs:
 try:
-orig_st = stat(name, dir_fd=topfd, follow_symlinks=followlinks)
+orig_st = stat(name, dir_fd=topfd, 
follow_symlinks=follow_symlinks)
 dirfd = open(name, O_RDONLY, dir_fd=topfd)
 except error as err:
 if onerror is not None:
 onerror(err)
 return
 try:
-if followlinks or path.samestat(orig_st, stat(dirfd)):
+if follow_symlinks or path.samestat(orig_st, stat(dirfd)):
 dirpath = path.join(toppath, name)
-yield from _fwalk(dirfd, dirpath, topdown, onerror, 
followlinks)
+yield from _fwalk(dirfd, dirpath, topdown, onerror, 
follow_symlinks)
 finally:
 close(dirfd)
 
diff -r a1c8302e6b27 Lib/test/test_os.py
--- a/Lib/test/test_os.py   Sun Jul 01 12:24:20 2012 +0200
+++ b/Lib/test/test_os.py   Mon Jul 02 18:07:59 2012 +0300
@@ -745,10 +745,11 @@
 """
 compare with walk() results.
 """
-for topdown, followlinks in itertools.product((True, False), repeat=2):
-d = {'topdown': topdown, 'followlinks': followlinks}
-walk_kwargs.update(d)
-fwalk_kwargs.update(d)
+walk_kwargs = walk_kwargs.copy()
+fwalk_kwargs = fwalk_kwargs.copy()
+for topdown, follow_symlinks in itertools.product((True, False), 
repeat=2):
+walk_kwargs.update(topdown=topdown, followlinks=follow_symlinks)
+fwalk_kwargs.update(topdown=topdown, 
follow_symlinks=follow_symlinks)
 
 expected = {}
 for root, dirs, files in os.walk(**walk_kwargs):
@@ -774,9 +775

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

What's the urge to make parameters keyword-only?
Also, copyfile() shouldn't change signature.

--
nosy: +pitrou

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: 
http://bugs.python.org/file26232/symlinks-to-follow_symlinks-4.patch

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file26233/symlinks-to-follow_symlinks-4.patch

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> What's the urge to make parameters keyword-only?

If anyone uses these functions with a new "symlinks" parameter in 3.3b1,
he will get loud error (follow_symlinks == not symlinks).

> Also, copyfile() shouldn't change signature.

Why not?

--

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> > Also, copyfile() shouldn't change signature.

> Why not?

Seems like I have misread the docs. Apparently the symlinks parameter was added 
in 3.3.

--

___
Python tracker 

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



[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-07-02 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

This might be the only way to fix #1599254, see 
http://bugs.python.org/issue1599254#msg30590. If another program is waiting on 
the fcntl lock (and doesn't use dotlocking), as soon as mailbox.py closes the 
original file (to replace it with a new file) and releases the lock, the other 
program writes its message to the now deleted original file.

--

___
Python tracker 

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



[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Brett Cannon

Brett Cannon  added the comment:

Changeset b7463ec1980c has the fix and test update (went with a simple solution 
for the tests which uses the mock to verify). Thanks to Ronan and Marc for 
helping out!

--
dependencies:  -Split .pyc parsing from module loading
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue15210] importlib.__init__ checks for the wrong exception when looking for _frozen_importlib

2012-07-02 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 818db871d29a by Brett Cannon in branch 'default':
Issue #15210: If _frozen_importlib is not found in sys.modules by
http://hg.python.org/cpython/rev/818db871d29a

--
nosy: +python-dev

___
Python tracker 

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



[issue15210] importlib.__init__ checks for the wrong exception when looking for _frozen_importlib

2012-07-02 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon
resolution:  -> fixed
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue15056] Have imp.cache_from_source() raise NotImplementedError when cache tag not available

2012-07-02 Thread Brett Cannon

Changes by Brett Cannon :


--
dependencies: +Implement imp.get_tag() using sys.implementation

___
Python tracker 

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

See #9788 for previous discussion.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b36bed82c9d0 by Brett Cannon in branch 'default':
Issue #15166: Re-implement imp.get_tag() using sys.implementation.
http://hg.python.org/cpython/rev/b36bed82c9d0

--
nosy: +python-dev

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Brett Cannon

Brett Cannon  added the comment:

I ended up applying Eric's patch from #14797 and then comparing against Jeff's 
patch here since Eric's cleaned up the C code. Thanks to both for the work!

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

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Brett Cannon

Brett Cannon  added the comment:

I meant issue #13959 for Eric's patch; wrong tab. =)

--

___
Python tracker 

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



[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2012-07-02 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2012-07-02 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution: out of date -> wont fix

___
Python tracker 

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



[issue4011] Create DAG for PEP 101

2012-07-02 Thread Brett Cannon

Brett Cannon  added the comment:

Is this still worth doing, Georg? Or should we make Larry do it? =)

--
nosy: +larry

___
Python tracker 

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



[issue11207] Pythong seg fault with PIL/numpy

2012-07-02 Thread Brett Cannon

Changes by Brett Cannon :


--
status: pending -> closed

___
Python tracker 

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



[issue2876] Write UserDict fixer for 2to3

2012-07-02 Thread Brett Cannon

Brett Cannon  added the comment:

Closing since 2.7 is already out the door.

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

___
Python tracker 

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



[issue14070] Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True)

2012-07-02 Thread Brett Cannon

Brett Cannon  added the comment:

Never heard back from OP.

--
resolution:  -> works for me
status: pending -> closed

___
Python tracker 

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



[issue15240] ctype Structure keeps reference to function pointers

2012-07-02 Thread Vincent Pelletier

New submission from Vincent Pelletier :

When storing a ctype function pointer in a ctype structure field, a reference 
remains even when that field is overwritten with some values:
- None
- None cast into a function pointer
But the reference is somehow removed when overwriting the field with a "real" 
function pointer (a lambda in attached test case).

This causes problem when the structure is a class property and function pointer 
is created out of a method of the same class: a circular reference is created, 
which is not garbage-collected.

To run the attached test case, you need objgraph[1], and to uncomment one (or 
none) of the commented-out lines in "close" method.

[1] http://mg.pov.lt/objgraph/

--
components: ctypes
files: reproduce.py
messages: 164534
nosy: vpelletier
priority: normal
severity: normal
status: open
title: ctype Structure keeps reference to function pointers
type: behavior
versions: Python 2.6, Python 2.7, Python 3.2
Added file: http://bugs.python.org/file26234/reproduce.py

___
Python tracker 

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



[issue15214] Warn against removing elements from a list (or seq) while iterating

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Maybe there is a section in the documentation that could be enhanced to make 
readers expect this behavior?  (reference for list or tutorial)

--
nosy: +eric.araujo
title: list.startswith() and list.remove() fails to catch consecutive items in 
a list. -> Warn against removing elements from a list (or seq) while iterating

___
Python tracker 

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



[issue15240] ctype Structure keeps reference to function pointers

2012-07-02 Thread Vincent Pelletier

Vincent Pelletier  added the comment:

Trying to generate a graph on several python and several uncommented lines, I 
see that my test case is incomplete. Time to review my copy.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue15163] pydoc displays __loader__ as module data

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Attached patch does the trick.  (Also removes extra whitespace in three lines 
and groups the ignored names by topic for ease of reading.)

No test fails before or after the patch; there are some pydoc tests that check 
full text or HTML output, but apparently none that triggers the appearance of 
of __loader__ in the module data section.  If someone thinks such a test is 
needed, please complete my patch, otherwise I can commit it.

--
keywords: +patch
nosy: +eric.araujo
stage: needs patch -> patch review
Added file: http://bugs.python.org/file26235/pydoc-ignore-__loader__.diff

___
Python tracker 

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



[issue15180] Cryptic traceback from os.path.join when mixing str & bytes

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

> This strikes me as a bugfix that does not get backported because code might 
> depend on
> the bug. If the policy for exception messages, such as it is, documented 
> somewhere?

I don’t know if it’s written anywhere, but the rule I follow is that even 
though exact error messages are not specified by the Python language, they 
should not be changed in bugfix releases (I seem to remember bugs for argparse 
and tarfile where this was invoked).  The commit policy seems in flux these 
days however, with code cleanups going in stable versions (urllib and 
collections recently).

--
nosy: +eric.araujo, georg.brandl, r.david.murray

___
Python tracker 

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



[issue15163] pydoc displays __loader__ as module data

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Looks good to me.

--

___
Python tracker 

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



[issue15240] ctype Structure keeps reference to function pointers

2012-07-02 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue15180] Cryptic traceback from os.path.join when mixing str & bytes

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> If the policy for exception messages, such as it is, documented
> somewhere?

I think we are quite free to change exception messages, as long as the change 
is motivated. They are not part of the API definitions, and people shouldn't 
rely on them (the exception may for KeyError and such exceptions where the 
message is actually the value of the failed key).

--

___
Python tracker 

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



[issue15180] Cryptic traceback from os.path.join when mixing str & bytes

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Patch looks good.  Left some comments on Rietveld and +1 to Antoine’s note 
about quotes :)

--

___
Python tracker 

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



[issue15205] distutils dereferences symlinks on Mac OS X but not on Linux

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

As I said in the other bug, symlinks handling in not fully specified: some 
functions (like copy_file and copy_tree) have arguments to control 
copy/link/symlink, but the higher-level commands don’t expose that choice to 
the user.  At present I am not sure if having symlinks in a distribution makes 
sense, and if the install command (or platform-specific systems for bdists) 
supports it.  I am not sure what the correct behavior would be here.

(BTW the example you link to is not at all monkey-patching, but clean extension 
of distutils using the provided hooks. :)

--

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

AFAICT using hard links only serves to save up a little time and disk space; it 
seems to me that always copying would solve one or two bugs at a small cost 
(not so small for large projects, I don’t know).  Could this impact setup 
scripts?  Maybe if os.link were monkey-patched and expected to be called.  I 
could ask on distutils-sig.

In #15205 Ollie noted this: “distutils2 appears to always copy instead of 
hardlinking resolving all of these issues”.  That would be because d2 uses 
shutil.copytree and distutils.util.copy_file (yes, a function from distutils1 
because of some Windows issue :().

--
assignee: tarek -> eric.araujo
nosy: +lemburg, olliewalsh, pitrou
stage:  -> needs patch
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue15205] distutils dereferences symlinks on Mac OS X but not on Linux

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

(Hm OK “del os.link” is definitely a hack :)

--

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Of course the conservative fix would be to try linking as of now and do a copy 
when an exception is caught, as was proposed.

FTR python.org link to the thread mentioned: 
http://mail.python.org/pipermail/distutils-sig/2005-August/004954.html

--

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

samtygier’s patch to implement the fallback-to-copy idea looks good.  Not sure 
if an automated test would be written, but samtygier says it was manually 
tested.

--
components:  -Distutils2
keywords: +needs review
stage: needs patch -> patch review
versions:  -3rd party

___
Python tracker 

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



[issue15003] make PyNamespace_New() public

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Suggest closing or marking “remind” and see if people use / request / 
reimplement SimpleNamespace.

--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue15033] Different exit status when using -m

2012-07-02 Thread Éric Araujo

Changes by Éric Araujo :


--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

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



[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Any opposition?

--
nosy: +benjamin.peterson, georg.brandl

___
Python tracker 

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



[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Joshua: what command did you run under strace?

--

___
Python tracker 

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



[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Marc Abramowitz

Marc Abramowitz  added the comment:

Hi Brett, can I get an ack in Misc/ACKS please (to make my Mom proud :-))? 
Attaching patch.

--
Added file: http://bugs.python.org/file26236/Misc_ACKS.patch

___
Python tracker 

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



[issue14978] distutils Extension fails to be created with unicode package names

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report and patch.  Would you mind turning it into a patch for 
the CPython 2.7 repository, with a unit test?  Guidelines are in the devguide; 
if you don’t have the time I’ll take it over.

--
stage:  -> test needed

___
Python tracker 

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



[issue13943] distutils’ build_py fails when package string is unicode

2012-07-02 Thread Éric Araujo

Changes by Éric Araujo :


--
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

One small thing: this comment from import.c was not copied to sysmodule.c and 
is now deleted:

-   TAG must change for each major Python release. The magic number will take
-   care of any bytecode changes that occur during development.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This sounds reasonable. Is there any reason that this change might be 
detrimental?

--
nosy: +pitrou

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2012-07-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> AFAICT using hard links only serves to save up a little time and disk
> space; it seems to me that always copying would solve one or two bugs
> at a small cost

I agree with this.

--

___
Python tracker 

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The patch wording is fine.  However, I would avoid the "note" markup.  It is 
visually distracting and there isn't a reason to pull this out of the main text.

--

___
Python tracker 

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



[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Marc, can you please submit a contributor form?

--

___
Python tracker 

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



[issue14479] Replace transplant with graft in devguide

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

The disadvantage of graft is that by default it commits before you can run 
tests.  Recommending to run “graft --edit” would help (as long as you don’t 
close your editor you can go to the repo in another shell).

--

___
Python tracker 

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



[issue15182] find_library_file() should try to link

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Hi Jeroen, thanks for the report.  Did you run into this while building a 
distribution or did you find it just reading the code?  Distutils is in a 
special state where we only fix bugs but don’t do any improvement for the sake 
of improvements, because many setup.py scripts rely on undocumented details.

--

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Eric Snow

Eric Snow  added the comment:

Good catch.  However, do we need that comment?  The tag is programmatically 
derived from the version (in Python/sysmodule.c).

--

___
Python tracker 

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



[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Marc Abramowitz

Marc Abramowitz  added the comment:

Hi Martin,

I already did. See http://bugs.python.org/msg164162 and 
http://bugs.python.org/msg164164. Maybe it's not "on file" yet?

--

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Ah, good, if it’s automatically derived then we don’t need the comment.

--

___
Python tracker 

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



[issue15180] Cryptic traceback from os.path.join when mixing str & bytes

2012-07-02 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is definitely a motivated change ;-). I would like this re-typed as 
behavior and applied to 2.7, 3.2, and 3.3. I see the current message as being 
much like a garbled sentence in the docs that people can only understand if 
they already understand the background.

--

___
Python tracker 

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



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-07-02 Thread Axel Wegen

Changes by Axel Wegen :


--
nosy: +Axel.Wegen

___
Python tracker 

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



[issue12716] Reorganize os docs for files/dirs/fds

2012-07-02 Thread Axel Wegen

Changes by Axel Wegen :


--
nosy: +Axel.Wegen

___
Python tracker 

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



[issue4011] Create DAG for PEP 101

2012-07-02 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue15241] venv module and pyvenv script documented, but not python behavior itself

2012-07-02 Thread Éric Araujo

New submission from Éric Araujo :

I did not find any doc or test for the behavior of the interpreter in virtual 
mode, only for venv and pyvenv.

A new paragraph in site.py exists, but it’s missing from site.rst, contains 
what I think is an error (saying that sys.prefix is always the real prefix), 
and should be somewhere more obvious than the site docs or linked from 
somewhere more obvious, like the Usage and Setup docs or maybe the tutorial.

--
assignee: docs@python
components: Documentation, Tests
messages: 164563
nosy: docs@python, eric.araujo, vinay.sajip
priority: normal
severity: normal
status: open
title: venv module and pyvenv script documented, but not python behavior itself
versions: Python 3.3

___
Python tracker 

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



[issue14978] distutils Extension fails to be created with unicode package names

2012-07-02 Thread Patrick Andrew

Patrick Andrew  added the comment:

Sure, I'll have that for you shortly.

--

___
Python tracker 

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



[issue1660009] continuing problem with httplib multiple set-cookie headers

2012-07-02 Thread moijes12

Changes by moijes12 :


--
nosy: +moijes12

___
Python tracker 

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



[issue14964] distutils2.utils.resolve_name cleanup

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Closing as duplicate.  I have new tests for resolve_name (need to port them 
from p7g to d2 and upload a patch); if your patch makes them pass or if it can 
be merged with another patch that fixes the function, it’s easier to have all 
on one issue; if your patch makes the code more readable without fixing it then 
I think another patch will go in.

--

___
Python tracker 

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



[issue14964] distutils2.utils.resolve_name cleanup

2012-07-02 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file25773/resolve_name.patch

___
Python tracker 

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



[issue11664] Add patch method to unittest.TestCase

2012-07-02 Thread moijes12

Changes by moijes12 :


--
nosy: +moijes12

___
Python tracker 

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



[issue14964] distutils2.utils.resolve_name cleanup

2012-07-02 Thread Éric Araujo

Changes by Éric Araujo :


Added file: http://bugs.python.org/file25773/resolve_name.patch

___
Python tracker 

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



[issue12703] Improve error reporting for packaging.util.resolve_name

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

http://bugs.python.org/file25773/resolve_name.patch is a patch that cleans up 
the function; I’ll see if it can be used to solve our problems without having 
to follow my drastic find_object idea.

--

___
Python tracker 

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



[issue12703] Improve error reporting for packaging.util.resolve_name

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

BTW modules in the standard library all use the dotted notation AFAIK, not the 
colon notation, so I would strongly prefer avoiding the colon notation.

--

___
Python tracker 

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



[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Please keep the discussion in one place, the other bug report.

--
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11880] add a {dist-info} category to distutils2

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Did a first review on Rietveld, but I see that the patch may be outdated (it 
had no tests).

--
versions: +3rd party, Python 3.4 -Python 3.3

___
Python tracker 

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



[issue7719] distutils: ignore .nfsXXXX files

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

SilentGhost, could you submit a contributor agreement to the PSF for your 
patches?  See http://www.python.org/psf/contrib/ .  Thanks.

--

___
Python tracker 

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



[issue7719] distutils: ignore .nfsXXXX files

2012-07-02 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a56cebff113a by Éric Araujo in branch '2.7':
Ignore .nfs* files in distutils (#7719).
http://hg.python.org/cpython/rev/a56cebff113a

--
nosy: +python-dev

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2012-07-02 Thread Glenn Linderman

Glenn Linderman  added the comment:

For the win_console.patch, it seems like adding the line

self.errors='strict'

inside UnicodeOutput.__init__ resolves the problem with input causing 
exceptions.

Not sure if the sys_write_stdout.patch has the same sort of problem. Sure home 
this issue makes it into 3.3.

--

___
Python tracker 

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



[issue13512] ~/.pypirc created insecurely

2012-07-02 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f833e7ec4de1 by Éric Araujo in branch '2.7':
Create ~/.pypirc securely (#13512).
http://hg.python.org/cpython/rev/f833e7ec4de1

--
nosy: +python-dev

___
Python tracker 

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



[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Reopening for d2.  According to our rules a unit test would be required, but if 
we don’t have machinery to test upload already in place then I would just 
commit it; we definitely want to have automated tests for all commands, but it 
needn’t hold up this fix.

--
stage: committed/rejected -> commit review
status: closed -> open
versions: +3rd party

___
Python tracker 

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



[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Larry Hastings

Larry Hastings  added the comment:

> What's the urge to make parameters keyword-only?

I suggest that boolean parameters are best made keyword-only.  Otherwise you 
have mystery meat like

shutil.copyfile("src", "dst", True)

Also, all the extant uses of "follow_symlinks" in os are keyword-only, and as 
long as it's a new parameter it'd be nice to keep it consistent.

--

___
Python tracker 

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



[issue13512] ~/.pypirc created insecurely

2012-07-02 Thread Éric Araujo

Éric Araujo  added the comment:

Will port to 3.2 soon.

Release managers: there are CVE and ocert numbers for this; do we take that as 
indication that it should be fixed in security releases too or do we stand by 
our own assessment that it’s just a bugfix?

--

___
Python tracker 

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



[issue4011] Create DAG for PEP 101

2012-07-02 Thread Larry Hastings

Larry Hastings  added the comment:

Note: I don't have Macs, so I can't run OmniGiraffe.  And a quick gander at the 
Graphviz website suggests its output lacks the sublime elegance Python 
documentation has become known for.

--

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2012-07-02 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

3.3b0, Win7, 64 bit. Original test script stops at
File "C:\Programs\Python33\lib\encodings\cp437.py", line 19, in encode
  return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\x80' in position 6:

I am slightly puzzled because cp437 is an extended ascii codepage and there 
*is* a character for 0x80
https://en.wikipedia.org/wiki/Code_page_437

If I add .encode('latin1'), it does not print the pentagon for 0x7e, but does 
print \x7e to \xff.

Someone wrote elsewhere that 3.3 could use cp65001. True?

--

___
Python tracker 

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings

Larry Hastings  added the comment:

> Is it tested for?

Amusingly enough, yes.  test_order() in Lib/test/test_atexit.py already ensures 
reverse order.

--

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2012-07-02 Thread Glenn Linderman

Glenn Linderman  added the comment:

My fix for this "errors" error, might be similar to what is needed for issue 
12967, although I don't know if my fix is really correct... just that it gets 
past the error, and 'strict' is the default for TextIOWrapper.

I'm not at all sure why there is now (since 3.2) an interaction between input 
on stdin and the particulars of the output class for stdout. But I'm not at all 
an expert in Python internals or Python IO.

I'm not sure whether or not you applied the patch to your b0, if not, that is 
what I'm running, too... but using the win_console.patch as supporting code.  
The original test script didn't use the supporting code.

If you did patch your b0 bwith unicode3.py, then you shouldn't need to do a 
chcp to write any Unicode characters; someone reported that doing a chcp caused 
problems, but I don't know how to apply the patch or build a Python with it, so 
can't really test all the cases. Victor did add a cp65001 codec using a 
different issue, not sure how that is relevant here, other than for the tests 
he wrote.

--

___
Python tracker 

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings

Larry Hastings  added the comment:

> I would avoid the "note" markup.  It is visually distracting
> and there isn't a reason to pull this out of the main text.

I think it's an improvement; it helps draw the eye to an important warning.

Does anyone else have an opinion one way or another?

--

___
Python tracker 

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



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-02 Thread Eric Snow

New submission from Eric Snow :

There was some concern with PyImport_GetMagicTag() extracting its value from 
sys.implementation.cache_tag.  One solution is to have the two use a common 
underlying value.  However, that's basically what was already in import.c and 
I'd rather minimize that file at this point.

An alternative is to have the underlying value defined in a more amenable spot, 
but I'm not convinced that buys a whole lot over simply exposing the underlying 
value in PyImport_GetMagicTag().  If we could deprecate that function...

Another possibility is to move the underlying value to configure.  The 
down-side is that it's platform-specific.  I've attached a patch that does 
this.  While it may do too much as-is, it demonstrates my point.

--
components: Interpreter Core
files: cache_tag_via_configure.diff
keywords: patch
messages: 164582
nosy: amaury.forgeotdarc, brett.cannon, eric.snow
priority: normal
severity: normal
stage: patch review
status: open
title: PyImport_GetMagicTag() should use the same const char * as 
sys.implementation.cache_tag
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26237/cache_tag_via_configure.diff

___
Python tracker 

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



[issue15166] Implement imp.get_tag() using sys.implementation

2012-07-02 Thread Eric Snow

Eric Snow  added the comment:

There was some concern with PyImport_GetMagicTag() extracting its value from 
sys.implementation.cache_tag.  I've addressed this in issue15242.

--

___
Python tracker 

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