[issue14611] inspect.getargs fails on some anonymous tuples

2012-05-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
keywords: +needs review
stage: needs patch - patch review

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



[issue9554] test_argparse.py: use new unittest features

2012-05-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Another one:

 except ArgumentParserError:
 err = sys.exc_info()[1]

This reeks of single-codebase-for-2.x-and-3.x and could probably be replaced by 
assertRaises or at least a regular except...as.

--
nosy: +eric.araujo

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



[issue14867] chm link missing from 2.7 download page

2012-05-21 Thread Nacsa Kristóf

New submission from Nacsa Kristóf anaxagra...@gmail.com:

The link `http://python.org/ftp/python/2.7.3/python273.chm` is missing from 
`http://python.org/download/releases/2.7.3/` although the checksum is listed 
and the file exists.

--
assignee: docs@python
components: Documentation, Installation, Windows
messages: 161248
nosy: Nacsa.Kristóf, docs@python
priority: normal
severity: normal
status: open
title: chm link missing from 2.7 download page
versions: Python 2.7

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



[issue14867] chm link missing from 2.7 download page

2012-05-21 Thread Nacsa Kristóf

Changes by Nacsa Kristóf anaxagra...@gmail.com:


--
components:  -Installation, Windows
type:  - enhancement

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



[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-05-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
keywords: +easy
versions: +Python 3.3 -Python 3.2

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



[issue9554] test_argparse.py: use new unittest features

2012-05-21 Thread Radu Voicilas

Radu Voicilas radu.voici...@gmail.com added the comment:

Hi Eric, Denver's patch should apply correctly from the root. Also, I've made 
the changes you mention:

try: except: assert

has been replaced by:

with self.assertRaises()

--
Added file: http://bugs.python.org/file25659/test_argparse.py.take2

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



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-21 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

A small docs update: I don't list the possible functions for onerror at  all 
anymore, as that list is likely to grow and is a PITA to maintain. People 
shouldn’t rely on a certain set of functions here.

Martin proposed 
http://mail.python.org/pipermail/python-dev/2012-May/119555.html to 
re-implement os.fwalk inside of rmdir which I’m -1 
http://mail.python.org/pipermail/python-dev/2012-May/119556.html on.

If error reporting is the only issue, I’d rather expand fwalk to supply the 
function that failed to the caller. Be it using a custom field in exceptions or 
be it using expanding its onerror.

--
nosy: +loewis
Added file: http://bugs.python.org/file25660/rmtree-with-fwalk-v3.diff

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís

New submission from Lluís llpam...@pamies.cat:

One of the problems with the logging library is that it can affect code 
performance when logging calls are over-utilized.

One possible solution would be to allow the compiler to remove logging calls 
when code is optimized with python -O by wrapping log calls with an assert:

   assert logging.debug(This is a test.)

Note that now debug(), info(), etc in the logging module always return None 
and this is not possible. An enhancement would be to make all logging calls to 
return True. In normal conditions messages would be logged without raising any 
error, but in optimized code they would never be called.

It is really easy to implement and I would be pleased to provide a patch for 
this, but I want to receive feedback from python core developers.

Thanks…

--
components: Library (Lib)
messages: 161251
nosy: Lluís
priority: normal
severity: normal
status: open
title: Allow log calls to return True for code optimization.
type: enhancement
versions: Python 3.4

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



[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Now we’re all on the same page – any opinions on the patches themselves? :)

--

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



[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

The 3.x patch looks good to me.

What comes to the 2.7 patch, there's at least the problem with fmtparam in the 
csv module (should be **fmtparams instead of [, fmtparam]). And that's were I 
stopped reviewing, so there may also be other errors. Maybe the problem(s) 
should first be fixed on a case-by-case basis and then fix the style-only 
issues with one big patch.

--

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

assert logging.debug(This is a test.) or True

--
nosy: +storchaka

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís

Lluís llpam...@pamies.cat added the comment:

storchaka, you're right, but since non of the debug(), info() etc. functions 
have a return value, it would cause no trouble and would be neater to add a 
return True. I'm not sure, but probably also more efficient.

--

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



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Martin proposed
 http://mail.python.org/pipermail/python-dev/2012-May/119555.html to
 re-implement os.fwalk inside of rmdir which I’m -1
 http://mail.python.org/pipermail/python-dev/2012-May/119556.html on.

I agree that it isn't worth the hassle.

--

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



[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread Daniel Kinzler

New submission from Daniel Kinzler dan...@brightbyte.de:

imap consideres flags to be atoms, and atoms should not be quoted. Attempting 
to use a quoted flag with e.g. STORE +FLAGS will cause some servers, like 
dovecot, to return an error.

However, imaplib apparently auto-quotes all parameters that contain a 
backslash. This applies to default flags such as \Deleted or \Seen. This 
results in an error from some IMAP servers.

The reason seems to be that _checkquote method wants to quote anything that 
matches the _mustquote pattern, and that pattern matches strings containing 
backslashes.

--
components: Extension Modules
messages: 161257
nosy: brightbyte
priority: normal
severity: normal
status: open
title: imaplib erronously quotes atoms such as flags
type: behavior
versions: Python 2.7

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



[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy: +hynek

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



[issue14469] Python 3 documentation links

2012-05-21 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

http://permalink.gmane.org/gmane.comp.python.devel/132675

--

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



[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread ドミトリ ステパヌシキン

ドミトリ ステパヌシキン angelja...@gmail.com added the comment:

I tried look as deep as I can. The result from 3.2.3 port: it fails in 
Python/getargs.c:convertsimple():line 709, error signed integer is less than 
minimum. It parses some parameters, and we have an error on last, 5th 
parameter. I really have no idea what happens here and why, knowing that same 
code works just fine under Windows.

--

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I would also, however, not be a typical Python coding pattern.  Functions 
normally return None by default.  The 'assertor True' pattern makes it 
reasonably clear what the intent is, which just having logging return True 
would not, particularly.  As for efficiency, since your are using the assert to 
improve the efficiency in -O case, the efficiency in the non -O case becomes 
less important.

I'm -1 on this suggestion (given that there is an easy way to spell what you 
want to do).  But we can let Vinay decide :)

There is also another way to spell it, by the way:

   if __debug__: 
   logger.debug('log it')

That is even clearer as to intent.  In fact, I'd be inclined to call that 
TWOWTDI (The One Obvious Way To Do It).

--
nosy: +r.david.murray, vinay.sajip

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís

Lluís llpam...@pamies.cat added the comment:

David, the problem is that if you have the logging inside a loop, the 
interpreter will have to evaluate the condition every time. With an assert you 
guarantee that *no code* is executed.

I know that we can find thousands of ways to do that, even writing a dynamic 
proxy for the Logger, and wrap the debug(), error() calls and return True, etc.

My is not telling developers to write assert logger.debug('aa') every time 
that they want to log something, but instead giving them the option to do that 
and be sure that *no code* is executed. Specially, because the return value of 
log functions is not used at all.

Thanks for the responses.

--

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



[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Interesting.  _checkquote doesn't even exist in the Python3 version of imaplib.

--
components: +email -Extension Modules
nosy: +barry, r.david.murray

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



[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d13fdd97cc8e by Hynek Schlawack in branch '3.2':
#14804: Remove [] around optional arguments with default values
http://hg.python.org/cpython/rev/d13fdd97cc8e

New changeset 2293eba03348 by Hynek Schlawack in branch 'default':
#14804: Remove [] around optional arguments with default values
http://hg.python.org/cpython/rev/2293eba03348

New changeset 8b7cb7e4ed8b by Hynek Schlawack in branch 'default':
#14804: Remove [] around optional arguments with default values
http://hg.python.org/cpython/rev/8b7cb7e4ed8b

--
nosy: +python-dev

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



[issue14870] os.utimensat's method description uses wrong notation

2012-05-21 Thread Hynek Schlawack

New submission from Hynek Schlawack h...@ox.cx:

It says:

 os.utimensat(dirfd, path[, atime=(atime_sec, atime_nsec), mtime=(mtime_sec, 
 mtime_nsec), flags=0])
 Updates the timestamps of a file with nanosecond precision. The atime and 
 mtime tuples default to None, which sets those values to the current time.

It should be the other way around: atime=None, mtime=None in the signature and 
explain in the body how they look like. It looks like atime_sec and atime_nsec 
are some magic constants this way.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 161264
nosy: docs@python, eric.araujo, ezio.melotti, georg.brandl, hynek
priority: low
severity: normal
status: open
title: os.utimensat's method description uses wrong notation
versions: Python 3.3

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



[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

I agree. I’ve committed the uncontroversial and mostly unrelated 3.x patch and 
will look at the special cases of 2.7 now.

--

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



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-21 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I don't think that doing direct flistdir/fstatat calls would be more complex. 
We already have directory walking implemented (in default_rmtree), and I think 
the fd-based calls could nicely integrate with that. I'll provide a patch.

--

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I was definitely wrong about the obvious part, then.  The 'if __debug__:' 
idiom is completely optimized away by -O, just like asserts are.  That is, in 
-O mode, there is no if test, the code block is just omitted entirely.

Having said that, though, I can't find it documented other than by the implicit 
equivalence given in the assert docs.

Hmm.  Yes, it does seem to be a CPython implementation detail.  See issue 8379. 
 Assert being removed is also an implementation detail, though (see the 
reference to the current code generator... in the assert docs).  I suppose 
that '-O' itself is a CPython implementation detail, in a sense :)

--

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



[issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation

2012-05-21 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

os.utime() uses the same notation:

   os.utime(path[, times, *, ns=(atime_ns, mtime_ns)])

--
nosy: +petri.lehtinen
title: os.utimensat's method description uses wrong notation - Descriptions of 
os.utime() and os.utimensat() use wrong notation

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



[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís

Lluís llpam...@pamies.cat added the comment:

Thanks for the explanation, I didn't know of the exact behavior of __debug__.

I close ticket.

--
resolution:  - works for me
status: open - closed

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



[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Most of the time, embedding python in this way requires precise control over 
PYTHONPATH and PYTHONHOME.  Did you try to modify them?
Something like this worked for me:
  putenv(PYTHONPATH=/path/to/python-3.2.3/Lib);
  Py_SetPythonHome(L/path/to/python-3.2.3);
I don't know whether both are needed.

--
nosy: +amaury.forgeotdarc

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



[issue13585] Add contextlib.ExitStack

2012-05-21 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 8ef66c73b1e1 by Nick Coghlan in branch 'default':
Close #13585: add contextlib.ExitStack to replace the ill-fated 
contextlib.nested API
http://hg.python.org/cpython/rev/8ef66c73b1e1

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2012-05-21 Thread Shy

Shy shoo...@gmail.com added the comment:

For some reason this patch is disabled with #ifdefs when Py_ENABLE_SHARED is 
not defined.

I'm compiling python as a static lib and have unresolved externals for both 
these functions: _Py_ActivateActCtx, _Py_DeactivateActCtx

--
nosy: +shooshx

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



[issue14136] Simplify PEP 409 command line test and move it to test_cmd_line_script

2012-05-21 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 02f13577b6fe by Nick Coghlan in branch 'default':
Close #14136 by cleaning up the PEP 409 command line test (patch by Ethan 
Furman)
http://hg.python.org/cpython/rev/02f13577b6fe

--
nosy: +python-dev
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue14862] fdopen not listed in __all__ of os.py

2012-05-21 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

 can you give me an example of how it could break working code?

This is a bit contrived, but:

# my fdopen
def fdopen(fd):
pass

fdopen(1)

# some stuff

from os import *

# more stuff

fdopen(1)

Here is a patch for 3.3 tip.  After reviewing the 'os' module documentation I 
found a few more cases.

--
keywords: +patch
Added file: http://bugs.python.org/file25661/issue14862.patch

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



[issue14036] urlparse insufficient port property validation

2012-05-21 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

I am not sure if anything should be done to this request. Saying that 
int(99,10) is converting to 
99L in Python2.7 it is a bug/security issue is 
hypothetical. Practically, such high port numbers cannot exist.

I suggest, we close this issue as won't fix. 

Ezio, I noticed that you changed from pending to open. If you had any ideas for 
this issue, please share, otherwise you can consider closing this too. 

Thanks!

--

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



[issue14036] urlparse insufficient port property validation

2012-05-21 Thread zulla

zulla d...@defendassist.com added the comment:

Your comment is completely senseless, sorry.
Of course such high port numbers do not exist.

An attacker is counting on that. Imagine something like that

pass_to_cython(urlparse(http://google.de:99**99[to be 
calculated]).port)

--

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



[issue14036] urlparse insufficient port property validation

2012-05-21 Thread zulla

zulla d...@defendassist.com added the comment:

we should at least check if the .port attribute is an intereger = 1 and = 
65535. _because_ this is the only valid port range. otherwise, it is no valid 
port. but it may be a integer overflow attack attempt

when a developer uses .port, he is counting on the result being valid

--

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



[issue14036] urlparse insufficient port property validation

2012-05-21 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

pass_to_cython(urlparse(http://google.de:99**99[to be 
calculated]).port)

is no different than sending

pass_to_cython(99**99[to be calculated])

In that case, would the former make a security loop hole in urlparse? Looks 
pretty contrived to me as an example for .port bug. 

However, I agree with one point in your assertion, namely that port be checked 
that it is within the range integer = 1 and = 65535. If it is not, return 
None as a response in port.

--

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



[issue14036] urlparse insufficient port property validation

2012-05-21 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

 Ezio, I noticed that you changed from pending to open.

That was an accident, I just meant to add my self to the nosy.
I didn't have time yet to read all the messages and comment on the issue.

--

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Andrew McNabb

Andrew McNabb amcn...@mcnabbs.org added the comment:

 Which one-line fix do you propose?

Doing a stat(/net/prodigy/tmp) before mkdir(/net/prodigy/tmp) is an 
extremely simple workaround.

Of course, I would love to see clear documentation of how the kernel is defined 
to behave in this situation. It would certainly be intuitive for 
mkdir(/net/prodigy/tmp) to force a mount of /net/prodigy, but defined 
behavior isn't always intuitive. :)

--

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



[issue14862] fdopen not listed in __all__ of os.py

2012-05-21 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Perhaps a little less contrived

from libc_wrapper import fdopen
from os import *

where libc_wrapper might be a module built on top of ctypes.

--

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



[issue14867] chm link missing from 2.7.3 download page

2012-05-21 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Thanks for the report!  The link has been added to the 2.7.3 download page.

--
nosy: +benjamin.peterson, loewis, ned.deily -docs@python
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
title: chm link missing from 2.7 download page - chm link missing from 2.7.3 
download page
type: enhancement - 

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



[issue14617] confusing docs with regard to __hash__

2012-05-21 Thread Ethan Furman

Ethan Furman et...@stoneleaf.us added the comment:

Are the changes good?  Can they be commited?

--

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Of course, I would love to see clear documentation of how the kernel  
 is defined to behave in this situation. It would certainly be  
 intuitive for mkdir(/net/prodigy/tmp) to force a mount of  
 /net/prodigy, but defined behavior isn't always intuitive. :)

Maybe I'm confused, but the presence of /net/prodigy is *not*
the issue here, and what gets mounted is *not* /net/prodigy,
but /net/prodigy/tmp (do mount to confirm or dispute).

--

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Andrew McNabb

Andrew McNabb amcn...@mcnabbs.org added the comment:

 Maybe I'm confused, but the presence of /net/prodigy is *not*
 the issue here, and what gets mounted is *not* /net/prodigy,
 but /net/prodigy/tmp (do mount to confirm or dispute).

No, /net/prodigy is the mountpoint in this case:

amcnabb@sage:~ :) mount |grep prodigy
prodigy:/ on /net/prodigy type nfs4 ([redacted])

--

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



[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-21 Thread Zachary Ware

Zachary Ware zachary.w...@gmail.com added the comment:

Ezio's version looks pretty good to me.  About the only quibble I can think of 
is the removal of the example uses; they still apply and do help the point. 
Just tacking on Classic examples of tuples include (x, y) coordinate pairs and 
database records. to the end of the paragraph would take care of that.

Also a point of grammar; do we iterate *on* a list, or do we iterate *over* a 
list?  I'm pretty sure I've seen both; 'on' does make sense to me but 'over' is 
the word my brain always seems to choose.

--

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



[issue14862] fdopen not listed in __all__ of os.py

2012-05-21 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

I found two more: P_NOWAITO and _exit. Attached an updated patch.

--
Added file: http://bugs.python.org/file25662/issue14862_v2.patch

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



[issue14844] netrc does not handle accentuated characters

2012-05-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Do you have a small script to reproduce the issue?

--
nosy: +amaury.forgeotdarc
stage:  - test needed

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



[issue14871] Rewrite the command line parsers and actions system used in distutils2

2012-05-21 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

At present distutils2/packaging uses many command line parsers:

- one parser for commands and their options implemented in the 
dist.Distribution class, inherited from distutils and based on fanncy_getopt;

- another parser for pysetup actions and options implemented in run.Dispatcher, 
also using fancy_getopt;

- a _parse_args function based on getopt (le gasp!) and used by the functions 
implementing pysetup actions.

This causes no end of bugs and maintenance issues.  The actions system could 
also be much improved; one issue is that the option parsing is not automated 
(unlike for commands) and the loading of actions is not lazy.  See 
https://groups.google.com/forum/#!topic/the-fellowship-of-the-packaging/pxOZ_j4_4yg
 for details.

My current inclination is to just use argparse everywhere, with a thin wrapper 
to preserve the current way to declare commands options, and something similar 
for actions.  Backporting argparse for 2.5, 2.6 and 3.1 won’t be hard and using 
it should buy us much.  The key thing is that the various subparsers (e.g. for 
pysetup, for the run action, for one command) should work together lazily: the 
pysetup parser should parse its options and stop at the 'run' segment, then 
pass on to the run action parser, etc.  The goal is to avoid creating all the 
parsers for actions and commands.

--
assignee: eric.araujo
components: Distutils2
messages: 161289
nosy: alexis, eric.araujo, jkloth, michael.mulich, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: Rewrite the command line parsers and actions system used in distutils2
type: enhancement
versions: 3rd party, Python 3.3

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



[issue12937] distutils2: install action should support same options as install command

2012-05-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

The command line parsers need a thorough cleanup before this can be 
implemented.  Ideally with a new, clean system the install action would just 
pass all its options to the install command and let it do option validation.

--
dependencies: +Rewrite the command line parsers and actions system used in 
distutils2
stage: needs patch - 
versions: +3rd party

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



[issue14733] Custom commands don't work

2012-05-21 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 70831fde0ec4 by Éric Araujo in branch 'default':
Have pysetup read setup.cfg early to find custom commands (#14733).
http://hg.python.org/distutils2/rev/70831fde0ec4

--
nosy: +python-dev

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



[issue13399] Don't print traceback for unrecognized actions, commands and options in packaging

2012-05-21 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 7d4098ce0087 by Éric Araujo in branch 'default':
Tighten tests for #13399
http://hg.python.org/distutils2/rev/7d4098ce0087

--

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



[issue14775] Slow unpickling of certain dictionaries in python 2.7 vs python 2.6

2012-05-21 Thread stw

stw sil...@googlemail.com added the comment:

Thanks for the nod to the pickletools module. The structure of the streams do 
change between python 2.6 and 2.7, at least for files created with cPickle. You 
can see this from the file sizes that I quoted in my previous post. Below are 
some snippets of the disassemblies of pickle files generated using make_file.py:

pickle, python 2.6 and 2.7:

0: \x80 PROTO  2
2: }EMPTY_DICT
3: qBINPUT 0
5: (MARK
6: USHORT_BINSTRING 'ArLLX'
   13: qBINPUT 1
   15: \x85 TUPLE1
   16: qBINPUT 2
   18: KBININT10
   ...

cPickle, python 2.6:

0: \x80 PROTO  2
2: }EMPTY_DICT
3: qBINPUT 1
5: (MARK
6: USHORT_BINSTRING 'XYoGB'
   13: \x85 TUPLE1
   14: qBINPUT 2
   16: KBININT10
   ...

cPickle, python 2.7:

0: \x80 PROTO  2
2: }EMPTY_DICT
3: qBINPUT 1
5: (MARK
6: USHORT_BINSTRING 'QGgRa'
   13: \x85 TUPLE1
   14: KBININT11
   ...

As you can see, pickle memoizes both the string and the tuple. cPickle2.6 just 
memoizes the tuple, while cPickle2.7 doesn't memoize either. It therefore seems 
that the problem is somehow related to the memo...

--

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



[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

There is no way to write a program in Python capable to process large/unlimited 
output coming from a subprocess stream without deadlocks.

http://docs.python.org/library/subprocess.html#subprocess.Popen.communicate
Note The data read is buffered in memory, so do not use this method if the 
data size is large or unlimited.

http://docs.python.org/library/subprocess.html#subprocess.Popen.stdin
http://docs.python.org/library/subprocess.html#subprocess.Popen.stdout
http://docs.python.org/library/subprocess.html#subprocess.Popen.stderr
Warning Use communicate() rather than .stdin.write, .stdout.read or 
.stderr.read to avoid deadlocks due to any of the other OS pipe buffers filling 
up and blocking the child process.


So, what should I use?

--
components: Library (Lib)
messages: 161294
nosy: techtonik
priority: normal
severity: normal
status: open
title: subprocess is not safe from deadlocks
versions: Python 2.7, Python 3.3

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



[issue14775] Slow unpickling of certain dictionaries in python 2.7 vs python 2.6

2012-05-21 Thread stw

stw sil...@googlemail.com added the comment:

One other thing - python 2.7 added the is_tracked function to the gc module. As 
I understand it (from issue #4074) tuples of atomic types are supposed to be 
untracked. However, in python 2.7:

 gc.is_tracked((1, 2))
True
 gc.is_tracked(hello)
True

--

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



[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2012-05-21 Thread Merlijn van Deen

Merlijn van Deen valhall...@gmail.com added the comment:

To confirm this behaviour is still current:

Python 3.3.0a1+ (default:958a98bf924e+, May 21 2012, 22:18:16)
[GCC 4.5.2] on linux
Type help, copyright, credits or license for more information.
 import ntpath
 ntpath.normcase(rc:\mixedCASE)
'c:\\mixedcase'

In general, I'm not so sure of the use case of the function /at all/ - possibly 
something like
  
if normcase(path1) == normcase(path2):
...

however, this can give the false impression that two files are the same - I 
think, given a Samba share with two files 'A' and 'a', it's possible to access 
both files from windows.

--
nosy: +valhallasw
versions: +Python 3.3, Python 3.4 -Python 2.7

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



[issue14651] pysetup run cmd can't handle option values in the setup.cfg

2012-05-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I have fixed the other bug in distutils2 (to be ported soon to packaging in 
3.3).  I wrote a test for this bug but the fix was not enough.  Need to 
investigate more.

--

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



[issue14674] Add link to RFC 4627 from json documentation

2012-05-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

A message should have been sent to pyb...@rebertia.com.

--

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



[issue14674] Link to explain deviations from RFC 4627 in json module docs

2012-05-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage: needs patch - commit review
title: Add link to RFC 4627 from json documentation - Link to  explain 
deviations from RFC 4627 in json module docs

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



[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Merlijn van Deen

New submission from Merlijn van Deen valhall...@gmail.com:

The amount of errors in the solution during the windows build was surprising to 
me - I interpreted it as if python was not built correctly. Upon further 
inspection, just some extension modules were not built due to missing 
dependencies, and the interpreter runs without problems.

To clarify this in the devguide, I suggest the attached changes.

--
components: Devguide
files: devguide_windows_build_errors_notes.patch
keywords: patch
messages: 161299
nosy: ezio.melotti, valhallasw
priority: normal
severity: normal
status: open
title: Windows devguide: clarification for build errors due to missing optional 
dependencies
Added file: 
http://bugs.python.org/file25663/devguide_windows_build_errors_notes.patch

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



[issue4033] python search path - .pth recursion

2012-05-21 Thread Matt B

Changes by Matt B mbau...@gmail.com:


--
nosy: +Matt.B

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



[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-05-21 Thread Richard West

Richard West r.h.w...@gmail.com added the comment:

I also had an ImportError on _struct module during 'make install' when building 
2.7.3 from source configured with --enable-shared. My solution, which *seems* 
to have worked, is simple:

   $ make -i install
   $ make install

My guess is that the part of the 'make install' that copies _struct.so into the 
correct place occurs AFTER a part of the 'make install' that tries to use it. 
If you tell make to ignore errors and carry on (-i), it then completes the 
installation, copies _struct.so (and everything else) into their correct 
places, and you can then do another make install without any errors!

I hope this helps someone track down a sensible fix, and in the mean-time 
provides a work-around for the rest of us.
(p.s. remember your PYTHONHOME and PYTHON_PATH should be clear before making)

--
nosy: +Richard.West

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



[issue14874] Faster charmap decoding

2012-05-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka storch...@gmail.com:

Charmap decoders are not as important as UTF decoders, but are still widely 
used. In Python 3.3 with PEP 393 they slowed down 4x. The proposed patch 
restores the performance.

Optimized only the most common case, when the decoder is specified by the UCS2 
table with length = 256. Map-based decoders translated to table-based. UCS1 
tables widened to UCS2 by adding 257th fake characters.

Benchmark results:

 3.2   3.3(vanilla)  3.3(patched)

cp1251'A'*1  111 (+10%)31 (+294%)122
cp1251'\xa0'*1   111 (+8%) 29 (+314%)120
cp1251'\u0402'*1 111 (+6%) 25 (+372%)118

--
components: Interpreter Core, Unicode
files: decode_charmap.patch
keywords: patch
messages: 161301
nosy: ezio.melotti, haypo, lemburg, pitrou, storchaka
priority: normal
severity: normal
status: open
title: Faster charmap decoding
type: performance
versions: Python 3.3
Added file: http://bugs.python.org/file25664/decode_charmap.patch

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



[issue14775] Slow unpickling of certain dictionaries in python 2.7 vs python 2.6

2012-05-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 As I understand it (from issue #4074) tuples of atomic types are supposed to 
 be untracked.

Actually, it is done lazily:

 t = 1,2
 gc.is_tracked(t)
True
 gc.collect()
0
 gc.is_tracked(t)
False

--

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



[issue14874] Faster charmap decoding

2012-05-21 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file25665/charmapdecodebench.py

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



[issue14874] Faster charmap decoding

2012-05-21 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file25666/bench-diff.py

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



[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

I think the note for communicate() just means that you might get MemoryError 
(or some other exception) if the output is too big.  But I agree it is 
ambiguous.

communicate() uses select() on Unix and threads on Windows, so deadlocks should 
not be possible.

 So, what should I use?

Use communicate() (on a machine with infinite memory;-)

--
nosy: +sbt

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



[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Sasha B

New submission from Sasha B sbermeis...@gmail.com:

If you have a look at the file 'python/Lib/json/encode.py', on line 30 it says:

# Assume this produces an infinity on all machines (probably not guaranteed)
INFINITY = float('1e6')
FLOAT_REPR = repr

Isn't float('Inf') an accepted way of doing this? Should line 31 be INFINITY = 
float('Inf')?

Sasha

--
components: Library (Lib)
messages: 161304
nosy: sbermeister
priority: normal
severity: normal
status: open
title: Unusual way of doing 'Inf' in json library
type: enhancement
versions: Python 2.7

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



[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +mark.dickinson

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



[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Ezio Melotti

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


--
assignee:  - ezio.melotti
nosy: +ezio.melotti
type: enhancement - behavior
versions: +Python 3.2, Python 3.3

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



[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-05-21 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I believe too many issues are getting confused here. Even though the symptom 
appears to be the same (a complaint about _struct not being importable), the 
causes might be completely different, as all kinds of different configure 
options, compilers, and Linux distributions are being used.

So I'm closing this issue now. If anybody is still having the issue, please 
resubmit a new bug report. Do not follow-up to this message asking that the 
issue be reopened.

--
status: open - closed

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



[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset c13066f752a8 by Ezio Melotti in branch '2.7':
#14875: Use float('inf') instead of float('1e6') in the json module.
http://hg.python.org/cpython/rev/c13066f752a8

New changeset 06f21c6e0f2b by Ezio Melotti in branch '3.2':
#14875: Use float('inf') instead of float('1e6') in the json module.
http://hg.python.org/cpython/rev/06f21c6e0f2b

New changeset f5f5db593d99 by Ezio Melotti in branch 'default':
#14875: merge with 3.2.
http://hg.python.org/cpython/rev/f5f5db593d99

--
nosy: +python-dev

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



[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed, thanks for the report!

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14875
___
___
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-05-21 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

I actually had to go back to 3.1.2 to get it to run, I guess I had never run 
with Unicode output after installing 3.2.  So it isn't an incompatibility 
between 3.2.2 and 3.2.3, but more likely a change between 3.1 and 3.2 that 
invalidates this patch and workaround.  At least it is easier to keep 3.1.x and 
3.2.x on the same system!

Terry, applications for non-programmers that want to emit Unicode on the 
console... so the IDLE shell isn't appropriate.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1602
___
___
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-05-21 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
nosy:  -brian.curtin

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



[issue14876] IDLE highlighting theme does not preview with user-selected fonts

2012-05-21 Thread Andrew McChildren

New submission from Andrew McChildren greene...@gmail.com:

When changing theme colors, preview window uses only default font

--
components: IDLE
messages: 161309
nosy: Andrew.McChildren
priority: normal
severity: normal
status: open
title: IDLE highlighting theme does not preview with user-selected fonts
type: enhancement
versions: Python 2.7

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



[issue14674] Link to explain deviations from RFC 4627 in json module docs

2012-05-21 Thread Chris Rebert

Chris Rebert pyb...@rebertia.com added the comment:

Hopefully final revision. Thanks for the quick response Éric!

Changes:
- Cover `ensure_ascii` parameter per latest review comment
- Add enhanced Character Encodings section for 2.x backport
-- Cover `encoding` parameter  restrictions
-- Cover non-implementation of encoding detection feature
- Hyperlink the JSON-RPC mention

--
Added file: http://bugs.python.org/file25667/final-json.rst.patch

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



[issue2771] Test issue

2012-05-21 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

This is a test email reply with no MIME header.

--
nosy: +r.david.murray

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



[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Daniel Swanson

Daniel Swanson popcorn.tomato.d...@gmail.com added the comment:

what sort of machine has infinite memory?

--
nosy: +weirdink13

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



[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2012-05-21 Thread Aaron Staley

New submission from Aaron Staley usaa...@gmail.com:

On a *nix system, bdist_wininst.get_exe_bytes will always return an open  
wininst-6.0.exe.

However, Windows python2.7 is compiled against msvc 9.0 and ideally would take 
an installer based on wininst-9.0.exe.  Windows-64bit needs an installer based 
on wininst-9.0-amd64.exe.

The ideal solution would be for bdist_wininst to take an option what template 
exe to be used. While I've monkey-patched things on my own, I'm not providing 
a patch as I'm not sure how the community wants to handle this (it could be 
anywhere from the exe name to tables being driven by target_version and some 
some 64bit option)

--
assignee: eric.araujo
components: Distutils
messages: 161313
nosy: Aaron.Staley, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: No option to run bdist_wininst against newer msvc versions on 
non-windows systems
versions: Python 2.7

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



[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2012-05-21 Thread Aaron Staley

Aaron Staley usaa...@gmail.com added the comment:

Sorry, minor correction: We could just rely on plat_name for 64bit.

All that is needed is for this table:


if self.target_version  2.4:
bv = 6.0
else:
bv = 7.1


to be updated to python2.7  (9.0 for python2.7)

--

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



[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

3 comments on the patch:
1) I don't think this should be mentioned in the quick start;
2) You added a link to the build_dependencies target in the build_dependencies 
section, why?
3) Hyphens in rst should be done with '--', not '-'.

--
nosy: +brian.curtin, tim.golden
stage:  - patch review
type:  - enhancement

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



[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2012-05-21 Thread Ezio Melotti

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


--
nosy: +brian.curtin, tim.golden
stage:  - needs patch
versions:  -Python 3.4

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



[issue8954] wininst regression: errors when building on linux

2012-05-21 Thread Aaron Staley

Aaron Staley usaa...@gmail.com added the comment:

I was looking over this patch (as it relates to my bug report: 
http://bugs.python.org/issue14877?@ok_message=msg%20161314%20created%3Cbr%3Eissue%2014877%20message_count%2C%20messages%20edited%20ok@template=item)
 and noticed that this line:

+if (not self.distribution.has_ext_modules() and 
+not self.distribution.has_c_libraries()):
+basename = %s.%s % (fullname, win32)

I feel it may be better to insert plat_name there if it exists. That way, users 
can create installers targeted for win-amd64.  Why is this needed for a pure 
python packages? This bug: http://bugs.python.org/issue6792

--
nosy: +Aaron.Staley

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



[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I’m also not sure of what you meant with “the *python* package”.

--
nosy: +eric.araujo

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



[issue4033] python search path - .pth recursion

2012-05-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +brett.cannon, gagenellina, gbloisi
versions: +Python 3.3 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4033
___
___
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-05-21 Thread Jeff Ramnani

Jeff Ramnani j...@jefframnani.com added the comment:

Hynek,

I would indeed like to update this patch.  I will make the updates you have 
suggested.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7719
___
___
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-05-21 Thread Jeff Ramnani

Jeff Ramnani j...@jefframnani.com added the comment:

Attached the updated patch.  I have added a .nfs file to test_prune_file_list 
in test_sdist.  I've also cleaned up the documentation to read a little better 
(IMO).

--
Added file: http://bugs.python.org/file25668/issue7719-nfs_silly_rename.patch

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



[issue14878] send statement from PEP342 is poorly documented.

2012-05-21 Thread Stephen Lacy

New submission from Stephen Lacy sl...@slacy.com:

There's reasonable documentation of the yield statement for most python 
versions under Section 6: Simple Statements, particularly 6.8 The Yield 
Statement 
(http://docs.python.org/release/2.7/reference/simple_stmts.html#the-yield-statement)

But, there's no mention of the return value of the yield statement, or that the 
send statement even exists.  It's mentioned in passing here under PEP342 New 
Generator Features 
(http://docs.python.org/whatsnew/2.5.html#pep-342-new-generator-features) but 
should be given fuller explanation and cross-linking from the yield statement 
documentation. 

It's also mentioned a bit here: 
http://docs.python.org/howto/functional.html#passing-values-into-a-generator 
but again, not under the language documentation itself.

--
assignee: docs@python
components: Documentation
messages: 161320
nosy: Stephen.Lacy, docs@python
priority: normal
severity: normal
status: open
title: send statement from PEP342 is poorly documented.
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14878
___
___
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-05-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks, will apply.

--
stage: test needed - commit review

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



[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Well if you're *certain* that the process is only using one stream, then you 
can just use read/write on that stream.

If not, it probably means you have to use either threads or select/poll.

This is a known issue with subprocess; there are a few proposals on the tracker 
about this. See issue1191964 for example.

--
nosy: +rosslagerwall

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



[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread ドミトリ ステパヌシキン

ドミトリ ステパヌシキン angelja...@gmail.com added the comment:

thank You for answer. my problem was finally solved by using build script from 
https://github.com/cobbal/python-for-iphone and patch from 
http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html

--

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



[issue14775] Dict untracking can result in quadratic dict build-up

2012-05-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Okay, found it. The problem is _PyDict_MaybeUntrack() is potentially O(n), so 
calling it in every GC collection can produce quadratic runtimes when a dict is 
building up. Attached patch (for 3.3) only calls it in the older collections. 
Not sure this should be backported to 2.7/3.2.

--
keywords: +patch
stage:  - patch review
title: Slow unpickling of certain dictionaries in python 2.7 vs python 2.6 - 
Dict untracking can result in quadratic dict build-up
versions: +Python 3.2, Python 3.3
Added file: http://bugs.python.org/file25669/dict_untrack.patch

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



[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
resolution:  - works for me
status: open - closed

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



[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

The problem with memory is more actual for machines with SSD where swap is 
usually turned off and /tmp files are located on memory disk. Hitting memory 
limit often means hard reset.

My process is pretty generic that uses all streams, and I don't know how to use 
threads/polls crossplatform way.

issue1191964 looks interesting.

--

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



[issue1191964] asynchronous Subprocess

2012-05-21 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

What is the status? What is required to get this into 3.3? See also issue14872.

--
nosy: +techtonik

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



[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The build script you mentioned seems to be for python 2.6, did you have to 
change anything beyond the version numbers to get it to build python 3.2 as 
well?

--

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