[issue13243] _Py_identifier should be _Py_IDENTIFER

2011-10-21 Thread Eric Snow

New submission from Eric Snow :

Looks like Parser/asdl_c.py did not get all the way updated when _Py_identifier 
switched over to _Py_IDENTIFER.  I've included a patch that fixes it (though 
it's relatively trivial).  With this fix I did not notice any further problems.

--
components: Interpreter Core
files: asdl.diff
keywords: patch
messages: 146159
nosy: eric.snow, loewis
priority: normal
severity: normal
status: open
title: _Py_identifier should be _Py_IDENTIFER
type: compile error
versions: Python 3.3
Added file: http://bugs.python.org/file23493/asdl.diff

___
Python tracker 

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



[issue13184] Multi-layered symlinks to python cause runtime error. sys.path is malformed.

2011-10-21 Thread Jason Howlett

Jason Howlett  added the comment:

Confirmed. The problem exists in 3.2.2 also.

--

___
Python tracker 

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



[issue13203] Doc: say id() is only useful for existing objects

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

A FAQ entry sounds good to me.

--
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> That's a fair point, but I think it actually *improves* the argument
> for better helper functions

Agreed :)

--

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

That's a fair point, but I think it actually *improves* the argument for better 
helper functions, since we can have them automatically invoke shlex.quote() on 
all of the arguments:

def _shell_format(cmd, args, kwds):
args = map(shlex.quote, args)
kwds = {k:shlex.quote(v) for k, v in kwds}
return cmd.format(*args, **kwds)

def _invoke_shell(func, cmd, args, kwds):
return func(_shell_format(cmd, args, kwds), shell=True)

def format_shell_call(cmd, *args, kwds):
return _shell_format(cmd, args, kwds)

def shell_call(cmd, *args, **kwds):
return _invoke_shell(subprocess.call, cmds, args, kwds)

def check_shell_call(cmd, *args, **kwds):
return _invoke_shell(subprocess.check_call, cmds, args, kwds)

def check_shell_output(cmd, *args, **kwds):
return _invoke_shell(subprocess.check_output, cmds, args, kwds)

--

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Yes, you have to be careful that "dirname" is legal in the shell, but
> that usually isn't a big problem in practice, because dirname came
> from a previous listdir call, or you otherwise know that it's valid to
> interpolate it into the command

I don't understand. os.listdir() doesn't escape filenames for you.

Having been bitten several times by almost-working shell commands which
would crash when one of the 1 files being processed had a space in
it (ironically, I think that was in the Python source tree with some of
the old Mac directories), I think we really don't want to publish a
function which encourages people to pass unescaped arguments to the
shell.

--

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

It's a flow thing. This idea was kicked off by the process of translating a 
large Perl script to Python and paying attention to what the translation made 
*worse*.

One of the big things it made worse was the translation of "qx" (quoted 
executable) strings. In Perl, those are almost as neat and tidy as if you were 
writing directly in the shell:

qx|ls -l $dirname|

The thought process isn't "build this command and then execute it", it's "run 
this shell command".

Yes, you have to be careful that "dirname" is legal in the shell, but that 
usually isn't a big problem in practice, because dirname came from a previous 
listdir call, or you otherwise know that it's valid to interpolate it into the 
command (and if it isn't, then the bug lies in the way 'dirname' was populated, 
not in this operation).

Now, Python's never going to have implicit string interpolation, and that's 
fine - we have explicit interpolation instead. A direct translation of the 
above to idiomatic Python 2.7 code looks like the following:

subprocess.check_output("ls -l {}".format(dirname), shell=True)

Now, if I'm doing system administration tasks (like the script I was 
translating), then I'm going to be doing that kind of thing a *lot*. I'm also 
likely to be a sysadmin rather than a programmer, so rather than going "Oh, I 
can write a helper function for this", my natural reaction is going to be "I'm 
going to use a language that doesn't get in my way so much".

This proposal is aimed directly at making Python a better language for systems 
administration by making shell invocation almost as easy as it is in Perl:

shutil.check_shell_output("ls -l {}", dirname)

Heck, if someone really wanted to, they could even do:

qx = shutil.check_shell_output
qx("ls -l {}", dirname)

However, this is also why I *don't* want these methods in subprocess - they put 
the burden on the user to think about their data as if they were writing shell 
scripts, because that data is going to get passed straight to the shell for 
execution without any additional escaping. That's a reasonable idea for a shell 
utility in shutil, it's not reasonable for a general purpose subprocess 
manipulation utility in subprocess.

--

___
Python tracker 

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



[issue13234] os.listdir breaks with literal paths

2011-10-21 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
components: +Windows
type:  -> behavior

___
Python tracker 

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



[issue13234] os.listdir breaks with literal paths

2011-10-21 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 

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



[issue13212] json library is decoding/encoding when it should not

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> HTMLParser got a strict argument and it's causing more problems than it 
> solves.

Well, HTML is a big can of worms while JSON is a rather clean format. We can 
hope that adding a strict argument to json wouldn't cause such problems.

--

___
Python tracker 

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



