[issue12944] Accept arbitrary files for packaging's upload command

2011-10-16 Thread Mike Hoy

Changes by Mike Hoy :


--
nosy: +mikehoy

___
Python tracker 

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



[issue11638] pysetup un sdist crashes with weird trace if version is unicode by accident

2011-10-16 Thread Mike Hoy

Changes by Mike Hoy :


--
nosy: +mikehoy

___
Python tracker 

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



[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I concur with Martin and Ezio.
This report was correctly closed as invalid.

--
nosy: +rhettinger

___
Python tracker 

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2011-10-16 Thread Georg Brandl

Changes by Georg Brandl :


--
nosy: +georg.brandl

___
Python tracker 

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



[issue13191] Typo in argparse documentation

2011-10-16 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy: +eli.bendersky

___
Python tracker 

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



[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Am 17.10.2011 06:22, schrieb Phillip Feldman:
> This is a fine example of the so-called "is-ought" controversy.

Wrong. This has nothing to do with desired and factual. A bug, by
definition, is a deviation from the specification. This is not a bug,
since it exactly follows the specification.

Now you may want to challenge the specification, which makes it a
feature request. However, given that the PEP was discussed in 2001,
you are about ten years late for that.

> underlying problem is that this scheme was poorly thought out.

I object this assessment. This very behavior was carefully considered
and deliberately chosen.

> Clearly, the stripping of comments and the source decoding should both be 
> done in
> a single pass, and the source decoding should not be applied to the
> comments.

That's not clear at all. In general (i.e. for arbitrary encodings), it
is not possible to determine where the hash ("#") signs are in the input
without decoding. So you have to decode first.

In addition, it was a deliberate choice that the source encoding must be
consistent (i.e. all characters in the source must decode correctly),
even if that is not needed for parsing. This is like requiring colons
at the end of statements: they are not needed for parsing, but requiring
them improves the language.

Regards,
Martin

--

___
Python tracker 

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



[issue12619] Automatically regenerate platform-specific modules

2011-10-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

-1 on auto-building. The header needed may not be available on the build 
platform, if it is not normally needed to build Python.

--

___
Python tracker 

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



[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

In theory, with some encodings you can't even know where the line (and the 
comment) ends if you don't decode first.  Also it doesn't seem worth  to me 
changing the way files are parsed just for this use case.
Assuming you are using UTF-8 (and you should), you shouldn't have any problem 
with Python 3, since it opens files using UTF-8 by default.  It's anyway always 
better to be specific about the encoding you are using.

--
nosy: +ezio.melotti
stage:  -> committed/rejected
type:  -> behavior

___
Python tracker 

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



[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-16 Thread Phillip M. Feldman

Phillip M. Feldman  added the comment:

Hello Martin,

This is a fine example of the so-called "is-ought" controversy.  The error
message is indeed telling me exactly what the problem is, but the underlying
problem is that this scheme was poorly thought out.  Clearly, the stripping
of comments and the source decoding should both be done in a single pass,
and the source decoding should not be applied to the comments.

Phillip

On Sat, Oct 15, 2011 at 4:26 AM, Martin v. Löwis wrote:

>
> Martin v. Löwis  added the comment:
>
> The error message told you exactly what the problem is. Your source file
> does not conform to PEP 263. The PEP also explains why this applies to
> comments as well: because the entire file gets decoded according to the
> source encoding, and parsing (including determining what comments are) only
> starts afterwards.
>
> Closing the report as invalid.
>
> --
> nosy: +loewis
> resolution:  -> invalid
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--
nosy: +phillip.m.feld...@gmail.com

___
Python tracker 

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue8714] Delayed signals in the REPL on OpenBSD (possibly libpthread related)

2011-10-16 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

What is the status of this issue?

rot13 codecs & friends were added back to Python 3.2 with 
{bytes,str}.(un)transform() methods: commit 7e4833764c88. Codecs were disabled 
because of surprising error messages before the release of Python 3.2 final: 
issue #10807, commit ff1261a14573. transform() and untransform() methods were 
also removed, I don't remember why/how exactly, maybe because new codecs were 
disabled.

So we have rot13 & friends in Python 3.2 and 3.3, but they cannot be used with 
the regular str.encode('rot13'), you have to write (for example):

>>> codecs.getdecoder('rot_13')('rot13')
('ebg13', 5)
>>> codecs.getencoder('rot_13')('ebg13')
('rot13', 5)

The major issue with {bytes,str}.(un)transform() is that we have only one 
registry for all codecs, and the registry was changed in Python 3 to ensure:
 * encode: str->bytes
 * decode: bytes->str

To implement str.transform(), we need another register. Marc-Andre suggested 
(msg96374) to add tags to codecs:
"""
.encode_input_types = (str,)
.encode_output_types = (bytes,)
.decode_input_types = (bytes,)
.decode_output_types = (str,)
"""

I'm still opposed to str->str (rot13) and bytes->bytes (hex, gzip, ...) 
operations using the codecs API. Developers have to use the right module. If 
the API of these modules is too complex, we should add helpers to these 
modules, but not to builtin types. Builtin types have to be and stay simple and 
well defined.

--

___
Python tracker 

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



[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-10-16 Thread Mark Hammond

Mark Hammond  added the comment:

I pushed the changes to 2.7, 3.2 and 3.3.  I'm happy to help with 
distutils2/packaging but I'll need to do that later once I work out where to 
start :)  Therefore I'm not yet closing this issue.

--

___
Python tracker 

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



[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-10-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset fb886858024c by Mark Hammond in branch '2.7':
Issue #7833: Ext. modules built using distutils on Windows no longer get a 
manifest
http://hg.python.org/cpython/rev/fb886858024c

New changeset 9caeb7215344 by Mark Hammond in branch '3.2':
Issue #7833: Ext. modules built using distutils on Windows no longer get a 
manifest
http://hg.python.org/cpython/rev/9caeb7215344

New changeset 3073ef853647 by Mark Hammond in branch 'default':
Issue #7833: Ext. modules built using distutils on Windows no longer get a 
manifest
http://hg.python.org/cpython/rev/3073ef853647

--
nosy: +python-dev

___
Python tracker 

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



[issue12619] Automatically regenerate platform-specific modules

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

> is auto-generation wanted?

For example, Lib/plat-linux/IN.py was regenerated at Nov 23 12:09:28 2002 
(revision c2604d69aa5d) for the last time, and nobody complained. These modules 
are inconsistent. For example, the IN module contains constants of 64 bits 
platforms, whereas it can be used on 32 bits platforms.

In my opinion, we should just drop these modules with h2py.py, I (re)opened a 
thread on python-dev.

--

___
Python tracker 

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



[issue12619] Automatically regenerate platform-specific modules

2011-10-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


Added file: http://bugs.python.org/file23423/python-regenerate_platdir.patch

___
Python tracker 

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

The reason why this is a problem:

$ cat test.py
def foo():
pass


>>> import test, os, inspect
>>> os.chdir('/')
>>> inspect.getsource(test)
'def foo():\npass\n'

But

>>> import test, os, inspect
>>> os.chdir('/')
>>> inspect.getsource(test)
Traceback (most recent call last):
  File "", line 1, in 
IOError: source code not available

--
nosy: +aronacher

___
Python tracker 

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



[issue12619] Automatically regenerate platform-specific modules

2011-10-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


Removed file: http://bugs.python.org/file22726/python-regenerate_platdir.patch

___
Python tracker 

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



[issue13032] h2py.py can fail with UnicodeDecodeError

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

Using your patch, h2py.py skips all statements that cannot be decoded from 
UTF-8, whereas unpatched h2py.py accepts all statements that can be decoded 
from the locale encoding. I don't know if it is intentional to accept non-ASCII 
statements. It is maybe safer to ensure that a statement is encodable to ASCII 
using:

try:
stmt.encode('ASCII')
exec(stmt, env)
except:
...

Anyway, I would prefer to just drop this script with all Lib/plat-*/ directoes. 
I reopened this topic on python-dev (I already asked when I was working on the 
sys.platform=="linux3" issue: #12326).

--

___
Python tracker 

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

It's fairly easy to check this is still a problem:

$ ./python
Python 3.3.0a0 (default:a06ef7ab7321, Sep 22 2011, 13:41:29) 
[GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import setup
>>> setup.__file__
'setup.py'

That's a relative path rather than an absolute one. If you edit sys.path to use 
'.' instead of '', it becomes clear that the import machinery is just doing a 
blind join of the sys.path entry with the relative location of the file:

>>> del sys.modules['setup']
>>> sys.path[0] = '.'
>>> import setup
>>> setup.__file__
'./setup.py'

--
nosy: +brett.cannon, ncoghlan
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k

2011-10-16 Thread Stefan Krah

Stefan Krah  added the comment:

I temporarily changed the Fedora bot to run Fedora-14-i386. The
same failures can be observed:

==
ERROR: test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/tests/test_bdist_rpm.py",
 line 121, in test_no_optimize_flag
cmd.run()
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/command/bdist_rpm.py",
 line 365, in run
self.spawn(rpm_cmd)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/cmd.py", 
line 366, in spawn
spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", 
line 32, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", 
line 163, in _spawn_posix
% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 
1

==
ERROR: test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/tests/test_bdist_rpm.py",
 line 81, in test_quiet
cmd.run()
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/command/bdist_rpm.py",
 line 365, in run
self.spawn(rpm_cmd)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/cmd.py", 
line 366, in spawn
spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", 
line 32, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", 
line 163, in _spawn_posix
% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 
1

--
Ran 177 tests in 2.967s

--
nosy: +skrah
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue13194] zlib (de)compressobj copy() method missing on Windows

2011-10-16 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

Confirmed for 3.3. I should be able to post a patch tomorrow.

--
assignee:  -> nadeem.vawda

___
Python tracker 

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



[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 977c5753ca32 by Victor Stinner in branch '3.2':
Issue #10653: Fix time.strftime() on Windows, check for invalid format strings
http://hg.python.org/cpython/rev/977c5753ca32

--

___
Python tracker 

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



[issue13194] zlib (de)compressobj copy() method missing on Windows

2011-10-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis, nadeem.vawda
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



[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I don't think that fopen() can fails with ENOTDIR.

According to POSIX:

[ENOTDIR]
A component of the path prefix is not a directory, or the filename
argument contains at least one non-  character and ends with one
or more trailing  characters and the last pathname component
names an existing file that is neither a directory nor a symbolic link
to a directory.

http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html

--

___
Python tracker 

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



[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

> I suggest also ignoring ENOTDIR and EISDIR. Not sure about EACCES.

We should maybe mimick the io module:


>>> open('Lib')
IsADirectoryError: [Errno 21] Is a directory: 'Lib'

In the io module, opening a directory raises an exception. In the import 
machinery, an explicit check is done (stat+ISDIR) before opening the file. The 
file is ignored if it is a directory. We can maybe remove the test before 
opening the file, and handle IsADirectoryError exception instead.

--

I don't think that fopen() can fails with ENOTDIR. rmdir() can fail with 
ENOTDIR.

--

For EACCES: Python ignores currently these errors. I was already surprised by 
this behaviour. My use case: I have two users (haypo and fusil). I "installed" 
a module of haypo user into /usr/lib/python... using symlink, but fusil doesn't 
have access to /home/haypo. When fusil tries to load a module, import fails 
without any warning or error.

Fail with an error is maybe not a good idea because it's not because a 
directory of sys.path cannot be read, than the import will fail. The module can 
be found in another (accessible) directory.

--

___
Python tracker 

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



[issue11776] types.MethodType() params and usage is not documented

2011-10-16 Thread Mike Hoy

Changes by Mike Hoy :


--
nosy: +mikehoy

___
Python tracker 

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



[issue13194] zlib (de)compressobj copy() method missing on Windows

2011-10-16 Thread Simon Elén

New submission from Simon Elén :

The zlib (de)compressobj copy() method is missing on Windows.

Tested on Python 2.7.2 and 3.2.2 Windows binaries. I have not tried to build 
from source.

(In the source code I can see a check for HAVE_ZLIB_COPY. Does the Windows 
binaries statically link the included zlib source? If so, it should be new 
enough to pass that check...)

--
components: Library (Lib), Windows
messages: 145644
nosy: Simon.Elén
priority: normal
severity: normal
status: open
title: zlib (de)compressobj copy() method missing on Windows
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue13193] test_packaging and test_distutils failures under Windows

2011-10-16 Thread Antoine Pitrou

New submission from Antoine Pitrou :

http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/3593/steps/test/logs/stdio

--
assignee: tarek
components: Distutils, Distutils2, Library (Lib), Tests
messages: 145643
nosy: alexis, eric.araujo, pitrou, tarek
priority: high
severity: normal
status: open
title: test_packaging and test_distutils failures under Windows
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> _Py_fopen() returns NULL without raising an exception if fopen() fails.
> 
> Attached patch raises a OSError if fopen() if errno is different than
> ENOENT. I don't know if ENOENT is the right error number on Windows.

It seems so.

>  Should we ignore more error numbers, like EACCESS?

I suggest also ignoring ENOTDIR and EISDIR. Not sure about EACCES.

--

___
Python tracker 

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



[issue13189] New bdist_simple binary distribution format for packaging

2011-10-16 Thread Paul Moore

Paul Moore  added the comment:

New patch including some basic tests.

--
Added file: http://bugs.python.org/file23422/bdist_simple.patch

___
Python tracker 

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



[issue13189] New bdist_simple binary distribution format for packaging

2011-10-16 Thread Paul Moore

Changes by Paul Moore :


Removed file: http://bugs.python.org/file23417/bdist_simple.patch

___
Python tracker 

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



[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

_Py_fopen() returns NULL without raising an exception if fopen() fails.

Attached patch raises a OSError if fopen() if errno is different than ENOENT. I 
don't know if ENOENT is the right error number on Windows. Should we ignore 
more error numbers, like EACCESS?

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file23421/fopen_err.patch

___
Python tracker 

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



[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Not sure this is by design or not, but I wanted to report this issue (it's 
rather hard to diagnose). Here the file descriptor limit is reached, and 
"import" raises an ImportError while it would be more helpful to let the 
original OS error slip through (which, here, is EMFILE):

>>> import resource
>>> resource.setrlimit(resource.RLIMIT_NOFILE, (2, 100))
>>> import encodings.idna
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named 'idna'
>>> resource.setrlimit(resource.RLIMIT_NOFILE, (100, 100))
>>> import encodings.idna
>>>

--
components: Interpreter Core
messages: 145639
nosy: brett.cannon, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: ImportError silences low-level OS errors
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue13174] test_os failures on Fedora 15: listxattr() returns ['security.selinux']

2011-10-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 78c660a63960 by Victor Stinner in branch 'default':
Close #13174: Fix extended attributes tests in test_os for SELinux
http://hg.python.org/cpython/rev/78c660a63960

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> 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



[issue13088] Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

Antoine fixed the compilation issue.

http://hg.python.org/cpython/rev/c63087ac1f6c
changeset:   72941:c63087ac1f6c
user:Antoine Pitrou 
date:Sat Oct 15 16:38:20 2011 +0200

Fix build under Windows

--
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



[issue13191] Typo in argparse documentation

2011-10-16 Thread Mike Hoy

New submission from Mike Hoy :

In the Docs mailing list a typo was pointed out in argparse docs.

http://docs.python.org/dev/library/argparse.html#metavar

> "So, a single positional argument with dest='bar' will that argument 
> will be referred to as bar."

> "So, a single positional argument with dest='bar' WITH that argument 
> will be referred to as bar."

Eli Bendersky:

> I agree the original sentence makes little sense. But I'm not sure
> your correction fully fixes it either - "a single positional argument
> ... with that argument" doesn't sound right.

> Perhaps it should just say:

> "So, a single positional argument with dest='bar' will be referred to  > as 
> bar" ?

Patch says "So,a single positional argument with dest='bar' will be referred to 
as bar"

--
assignee: docs@python
components: Documentation
files: typo-argparse.diff
keywords: patch
messages: 145636
nosy: docs@python, mikehoy
priority: normal
severity: normal
status: open
title: Typo in argparse documentation
Added file: http://bugs.python.org/file23420/typo-argparse.diff

___
Python tracker 

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



[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread STINNER Victor

Changes by STINNER Victor :


--
status: open -> closed

___
Python tracker 

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



[issue13153] IDLE crash with unicode bigger than 0xFFFF

2011-10-16 Thread Ned Deily

Ned Deily  added the comment:

Just to be sure we're talking about the same thing here, my understanding is 
that the "missing traceback" issues referred to here are only an issue when 
IDLE is run as a stand-alone GUI program, such as can be done on Windows and 
with the OS X IDLE.app.  In that case, the standard Python tracebacks from the 
interpreter written to stderr are not readily visible to the user.  In the OS X 
IDLE.app case it does get captured in a system log. I'm not sure if that 
happens anywhere in the Windows cases.  If IDLE is started from a terminal 
window or console window where stderr is displayed, this is not an issue.

But I think further discussion about proposed improvements to IDLE diagnostics 
could be useful but it is not germane to the specific bug here.  It should be 
carried out elsewhere, possibly resulting in a feature request.

--

___
Python tracker 

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2011-10-16 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Uploaded restore_trace.py27.patch with a fix and test case for python 2.7.

--
Added file: http://bugs.python.org/file23419/restore_trace.py27.patch

___
Python tracker 

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2011-10-16 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Uploaded restore_trace_2.patch that improves the test case.

--
Added file: http://bugs.python.org/file23418/restore_trace_2.patch

___
Python tracker 

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



[issue13190] ConfigParser uses wrong newline on Windows

2011-10-16 Thread Noam Eliahu

New submission from Noam Eliahu :

ConfigParser writes data to the config file using hard-coded newline: '\n'.
This newline is not suitable for Windows. Therefore, the config file isn't 
readable in Notepad.exe.

os.linesep should be used instead.

--
components: None
messages: 145632
nosy: noam.el
priority: normal
severity: normal
status: open
title: ConfigParser uses wrong newline on Windows
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue12406] msi.py needs updating for Python 3.3

2011-10-16 Thread Vinay Sajip

Vinay Sajip  added the comment:

I also noticed that subdirectories in packaging/tests/ need to be added (e.g. 
fake_dists), otherwise packaging tests fail when run in an installed Python.

--

___
Python tracker 

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



[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-10-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Do we need to keep backward compatibility if we change the format of the 
> config 
> data? Or wininst-xx.exe are only usable with trailing config data in the .exe 
> file?

The wininst.exe belongs to the version of distutils it is released with.
So if we change both consistently, no backwards-compatibility problems
arise.

--
title: bdist_wininst depends on MBCS codec, unavailable on non-Windows -> 
bdist_wininst depends on MBCS codec,  unavailable on non-Windows

___
Python tracker 

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



[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

> Crashes on the Windows buildbots:

Oops, it should be fixed by my last commits.

--

___
Python tracker 

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



[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset e3c13a1d2595 by Victor Stinner in branch 'default':
Issue #10653: Fix time.strftime() on Windows, check for invalid format strings
http://hg.python.org/cpython/rev/e3c13a1d2595

--

___
Python tracker 

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



[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-10-16 Thread STINNER Victor

STINNER Victor  added the comment:

> The problem is that the config file is parsed using
> GetPrivateProfileString, and the result is then passed to TextOut,
> SetDlgItemText, CreateWindow, etc. all of which are defined to accept MBCS
> strings. I agree that this can't work correctly in the general case.

These functions are available with an Unicode API:

GetPrivateProfileStringW
TextOutW
SetDlgItemTextW
CreateWindowW
...

> Changing the GUI functions to operate on Unicode strings is certainly
> feasible and a good idea. The main challenge then is the format of the INI
> file. IIUC, GetPrivateProfileStringW is willing to process UTF-16 (with
> BOM) encoded INI files, but I never tested whether it actually does.

bdist_wininst creates a long Unicode string for the INI data, and then encode 
it explicitly:

if isinstance(cfgdata, str):
cfgdata = cfgdata.encode("mbcs")

So I suppose that replacing "mbcs" by "UTF-16-LE" and add the BOM should be 
enough.

> In porting wininst.exe, it seems tempting to use the TEXT family of APIs.
> I'd advise against that, and recommend to explicitly use the *W functions.

Do we need to keep backward compatibility if we change the format of the config 
data? Or wininst-xx.exe are only usable with trailing config data in the .exe 
file?

--

___
Python tracker 

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



[issue11610] Improved support for abstract base classes with descriptors

2011-10-16 Thread Darren Dale

Darren Dale  added the comment:

It would be nice if this patch could be merged in time for python-3.3...

--

___
Python tracker 

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



[issue12997] sqlite3: PRAGMA foreign_keys = ON doesn't work

2011-10-16 Thread Mark Bucciarelli

Mark Bucciarelli  added the comment:

BAD : sqlite3.sqlite_version_info = (3, 6, 12)
GOOD: sqlite3.sqlite_version_info = (3, 7, 4)
GOOD: sqlite3.sqlite_version_info = (3, 7, 8)

I guess this is the cause of the different behavior.

sqlite_version_info is the version of the underlying sqlite3 database library.

So, the sqlite3 is loading an older dynamic lib on my OSX.

--

___
Python tracker 

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



[issue12997] sqlite3: PRAGMA foreign_keys = ON doesn't work

2011-10-16 Thread poq

poq  added the comment:

sqlite3.version_info = (2, 6, 0)
sqlite3.sqlite_version_info = (3, 7, 4)
pysqlite2.version_info = (2, 6, 0)
pysqlite2.sqlite_version_info = (3, 7, 4)

--

___
Python tracker 

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



[issue1673007] urllib2 requests history + HEAD support

2011-10-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I have committed the patch accomodating the doc review comments which Ezio had 
mentioned. At the moment, the current way seems to be most backwards compatible 
one and did not want to delay it. Let's hope we get some feedback on this 
method arg. Thanks!

--

___
Python tracker 

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



[issue1673007] urllib2 requests history + HEAD support

2011-10-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0a0aafaa9bf5 by Senthil Kumaran in branch 'default':
Fix closes issue 1673007 urllib.request to support HEAD requests with a new 
method arg.
http://hg.python.org/cpython/rev/0a0aafaa9bf5

--
nosy: +python-dev
resolution:  -> fixed
stage: commit review -> 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



[issue13189] New bdist_simple binary distribution format for packaging

2011-10-16 Thread Paul Moore

New submission from Paul Moore :

The attached patch is a first version of a bdist_simple binary distribution 
format for packaging. There is a bdist_simple command to build the 
distribution, and pysetup install has been updated to handle bdist_simple 
format distributions (only as local files, there is no support for discovering 
or downloading binary distributions at this point).

The patch still needs documentation and tests, but has been manually tested on 
Windows, for both Python and C distributions.

--
assignee: tarek
components: Distutils2
files: bdist_simple.patch
keywords: patch
messages: 145621
nosy: alexis, eric.araujo, pmoore, tarek
priority: normal
severity: normal
status: open
title: New bdist_simple binary distribution format for packaging
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file23417/bdist_simple.patch

___
Python tracker 

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-16 Thread Paul Moore

Paul Moore  added the comment:

Here's a patch. It includes a test, but I don't expect the test will catch the 
issue except on Windows...

--
keywords: +patch
Added file: http://bugs.python.org/file23416/recordfix.patch

___
Python tracker 

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-16 Thread Paul Moore

Paul Moore  added the comment:

I found the problem - it's in packaging.util.write_record_file. The
file passed to csv.writer should be opened with newline=''.

--

___
Python tracker 

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



[issue13177] Avoid chained exceptions in lru_cache

2011-10-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks for the bug report and for the test case.

--

___
Python tracker 

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



[issue13177] Avoid chained exceptions in lru_cache

2011-10-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

My comment was referring to double try/except suggested by Eric.  Indeed the 
if/else might lead to a race condition, and that's a good reason to avoid LBYL 
-- even if on average calling hash() twice might be faster.
I'm happy with the fix you committed, thanks!

--

___
Python tracker 

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



[issue992389] attribute error due to circular import

2011-10-16 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue13153] IDLE crash with unicode bigger than 0xFFFF

2011-10-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

> I would consider it preferable if it quit 

Note that if we catch the error there might be no reason for IDLE to quit 
(unless the error left IDLE in some invalid state).

> with an error traceback that gave as much info as available,

That might scare newbies away.

> or if there is none, just said "IDLE has met an unexpected problem.", 

So this might be better for all the cases.

> perhaps followed by something like "Pleaee note the circumstances and
> make a report of the tracker is there is none already."

The first message could offer a "Report the problem" option that links to the 
tracker.  In theory we could also have a way to auto-fill the tracker issue, 
but that might lead to duplicates.

--

___
Python tracker 

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



[issue13177] Avoid chained exceptions in lru_cache

2011-10-16 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
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



[issue13177] Avoid chained exceptions in lru_cache

2011-10-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8365f82f8a13 by Raymond Hettinger in branch '3.2':
Issue 13177: Make tracebacks more readable by avoiding chained exceptions in 
the lru_cache.
http://hg.python.org/cpython/rev/8365f82f8a13

--
nosy: +python-dev

___
Python tracker 

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