[issue13212] json library is decoding/encoding when it should not

2011-10-21 Thread Ezio Melotti

Changes by Ezio Melotti :


--
priority: normal -> high

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

Yep, what I was suggesting was an easier approach, but if someone is willing to 
reorganize the document, I agree that is better to start with an example that 
shows the most common use cases with the convenience functions and then 
gradually explain the convenience functions used in the example before moving 
to Popen and its intricacies.
The unittest doc for example follows the same approach, example first and then 
explanation.

--

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hum, in:

return_code = shellcmd.shell_call('ls -l {}', dirname)
listing = shellcmd.check_shell_output('ls -l {}', dirname)

...how do you know that dirname doesn't need some kind of escaping?
This is not only a security issue, but a bug. Even if security doesn't matter 
on your system, your script will still break and/or do unexpected things.

Also, I don't really understand how your recipe improves things. You're just 
saving one call to .format(). You would probably have the same saving by using 
the % operator.

--
nosy: +pitrou

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

You couldn't just move them - you'd need to change the wording of how they 
cross-link to each other, since the explanations of the convenience function 
currently assume you understand how Popen works. I'd like us to get to the 
point where you only need to understand the whole Popen swiss army knife if you 
actually want that level of flexibility.

--

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

Initially, because I was suggesting the names shadow the subprocess convenience 
functions so they *had* to live in a different namespace.

However, even after changing the names to explicitly include "shell", I'd like 
to keep them away from the general subprocess functionality - these wrappers 
are more convenient for shell operations than the subprocess ones, but it's 
that very convenience that makes them potentially dangerous in larger 
applications that may be interpolating data that untrusted users can manipulate.

Since the intended audience is system administrators working on shell-like 
operations, the shell utility module seems like an appropriate place for them. 
Both the "import shutil" and the "shell" in the names would then serve as red 
flags on a code review or security audit.

--

___
Python tracker 

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



[issue13212] json library is decoding/encoding when it should not

2011-10-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Assigning back to me (the current maintainer of the module).

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue13132] distutils sends non-RFC compliant HTTP request

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

Will close if no further input.

--
status: open -> pending

___
Python tracker 

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



[issue9968] Let cgi.FieldStorage have named uploaded file

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

I read somewhere that the fact that TemporaryFile does not expose its name is a 
security feature :/

> On this topic, I was wondering if the changes I propose have any chance of 
> landing some day in 2.7 land - dunno Python workflow precisely enough.
Only bug fixes and doc fixes go into 2.7.  This report is about a new feature, 
which has to target 3.3.

--
title: cgi.FieldStorage: Give control about the directory used for uploads -> 
Let cgi.FieldStorage have named uploaded file

___
Python tracker 

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



[issue13234] os.listdir breaks with literal paths

2011-10-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +loewis

___
Python tracker 

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



[issue13212] json library is decoding/encoding when it should not

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

>> HTMLParser got a strict argument and it's causing more problems than it 
>> solves.
> Funny, I used the strict mode to solve a parsing bug in a personal project.
See http://bugs.python.org/issue7311#msg133075 and following messages.r

--

___
Python tracker 

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



[issue13203] Doc: say id() is only useful for existing objects

2011-10-21 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue11751] Increase distutils.filelist / packaging.manifest test coverage

2011-10-21 Thread Justin Love

Justin Love  added the comment:

Still can't reproduce (though I got one failure and three other errors)

$ patch -p 1 

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



[issue13212] json library is decoding/encoding when it should not

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

> HTMLParser got a strict argument and it's causing more problems than it 
> solves.
Funny, I used the strict mode to solve a parsing bug in a personal project.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue13220] print function unable while multiprocessing.Process is being run

2011-10-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Try running without IDLE (double click, right-click run, Command Prompt window, 
or paste into interpreter window). IDLE runs code in a subprocess with stdout 
directed back to the IDLE process, so it occasionally affects otherwise legal 
and correct Python code.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue12296] Minor clarification in devguide

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

That's a bit heavy in my opinion.  I don't think it's necessary to define in 
detail what "backward-compatibile" means, it's probably enough to say that 
whatever code might be running before the patch should keep running fine even 
after.  Bug fixes can change the behavior -- but only if the current behavior 
is clearly wrong.

In addition you might want to define the meaning of "features", "bug fixes", 
and "security fixes", mention what releases accept what, say that doc fixes are 
usually fine in bug fix releases too, and possibly document the deprecation 
process.  But maybe this is getting out of the initial scope of the issue :)

--

___
Python tracker 

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



[issue13197] subprocess: move shell arguments to a separate keyword param

2011-10-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
type:  -> feature request
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



[issue13184] Multi-layered symlinks to python cause runtime error. sys.path is malformed.

2011-10-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

For the tracker, 'crash' == seqfault or equivalent, with no traceback.
Unwanted traceback is bad behavior.
Please test with 3.2 also if you can.

--
nosy: +brett.cannon, ncoghlan, terry.reedy
type: crash -> behavior

___
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-21 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue12296] Minor clarification in devguide

2011-10-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ezio's comment got me to reread the entire paragraph. I do not like it. 'Having 
you think' is wrong; 'Basically just' is unneeded; 'guaranteed' is hyperbole; 
and the paragraph is otherwise repetitive, vague, and pretty useless. For most 
issues "the core developer who eventually handles your patch will make the 
final call on whether something is acceptable" is not exactly true and misses 
the point that we have clearly defined policies that all core developers 
follow. Here is a suggested replacement that says what is actually acceptable 
for what versions.

"Second, follow our backwards-compatibility and upgrade policies. New 
parameters (whose default is the current behavior), functions, and methods may 
be accepted, but only for a future x.y version. New classes, modules, and 
syntax (including keywords) get increasingly severe scrutiny and require 
discussion on the python-dev list. Bug fixes that make behavior better match 
the documented intention are nearly always accepted for current releases. So 
are fixes for mistakes and sufficiently bad wording in the documents. Changes 
away from the current documented behavior are only occasionally accepted and 
only for future releases. Since they nearly always require at least a few 
people to update their code, they require special consideration, including a 
python-dev discussion, and a deprecation process."

--

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

See also http://mail.python.org/pipermail/python-dev/2011-September/113731.html

--

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread Ned Deily

Ned Deily  added the comment:

I believe this was a bug specific to the llvm-gcc compiler shipped with Xcode 
4.1 and possibly Xcode 4.0.  I do not have Xcode 4 on OS X 10.6 but haypo's 
test does fail with the llvm-gcc 4.2.1 that comes with Xcode 4.1 on 10.7.  Can 
you confirm exactly which compiler you are using, i.e. the complete --version 
output from the compiler used in your python build?  If you have not installed 
Xcode 4.2, one solution is to use CC=gcc-4.2 which uses the plain gcc-4.2, not 
llvm-gcc-4.2.  For 10.6, I recommend sticking with Xcode 3 if at all possible 
for the time being.

--
nosy: +ned.deily

___
Python tracker 

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



[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 329b96fe4472 by Ezio Melotti in branch 'default':
#12753: fix compilation on Windows.
http://hg.python.org/cpython/rev/329b96fe4472

--

___
Python tracker 

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



[issue13242] Crash in test_pydoc

2011-10-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue13242] Crash in test_pydoc

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hmm, it seems it's due to a 3rd party C extension:

$ ./python -c "import sqlalchemy.cprocessors"
python: Objects/object.c:65: _Py_AddToAllObjects: Assertion `(op->_ob_prev == 
((void *)0)) == (op->_ob_next == ((void *)0))' failed.

Closing as not a Python bug.

--

___
Python tracker 

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



[issue13242] Crash in test_pydoc

2011-10-21 Thread Antoine Pitrou

New submission from Antoine Pitrou :

On 2.7, I get the following crashes in test_pydoc:

==
FAIL: test_apropos_with_bad_package (test.test_pydoc.PydocImportTest)
--
Traceback (most recent call last):
  File "/home/antoine/cpython/27/Lib/test/test_pydoc.py", line 316, in 
test_apropos_with_bad_package
result = run_pydoc('nothing', '-k', PYTHONPATH=TESTFN)
  File "/home/antoine/cpython/27/Lib/test/test_pydoc.py", line 185, in run_pydoc
rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env)
  File "/home/antoine/cpython/27/Lib/test/script_helper.py", line 49, in 
assert_python_ok
return _assert_python(True, *args, **env_vars)
  File "/home/antoine/cpython/27/Lib/test/script_helper.py", line 41, in 
_assert_python
"stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is -6, stderr follows:
python: Objects/object.c:65: _Py_AddToAllObjects: Assertion `(op->_ob_prev == 
((void *)0)) == (op->_ob_next == ((void *)0))' failed.

==
FAIL: test_apropos_with_unreadable_dir (test.test_pydoc.PydocImportTest)
--
Traceback (most recent call last):
  File "/home/antoine/cpython/27/Lib/test/test_pydoc.py", line 326, in 
test_apropos_with_unreadable_dir
result = run_pydoc('nothing', '-k', PYTHONPATH=TESTFN)
  File "/home/antoine/cpython/27/Lib/test/test_pydoc.py", line 185, in run_pydoc
rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env)
  File "/home/antoine/cpython/27/Lib/test/script_helper.py", line 49, in 
assert_python_ok
return _assert_python(True, *args, **env_vars)
  File "/home/antoine/cpython/27/Lib/test/script_helper.py", line 41, in 
_assert_python
"stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is -6, stderr follows:
python: Objects/object.c:65: _Py_AddToAllObjects: Assertion `(op->_ob_prev == 
((void *)0)) == (op->_ob_next == ((void *)0))' failed.


"hg bisect" tells me the first offending revision is 45862f4ab1c5, but that 
doesn't tell much, since it's just the revision which introduced the tests.

--
components: Interpreter Core, Tests
messages: 146133
nosy: ned.deily, pitrou
priority: high
severity: normal
status: open
title: Crash in test_pydoc
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Georg, is this patch ok to you?

--
assignee: georg.brandl -> 
keywords: +patch
Added file: http://bugs.python.org/file23492/cio.patch

___
Python tracker 

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



[issue5788] datetime.timedelta is inconvenient to use...

2011-10-21 Thread Brian Quinlan

Brian Quinlan  added the comment:

You'll probably get more traction if you file a new bug.

--

___
Python tracker 

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



[issue1730114] cStringIO no longer accepts array.array objects

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c91661e0d714 by Antoine Pitrou in branch '2.7':
Add test for fix of issue #1730114.
http://hg.python.org/cpython/rev/c91661e0d714

--
nosy: +python-dev

___
Python tracker 

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



[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

I committed the patch and the buildbots seem happy.  Thanks for the report and 
the feedback!

Tom, about the problems you mentioned in msg144836, can you report it in a new 
issue or, if there are already issues about them, add a message there?

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



[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

And unsurprisingly so, since the fix was reverted in r56830 by Georg.

--

___
Python tracker 

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



[issue3244] multipart/form-data encoding

2011-10-21 Thread Ugra Dániel

Changes by Ugra Dániel :


--
nosy: +daniel.ugra

___
Python tracker 

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



[issue13140] ThreadingMixIn.daemon_threads is not honored when parent is daemon

2011-10-21 Thread Charles-François Natali

Charles-François Natali  added the comment:

"""
"""Start a new thread to process the request."""
t = threading.Thread(target = self.process_request_thread,
 args = (request, client_address))
if self.daemon_threads:
t.daemon = True
"""

If daemon_threads is false, t.daemon is not set, and the daemonic property is 
inherited from the creating thread, i.e. the server thread.
Patch attached (I don't think a test is necessary for such a trivial change).

--
keywords: +needs review, patch
nosy: +haypo, neologix
stage: needs patch -> patch review
Added file: http://bugs.python.org/file23491/socketserver_daemon.diff

___
Python tracker 

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



[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Still happens on latest 2.7:

>>> from cStringIO import StringIO
>>> sio = StringIO(u"abc")
>>> sio.getvalue()
'a\x00b\x00c\x00'

--
nosy: +pitrou
resolution: fixed -> 
stage:  -> needs patch
status: closed -> open
versions: +Python 2.7 -Python 2.5

___
Python tracker 

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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Ned Deily

Ned Deily  added the comment:

"./python.exe" is not a given on Mac OS X; that's only true if the file system 
you are building in is case-insensitive, otherwise it is "./python".  Suggest 
rewording to:

   "(you may need to use :file:`./python.exe` on Mac OS X" ...

--
nosy: +ned.deily

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

It should also work without --with-pydebug, or with a different compiler.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread STINNER Victor

STINNER Victor  added the comment:

The bug has been fixed in GCC, try a more recent version using ./configure 
CC=gccX.Y.

--

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Build
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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread STINNER Victor

STINNER Victor  added the comment:

It is a compiler bug in GCC 4.2.1 with -O3. Try to compile attached unicode.c 
program with gcc -O3. The correct result is:

$ gcc -O3 unicode.c -o unicode && ./unicode
is ascii? 0
is compact? 1
is compact ascii? 0
_PyUnicode_COMPACT_DATA: 88 vs 88
PyUnicode_DATA: 88 vs 88
explicit cast: 88 vs 88

With gcc 4.2.1 and -O3, you get "is compact ascii? 1".

--
nosy: +haypo
Added file: http://bugs.python.org/file23490/unicode.c

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread Oleg Plakhotnyuk

Oleg Plakhotnyuk  added the comment:

Oh yes.
I am building with this command line:
./configure --with-pydebug && make -j2

--

___
Python tracker 

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



[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread Oleg Plakhotnyuk

New submission from Oleg Plakhotnyuk :

Trying to build latest development revision:

localhost:repo family$ hg summary
parent: 73044:a985d733b3a3 tip
 #12753: Add support for Unicode name aliases and named sequences.
branch: default
commit: (clean)
update: (current)

Constantly getting this error:

./python.exe -SE -m sysconfig --generate-posix-vars
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Assertion failed: (compact->utf8_length == 0), function 
_PyUnicode_CheckConsistency, file Objects/unicodeobject.c, line 399.
make: *** [sysconfig] Abort trap

However, tag v3.2.2 seems to build successfully.

OS: Mac OS X 10.6.8
GCC: 4.2.1

If you have troubles reproducing this issue, feel free to ask any information I 
can provide that can help.

Thank you in advance!

--
messages: 146120
nosy: Oleg.Plakhotnyuk
priority: normal
severity: normal
status: open
title: Assertion failed in _PyUnicode_CheckConsistency during build of default 
branch on Mac OS X
type: compile error

___
Python tracker 

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



[issue10332] Multiprocessing maxtasksperchild results in hang

2011-10-21 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file21644/pool_lifetime_close.diff

___
Python tracker 

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



[issue10332] Multiprocessing maxtasksperchild results in hang

2011-10-21 Thread Charles-François Natali

Charles-François Natali  added the comment:

Here's an updated patch.
I'll open a separate issue for the thread-safety.

--
keywords: +needs review
nosy: +pitrou
stage:  -> patch review
Added file: http://bugs.python.org/file23489/pool_lifetime_close-1.diff

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Oct 21, 2011, at 07:33 PM, Antoine Pitrou wrote:

>Antoine Pitrou  added the comment:
>
>> OTOH, __future__ imports (even jokes) should never be removed.
>
>But their meaning can be altered?
>(as part of another joke if you want :)

Well, you have 6 months to work that out then. :)

--

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> OTOH, __future__ imports (even jokes) should never be removed.

But their meaning can be altered?
(as part of another joke if you want :)

--
nosy: +pitrou

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Oct 21, 2011, at 06:35 PM, Benjamin Peterson wrote:

>Benjamin Peterson  added the comment:
>
>Or perhaps we don't need joke backward compatibility? (That's nearly 3 years
>old.)

OTOH, __future__ imports (even jokes) should never be removed.

--

___
Python tracker 

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



[issue5788] datetime.timedelta is inconvenient to use...

2011-10-21 Thread Mark Dickinson

Mark Dickinson  added the comment:

What about

def total_minutes(td):
return td / datetime.timedelta(minutes=1)

?

--

___
Python tracker 

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



[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a985d733b3a3 by Ezio Melotti in branch 'default':
#12753: Add support for Unicode name aliases and named sequences.
http://hg.python.org/cpython/rev/a985d733b3a3

--
nosy: +python-dev

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Brett Cannon

Brett Cannon  added the comment:

On Fri, Oct 21, 2011 at 11:35, Benjamin Peterson  wrote:
>
> Benjamin Peterson  added the comment:
>
> Or perhaps we don't need joke backward compatibility? (That's nearly 3 years 
> old.)

Then you tell the FLUFL that you want to take his precious operator away. =)

--

___
Python tracker 

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



[issue12930] reindent.py inserts spaces in multiline literals

2011-10-21 Thread Caio Romão

Caio Romão  added the comment:

It's been a while since this got any activity. Was the provided testfile not 
enough or any issue found? Just let me know and I'll make adjustments asap.

--

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Or perhaps we don't need joke backward compatibility? (That's nearly 3 years 
old.)

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Brett Cannon

Brett Cannon  added the comment:

Probably need a comment in the Grammar file so people know why an
unused operator is in there.

--

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread STINNER Victor

STINNER Victor  added the comment:

> Computed goto are disabled (in my Python 3.3 on Linux with GCC),
> I checked by adding #error to ceval.c.

Hum, I don't understand how, but I missed the #error failure. Computed goto 
*are enabled* by default.

--

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Florent Xicluna

Florent Xicluna  added the comment:

With the #error, I can confirm that computed gotos are enabled on OS X.

About sysconfig, we may change the code to set None if the value is "undef". I 
don't know the impact.


--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -404,7 +404,7 @@
 else:
 m = undef_rx.match(line)
 if m:
-vars[m.group(1)] = 0
+vars[m.group(1)] = None
 return vars

--

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> With the #error, I can confirm that computed gotos are enabled on OS X.
> 
> About sysconfig, we may change the code to set None if the value is "undef". 
> I don't know the impact.

Actually, I think sysconfig does the right thing when it comes to all
the configure-generated HAVE_XXX variables (due to the peculiar way the
configure/pyconfig.h couple works).

It's just that USE_COMPUTED_GOTOS is a ternary variable (0/1/undefined),
so maybe we should accept as a limitation that sysconfig returns a
misleading result here.

--

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Extract of my pyconfig.h
> -
> /* Define if you want to use computed gotos in ceval.c. */
> /* #undef USE_COMPUTED_GOTOS */
> -

Ok, now read ceval.c:

#ifdef HAVE_COMPUTED_GOTOS
#ifndef USE_COMPUTED_GOTOS
#define USE_COMPUTED_GOTOS 1
#endif
#else
#if defined(USE_COMPUTED_GOTOS) && USE_COMPUTED_GOTOS
#error "Computed gotos are not supported on this compiler."
#endif
#undef USE_COMPUTED_GOTOS
#define USE_COMPUTED_GOTOS 0
#endif

--

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread STINNER Victor

STINNER Victor  added the comment:

Extract of configure.in:
-
# Check for --with-computed-gotos
AC_MSG_CHECKING(for --with-computed-gotos)
AC_ARG_WITH(computed-gotos,
AS_HELP_STRING([--with(out)-computed-gotos],
   [Use computed gotos in evaluation loop (enabled by 
default on supported compilers)]),
[
if test "$withval" = yes
then 
  AC_DEFINE(USE_COMPUTED_GOTOS, 1,
  [Define if you want to use computed gotos in ceval.c.]) 
  AC_MSG_RESULT(yes)
fi
if test "$withval" = no
then 
  AC_DEFINE(USE_COMPUTED_GOTOS, 0,
  [Define if you want to use computed gotos in ceval.c.]) 
  AC_MSG_RESULT(no)
fi
],
[AC_MSG_RESULT(no value specified)])
-

Extract of my config.log:
-
configure:13788: checking whether gcc -pthread supports computed gotos
configure:13811: gcc -pthread -o conftestconftest.c -lpthread -ldl  -lutil 
>&5
configure:13811: $? = 0
configure:13811: ./conftest
configure:13811: $? = 0
configure:13822: result: yes
configure:13832: checking for --with-computed-gotos
configure:13856: result: no value specified
-

Extract of my pyconfig.h
-
/* Define if you want to use computed gotos in ceval.c. */
/* #undef USE_COMPUTED_GOTOS */
-

Computed goto are disabled (in my Python 3.3 on Linux with GCC), I checked by 
adding #error to ceval.c.

--
nosy: +haypo

___
Python tracker 

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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

Thanks for the feedback, here's an updated patch.

--
nosy: +brian.curtin
Added file: http://bugs.python.org/file23488/issue13228-2.diff

___
Python tracker 

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



[issue13198] Remove duplicate definition of write_record_file

2011-10-21 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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> New patch that adds a few more instructions for Windows/Mac OS.  `make
> test` is UNIX-specific, so I left `./python -m test`.
> I also moved the section before the quick links, since it seems to me
> more interesting that those links (you don't usually want to start
> from the PEPs or the buildbot page).

You want at the minimum "python -m test -j3", I think (many tests don't
really use the CPU).
Your Windows instructions could be improved a bit:
- not "the project files from the PCbuild" directory, but
"PCbuild/pcbuild.sln" (there are many project files)
- not "python.exe", but "PCbuild\python_d.exe"

--

___
Python tracker 

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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

New patch that adds a few more instructions for Windows/Mac OS.  `make test` is 
UNIX-specific, so I left `./python -m test`.
I also moved the section before the quick links, since it seems to me more 
interesting that those links (you don't usually want to start from the PEPs or 
the buildbot page).

--
Added file: http://bugs.python.org/file23487/issue13228.diff

___
Python tracker 

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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You could replace "python -m test" with "make test", although it only does the 
right thing in 3.3.
Otherwise, "python -m test -j3" would be friendlier to the reader I think :)

+1 on the principle, by the way!

--
nosy: +pitrou

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> This looks like the system Python compiled by Apple. What about a
> hand-compiled Python?

Forget this. I get the same results here.

However, if you add a "#error" at the right place in ceval.c, you'll see that 
computed gotos are enabled. It seems more of a sysconfig bug or limitation. In 
pyconfig.h, I have the following:

$ \grep GOTO pyconfig.h
#define HAVE_COMPUTED_GOTOS 1
/* #undef USE_COMPUTED_GOTOS */

Which apparently sysconfig translates as USE_COMPUTED_GOTOS being equal to 0, 
which I think is wrong.

--
components: +Library (Lib) -Build
title: computed gotos not enabled? -> sysconfig gives misleading results for 
USE_COMPUTED_GOTOS
type: performance -> behavior

___
Python tracker 

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



[issue13240] computed gotos not enabled?

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

Just compiled 3.2 on Debian:

>>> sysconfig.get_config_var('USE_COMPUTED_GOTOS')
0

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12618] py_compile cannot create files in current directory

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

Sjoerd, can you paste the code that produces the bug?  It would help create a 
test.

--

___
Python tracker 

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



[issue13240] computed gotos not enabled?

2011-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> According to issue 9203 the computed gotos should be enabled by default since 
> 3.2.
> However, it is not visible from the interpreter.
> 
> Python 3.2.2 (default, Sep  7 2011, 10:55:43) 
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> >>> from sysconfig import get_config_var
> >>> get_config_var('HAVE_COMPUTED_GOTOS')
> 1
> >>> get_config_var('USE_COMPUTED_GOTOS')
> 0

This looks like the system Python compiled by Apple. What about a
hand-compiled Python?

--

___
Python tracker 

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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

> +   ``hg clone http://hg.python.org/cpython``;
> I use http://hg.python.org/cpython#default to avoid cloning the 2.x 
> branches, that’s an optimization that can save some time and space.

I think in the default case it's easier to get'em all.

> +2. run ``./configure --with-pydebug && make -j2``
> Is make -j2 harmless on single-CPU systems?  Doesn’t our make default 
> to -j0 anyway, to use all CPUs?

As far as I know, -j2 is harmless on single-CPU systems, but I don't think we 
use all the CPUs by default with a plain `make`.

> +3. :doc:`run the tests ` with ``./python -m test``;
> Is that cross-platform?  Mac OS X has python.exe for example.

These instructions are a bit UNIX/Linux-centric, because that's what most 
developers seems to use.  On Mac OS it would indeed be ./python.exe, but it 
shouldn't take long for the developers to figure that out or click on the link 
and see how it works for their OS.

If you think it's worth to expand a bit, I guess we could still do it.

--

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

>From a quick look it seems to me that only 
-   output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
+   output = check_output(["mycmd", "myarg"])

can be changed.
Most of the other example access attributes of the Popen objects, such as 
stdin/stdout. subprocess.call is already used in a few places.

Another thing that I wanted to fix for a while is the syntax highlight in these 
examples.  Using '# becomes' instead of '==>' solves the problem for most of 
the examples, except for the first two that use `...`.  Using two separate 
blocks is another option.  A table with two columns (before/after) might also 
work, but it's difficult to get it wide enough to contain both the examples 
side by side.

About moving the convenience functions first, I'm not sure it works too well.
"This module defines one class called Popen:"
could be replaced by
"This module defines a class called Popen, and the convenience functions 
call(), check_call(), and check_output():"
where the three functions and possibly 'convenience functions' link to to the 
part of the page where they are defined.

--
type: behavior -> 

___
Python tracker 

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



[issue13125] test_all_project_files() expected failure

2011-10-21 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Note that I think it's best to fix the underlying failures rather than silence 
them. ;)

--

___
Python tracker 

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



[issue12913] Add a debugging howto

2011-10-21 Thread Dave Malcolm

Dave Malcolm  added the comment:

> >> - running Python in gdb
> > This is somewhat orthogonal, but the devguide/gdb page doesn't say how to 
> > start running Python
> > in gdb (it might be obvious to people used to use gdb, but it should still 
> > be mentioned).
> If the devguide is updated, I will be content with just one line containing 
> one link in my howto.  Currently we have this wiki page: 
> http://wiki.python.org/moin/DebuggingWithGdb  I also remember a ubuntu wiki 
> page with more useful info but can’t find the bookmark.
> 
> 
> FTR, I will use these resources: 
> https://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/
>  and http://www.jeetworks.org/node/99

There's also:
http://docs.python.org/devguide/gdb.html

--
nosy: +dmalcolm

___
Python tracker 

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



[issue4733] Add a "decode to declared encoding" version of urlopen to urllib

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

I’m not sure real HTML (i.e. sent as text/html) should have an XML prolog 
honored.  For XML, there’s http://tools.ietf.org/html/rfc3023

--

___
Python tracker 

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



[issue12913] Add a debugging howto

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

[Terry]
> Binary search with print is done manually. If error not obvious from quick 
> read, in a 20 line
> function, add print around line 10. If ok there, look down and add print 
> later in function. [...]
Okay, so it’s what I thought only I didn’t had the name :)

> More time: read outline, good start.
Thanks!  I’ll publish a repo when I start writing.

[Ezio]
> Hadn’t though about coverage.  Will mention it and add a link
> to the devguide part that talks about it.

> Is devguide/coverage.html#using-coverage-py generic enough?
I had a quick look and it looks good.

> We don't have to duplicate the coverage documentation though, mentioning the 
> tool and what it
> does, provide a couple of simple example and a link to the coverage doc 
> should be enough.
Yep, I was thinking about mentioning, nothing more.

>> - running Python in gdb
> This is somewhat orthogonal, but the devguide/gdb page doesn't say how to 
> start running Python
> in gdb (it might be obvious to people used to use gdb, but it should still be 
> mentioned).
If the devguide is updated, I will be content with just one line containing one 
link in my howto.  Currently we have this wiki page: 
http://wiki.python.org/moin/DebuggingWithGdb  I also remember a ubuntu wiki 
page with more useful info but can’t find the bookmark.


FTR, I will use these resources: 
https://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/ 
and http://www.jeetworks.org/node/99

--

___
Python tracker 

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



[issue13240] computed gotos not enabled?

2011-10-21 Thread Florent Xicluna

New submission from Florent Xicluna :

According to issue 9203 the computed gotos should be enabled by default since 
3.2.
However, it is not visible from the interpreter.

Python 3.2.2 (default, Sep  7 2011, 10:55:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>>> from sysconfig import get_config_var
>>> get_config_var('HAVE_COMPUTED_GOTOS')
1
>>> get_config_var('USE_COMPUTED_GOTOS')
0

--
components: Build
messages: 146090
nosy: flox, pitrou
priority: normal
severity: normal
status: open
title: computed gotos not enabled?
type: performance
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



[issue12659] Add tests for packaging.tests.support

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

This first patch is committed!  If you have any question about the changes I 
made to your patch, feel free to ask them.  The most important change I did was 
running setUp and tearDown before and after each test method, as real unittest 
would do.

If you want to you write more tests, know that there are some things I want to 
remove or merge.  TestDistribution and create_distribution will probably be 
removed when I manage to work on my config module rewrite.

On the contrary, LoggingCatcher and EnvironRestorer won’t go away, so someone 
interested can work on testing them (LoggingCatcher: medium to hard, 
EnvironRestorer: piece of cake).

Finally, I’m not sure it’s useful to test two specific functions.  
copy_xxmodule_c is tested by running the tests in different ways (via python -m 
test, python Lib/packaging/tests/test_thing.py, ../../../python test_thing.py); 
that’s how I made sure it worked in different situations, and tests wouldn’t 
have helped.  For fixup_build_ext, we know it works because we have buildbots 
compiling Python with various options (shared on Unix, debug on Windows) and 
our tests pass, so fixup_build_ext is doing its job.

--

___
Python tracker 

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



[issue3902] Packages containing only extension modules have to contain __init__.py

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

I thought about the wording again and committed a different version.  I also 
decided not to backport to distutils; see the commit message for a rationale.  
Thanks for the help!

--
components:  -Distutils, Distutils2
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions:  -3rd party, 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



[issue13205] NameErrors in generated setup.py (codecs, split_multiline)

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

As you can see in my commit, I made more changes to the code and simplified the 
tests.  subprocess is definitely the way to test script functionality, it’s 
much cleaner than monkey-patching sys.argv; we even have higher-level helpers 
to do that in test.script_helper.

(BTW, the comment I made about mocking user input in my first reply makes no 
sense: I was confusing pysetup create and pysetup generate-setup :)  I also 
mistakenly talked about test_run when the correct file was test_util.)

--
resolution:  -> fixed
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13205] NameErrors in generated setup.py (codecs, split_multiline)

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 5949563b9f1c by Éric Araujo in branch 'default':
Fix missing imports in generated setup scripts (#13205).
http://hg.python.org/distutils2/rev/5949563b9f1c

New changeset eb845a9a00b7 by Éric Araujo in branch 'python3':
Merge fix for #13205 and other changes from default.
http://hg.python.org/distutils2/rev/eb845a9a00b7

--

___
Python tracker 

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



[issue13229] Add shutil.filter_walk

2011-10-21 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

Why not keeping these helpers in subprocess?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12659] Add tests for packaging.tests.support

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0aad55c8ff26 by Éric Araujo in branch 'default':
Add tests for packaging.tests.support (#12659).
http://hg.python.org/cpython/rev/0aad55c8ff26

--
nosy: +python-dev

___
Python tracker 

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



[issue13205] NameErrors in generated setup.py (codecs, split_multiline)

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 21c33aa2178b by Éric Araujo in branch 'default':
Fix missing imports in setup scripts generated by packaging (#13205).
http://hg.python.org/cpython/rev/21c33aa2178b

--
nosy: +python-dev

___
Python tracker 

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



[issue3902] Packages containing only extension modules have to contain __init__.py

2011-10-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f84040b11211 by Éric Araujo in branch 'default':
Document that packaging doesn’t create __init__.py files (#3902).
http://hg.python.org/cpython/rev/f84040b11211

--
nosy: +python-dev

___
Python tracker 

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



[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

+   ``hg clone http://hg.python.org/cpython``;
I use http://hg.python.org/cpython#default to avoid cloning the 2.x branches, 
that’s an optimization that can save some time and space.

+2. run ``./configure --with-pydebug && make -j2``
Is make -j2 harmless on single-CPU systems?  Doesn’t our make default to -j0 
anyway, to use all CPUs?

+3. :doc:`run the tests ` with ``./python -m test``;
Is that cross-platform?  Mac OS X has python.exe for example.

--

___
Python tracker 

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



[issue13224] Change str(class) to return only the class name

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

I would argue that the previous behavior of str(class) was undefined, or an 
implementation detail; as a new feature, my patch can break some code that 
relied on the previous behavior, but we may judge think it’s worth the cost.

BTW, doctest is inherently fragile and broken by many changes, so I’m not too 
concerned about it.

--

___
Python tracker 

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



[issue13181] pysetup install creates .pyc files but pysetup remove doesn't delete them

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

\o/

--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> distutils doesn't byte-compile .py files to __pycache__ during 
installation

___
Python tracker 

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



[issue12296] Minor clarification in devguide

2011-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

This is the wording I committed:

(This obviously does not apply to new classes or functions; new arguments 
should be optional and have default values which maintain the existing 
behavior.)

Should I push or should I delete the changeset?

--

___
Python tracker 

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



[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

Of the 3 available options (mod style, string.Template and str.format), yes, 
str.format is the best choice.

If people want the shell meaning of the braces, they can escape them by 
doubling them up in the command string.

--

___
Python tracker 

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



[issue5289] ctypes.util.find_library does not work under Solaris

2011-10-21 Thread Falk Nisius

Falk Nisius  added the comment:

Under Ubuntu 11.04 is the _findLib_gcc used and not a ldconfig method.

Why should I install a gcc only to find a dynamic library ? It seems not a well 
design. The usage of ldconfig, what is more natural at a server in the net than 
a c compiler. Perhaps it can be changed in the next version, because I can see 
that on other os th ldconfig method would be preferred.

I'm not an python programmer and have not the possibilities to make a 
regeression test, thats why I can not help.

--
nosy: +FalkNisius

___
Python tracker 

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



[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

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

Martin v. Löwis  added the comment:

LGTM

--

___
Python tracker 

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



[issue13226] Expose RTLD_* constants in the posix module

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

Martin v. Löwis  added the comment:

The patch looks fine to me. However, I don't think it meets Charles-François' 
requirement of moving the constants into an individual module. Rather than 
living in the unmanageable plat-XXX, they now live in the unmanageable 
posixmodule.c...

--
nosy: +loewis

___
Python tracker 

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



  1   2   >