[issue10344] codecs.readline doesn't care buffering=0

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Something seems wrong somewhere. First,
codecs.open(filename, mode[, encoding[, errors[, buffering]]]) 
in the doc, should be, to match the code, in the current sytle
codecs.open(filename, mode='rb', encoding=None, errors='strict', buffering=1)
The other entries below follow this style.

The Note says Files are always opened in binary mode, even if no binary mode 
was specified.. However, the code is
if encoding is not None and \
   'b' not in mode:
# Force opening of the file in binary mode
mode = mode + 'b'
so the forcing only happens when an encoding is given. Since the intent is that 
codecs.open == open when no encoding is given, I believe the Note should be 
revised rather than the code.

(buffering=1) means line buffered. However, the doc for builtin open() says 
about buffering 1 to select line buffering (only usable in text mode) So the 
default buffering is one that is not usable in the normal forced binary mode. 
Marc-Andre, can you explain this? (The doc for open() does not specify what 
happens when the buffering conflicts with the mode.)

The doc for StreamReader.readline() says size, if given, is passed as size 
argument to the stream’s readline() method.. If that were true, size would the 
max bytes to read. However, the docstring for the same in codecs.py says size, 
if given, is passed as size argument to the read() method., and that is what 
the code does. If not given, 72 is used as the default. (Why not 80?)

So, while the doc needs a minor tweak, I do not see what the OP's posted 
original result has to do with buffering. .readline does not have a fixed 
internal buffer of 72 chars that I can see. Rather, that is the default number 
of chars to read. So that is what it read, given that the file is longer than 
that.

I believe this is what Marc-Andre said, in different words, in his first post, 
in between the distraction of whether to remove open.

Santiago, yes, there is a difference between open.readline and codecs.readline. 
It will be more obvious when the codecs.readline size doc is corrected to 
specify that it is passed to read(), not readline(), and that it defaults to 72.

--
versions: +Python 3.3 -Python 3.1

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



[issue10344] codecs.StreamReader.readline doc needs fix

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

What I described is the behavior of codecs.StreamReader. However, the 
streamreader associated with a particular encoding(codec) might do differently. 
My understanding is that StreamReader is an example that a particular codec can 
use, derive from, or merely mimic the interface of.

--
title: codecs.readline doesn't care buffering=0 - codecs.StreamReader.readline 
doc needs fix

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



[issue13778] Python should invalidate all non-owned 'thread.lock' objects when forking

2012-01-13 Thread lesha

New submission from lesha pybug.20.le...@xoxy.net:

Here is a great description of the issue:

http://docs.oracle.com/cd/E19683-01/806-6867/gen-1/index.html


This enhancement proposes a way to make Python more resistant to this kind of 
deadlock.


Consider this program:


import threading
import subprocess
import time

l = threading.Lock() 

def f():
l.acquire()  
time.sleep(1)
l.release()
 
t = threading.Thread(target=f)
t.start()

def g(l):
l.acquire()
l.release() 
print 'ohai'


subprocess.Popen(['ls'], preexec_fn=lambda: g(l))



g() gets called in the forked process, which means that it's waiting on a 
*copy* of the lock, which can never get released.


This, in turn, means that the main thread will forever wait for the Popen to 
finish.



The program above incorrectly assumes that a threading lock can be shared 
across fork() parent and child.

I suspect adding such sharing is impractical, requiring OS support or excessive 
complexity. If the sharing could be had cheaply, it would be great -- programs 
like this would work as intended, but no other programs would break. 

Crazy idea: free the locks. Sadly, that is not safe! The ones that are 
currently locked by other threads might be protecting some network resource, 
and allowing the fork child to access them would result in a logical error.

However, it is always a bad idea for a fork() child to access a lock that is 
held by a thread that is not its fork() parent. That lock was locked at the 
time of the fork(), and will stay locked, because the child process will not 
get updated by the lock-holding threads.

So, it is always invalid to access that type of lock. Currently, you are 
guaranteed a deadlock.

Proposal: trying to acquire such a lock should crash the forked child with a 
nice, detailed error message (including the offending lock), rather than hang 
the entire program.

Sample steps to implement:

1) Store the process ID on each lock instance.
2) Acquire/release should crash if the lock does not belong to the current 
thread AND has a different process ID from the current one.

There are other potential implementations, such as explicitly enumerating such 
locks at the time of fork, and invalidating them.

This crash cannot be an exception in the child, because lock methods must not 
throw. However, it can and should be an exception in the fork() parent.

I think this enhancement would make it much easier to debug this kind of 
problem. It's an easy mistake to make, because preexec_fn or fork docs do not 
warn you of the danger, and locks can be acquired quite implicitly by 
innocent-looking code.

--
components: Library (Lib)
messages: 151165
nosy: lesha
priority: normal
severity: normal
status: open
title: Python should invalidate all non-owned 'thread.lock' objects when forking
type: enhancement
versions: Python 2.6, Python 2.7

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



[issue13778] Python should invalidate all non-owned 'thread.lock' objects when forking

2012-01-13 Thread lesha

lesha pybug.20.le...@xoxy.net added the comment:

Actually, I think it does not matter which thread owns the lock, it is still 
invalid to try to acquire a lock that was grabbed by the fork() parent. Why? 
Because the fork() parent cannot free the child's copy of the lock anyway, and 
it's guaranteed to be dead also.

--

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



[issue13703] Hash collision security issue

2012-01-13 Thread Zbyszek Szmek

Zbyszek Szmek zbys...@in.waw.pl added the comment:

Added some small comments in http://bugs.python.org/review/13703/show.

--

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



[issue13778] Python should invalidate all non-owned 'thread.lock' objects when forking

2012-01-13 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - Locks in python standard library should be sanitized on fork

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



[issue6721] Locks in python standard library should be sanitized on fork

2012-01-13 Thread lesha

lesha pybug.20.le...@xoxy.net added the comment:

Just wanted to say that I spent something like 8 hours debugging a subprocess + 
threading + logging deadlock on a real production system. 

I suspected one of my locks at first, but I couldn't find any. The post-fork 
code was very simple, and I didn't suspect that logging would be subject to the 
same issue.

The good news that I see a very clean solution for fixing this.

We can't free all locks across fork -- that is unsafe and mad, because the 
child might end up corrupting some shared (network) resource, for example/

However, extending RLock to provide ForkClearedRLock (this would be used by 
logging, i.e.) is quite straighforward.

The extended class would simply need to record the process ID, in which the 
lock was created, and the process ID, which is trying to acquire it.  Done!

--
nosy: +lesha

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



[issue13779] os.walk: bottom-up

2012-01-13 Thread patrick vrijlandt

New submission from patrick vrijlandt patrick.vrijla...@gmail.com:

PythonWin 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on 
win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for 
further copyright information.
 import os
 os.makedirs(g:/a/b/c)
 os.listdir(g:/a)
['b']
 for root, dirs, files in os.walk(g:/a, topdown = False):
... print(root, dirs, files, os.listdir(root))
... os.rmdir(root)
... 
g:/a\b\c [] [] []
g:/a\b ['c'] [] []
g:/a ['b'] [] []
 

From the documentation of os.walk:
If topdown is False, the triple for a directory is generated after the triples 
for all of its subdirectories (directories are generated bottom-up).

As the above example shows, the directories are generated in the correct order, 
generated referring to yield from generator os.walk. However, the generated 
(files? and) dirs do not necessarily reflect the current situation as produced 
by os.listdir.

Therefore, this does not clear the entire directory tree as I would expect.

 os.makedirs(g:/a/b/c)
 for root, dirs, files in os.walk(g:/a, topdown = False):
... print(root, dirs, files, os.listdir(root))  
... if not (files + dirs):
... os.rmdir(root)
... 
g:/a\b\c [] [] []
g:/a\b ['c'] [] []
g:/a ['b'] [] ['b']

I think that at least the documentation should be more clear on this issue. I 
would like even better, if files + dirs would match os.listdir on the moment 
they are generated (=yielded).

--
assignee: docs@python
components: Documentation
messages: 151169
nosy: docs@python, patrick.vrijlandt
priority: normal
severity: normal
status: open
title: os.walk: bottom-up
type: behavior
versions: Python 3.2

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



[issue11682] PEP 380 reference implementation for 3.3

2012-01-13 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Committed for 3.3: http://hg.python.org/cpython/rev/d64ac9ab4cd0

Thanks to Greg for the initial effort on the PEP and reference implementation 
and to all involved in updating the original patch for 3.3 and getting the 
tests and documentation to an acceptable state.

Any issues discovered after this can be given a new tracker entry :)

--
components: +Interpreter Core
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement

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



[issue13780] make YieldFrom its own node

2012-01-13 Thread Benjamin Peterson

New submission from Benjamin Peterson benja...@python.org:

As promised in a review a while ago of PEP 380.

--
files: yieldfromnode.patch
keywords: patch
messages: 151172
nosy: benjamin.peterson, ncoghlan
priority: normal
severity: normal
status: open
title: make YieldFrom its own node
Added file: http://bugs.python.org/file24227/yieldfromnode.patch

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



[issue12409] Moving Documenting Python to Devguide

2012-01-13 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

We'll probably have to redirect all /documenting in Apache anyway.

--

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



[issue13765] Distutils does not put quotes around paths that contain spaces when compiling with MSVC

2012-01-13 Thread Almar Klein

Almar Klein almar.kl...@gmail.com added the comment:

Ok, I went to prepare a minimal example that does not use Cython nor Numpy. And 
then the problem was gone. Even more so, my fix would cause a problem, because 
somewhere quotes are placed around the entire command:

...link.exe /DLL /LIBPATH:C:\Program Files (x86)\python32\libs etc.

This somewhere is in spawn(), which calls nt_quote_args().

So I went on to search for the cause in Cython, and after that in Numpy. I have 
no traced it to Numpy, because it does NOT use the nt_quote_args() function of 
distutils.

So I think we can close the issue. I will open an issue at numpy.

--

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



[issue13765] Distutils does not put quotes around paths that contain spaces when compiling with MSVC

2012-01-13 Thread Éric Araujo

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

OK, thanks.  Please add a link to the Numpy or Cython bug report here.

--
assignee: tarek - eric.araujo
resolution:  - invalid
stage: patch review - committed/rejected
status: open - closed

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



[issue13765] Distutils does not put quotes around paths that contain spaces when compiling with MSVC

2012-01-13 Thread Almar Klein

Almar Klein almar.kl...@gmail.com added the comment:

This issue is posted at http://projects.scipy.org/numpy/ticket/2018

--
resolution: invalid - 
status: closed - open

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



[issue13765] Distutils does not put quotes around paths that contain spaces when compiling with MSVC

2012-01-13 Thread Éric Araujo

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


--
resolution:  - invalid
status: open - closed

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



[issue11682] PEP 380 reference implementation for 3.3

2012-01-13 Thread Éric Araujo

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

Kudos!

--

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



[issue13473] Add tests for files byte-compiled by distutils[2]

2012-01-13 Thread Éric Araujo

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

Nick, would you have a bit of time to read my OP and reply?

--

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



[issue13764] Misc/build.sh is outdated... talks about svn

2012-01-13 Thread Antoine Pitrou

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

I think the script was used by the period regression test crontask that used 
to send emails to python-checkins. The crontask is offline and the script 
probably hasn't been used by anyone else, so we could indeed remove it.

--
components: +Demos and Tools -Build
nosy: +brett.cannon, nnorwitz, pitrou
priority: normal - low
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue13645] import machinery vulnerable to timestamp collisions

2012-01-13 Thread Antoine Pitrou

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

 One is possibly deprecating path_mtime() so people don't waste time
 implementing it (we actually never need to remove it thanks to the
 ABC; otherwise we need to make sure the docs strongly state to only
 bother with path_stats()).

Ok, I saw I also forgot to update some importlib docs.

 The other is to say the mtime key should contain a value that is a
 real number (ie. float and any other numeric type that can cast to an
 integer).

Ok.

 And is there any efficient way to get the stat info on a file AND its
 contents in a single call?

I don't think so.  os.fstat() on an open fd looks minimally faster than
os.stat() on the filename (0.5µs faster here on Linux), but opening the
file has its own cost.

--

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



[issue12415] Missing: How to checkout the Doc sources

2012-01-13 Thread Éric Araujo

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


--
dependencies: +Moving Documenting Python to Devguide

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



[issue12409] Moving Documenting Python to Devguide

2012-01-13 Thread Éric Araujo

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

About the devguide patch:

a) The part about C roles and directives should probably mention version 
specifics (:cmacro: for 2.7, :c:macro: for 3.x) — unless you make this bug 
dependent on updating Sphinx to 1.0 for 2.7 and then all versions use new-style 
:c:.

b) You probably want to use ref:documenting instead of :doc:documenting (we 
always use ref)

Not related to your patch, but it made me think about them so I’m just putting 
it out there for comments: Not sure we should keep the reST basics or just 
redirect to docutils and Sphinx docs.  Likewise, maybe it’s time to stop 
mentioning the old Latex-based docs.  (A nit: there are a few instances of 
`markup` that should be :file:`etc` or ``code``.)

About the cpython patch: You could just have said “rm Doc/documenting” :)  
Georg, will you be the one to set up the docs.python.org redirects?

--

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



[issue13447] Add tests for some scripts in Tools/scripts

2012-01-13 Thread Éric Araujo

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


--
title: Add tests for Tools/scripts/reindent.py - Add tests for some scripts in 
Tools/scripts

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



[issue1475523] gettext breaks on plural-forms header

2012-01-13 Thread Éric Araujo

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


--
dependencies: +Add tests for some scripts in Tools/scripts

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



[issue1475523] gettext breaks on plural-forms header

2012-01-13 Thread Éric Araujo

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


--
dependencies:  -Add tests for some scripts in Tools/scripts

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



[issue12409] Moving Documenting Python to Devguide

2012-01-13 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Hi Éric,
thanks for the review.

On Fri, Jan 13, 2012 at 18:13, Éric Araujo rep...@bugs.python.org wrote:

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

 About the devguide patch:

 a) The part about C roles and directives should probably mention version 
 specifics (:cmacro: for 2.7, :c:macro: for 3.x) — unless you make this bug 
 dependent on updating Sphinx to 1.0 for 2.7 and then all versions use 
 new-style :c:.

yeah, I'd love to not write both rules/directives formats to later
revert this addition, so ok, let's make this bug depending on the
migration to sphinx 1.0 of the 2.7 version. I've sent a follow-up of
that task to python-dev some days ago, and comments (and help!) would
be welcome there too.

 b) You probably want to use ref:documenting instead of :doc:documenting (we 
 always use ref)

ah ok, I just used the same role that was there; updated to use :ref:
- fixed that (just pushed on my repo, not updated patch yet)

 Not related to your patch, but it made me think about them so I’m just 
 putting it out there for comments: Not sure we should keep the reST basics or 
 just redirect to docutils and Sphinx docs.

as a matter of personal taste, I like small lists of commonly used
commands/roles/directives/whatever in the doc, with additional links
as needed, this give a quick idea (that's usually enough) on what to
do but also the possibility for further digging (if one wants it).

 Likewise, maybe it’s time to stop mentioning the old Latex-based docs.

we can do that, but maybe at a later step? so now just put the doc in
the canonical place, later let's refactor it, removing dead parts and
so on? i'm fine anyhow

  (A nit: there are a few instances of `markup` that should be :file:`etc` or 
 ``code``.)

I'll fix them in the mean time.

 About the cpython patch: You could just have said “rm Doc/documenting” :)

eheh, well but a tiny tiny part remains :) if we go for a redirect to
the devguide, I'm all for removing all that section from the doc; I
left it there in case someone still refers directly to documenting/ or
so (but indeed, all the sub-pages are no more reachable).

 Georg, will you be the one to set up the docs.python.org redirects?

I can provide the configuration, but I don't have access to the
machine, so some admins must be there as well.

Cheers,
Sandro

--

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



[issue13645] import machinery vulnerable to timestamp collisions

2012-01-13 Thread Roundup Robot

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

New changeset 87331661042b by Antoine Pitrou in branch 'default':
Issue #13645: pyc files now contain the size of the corresponding source
http://hg.python.org/cpython/rev/87331661042b

--

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



[issue13645] import machinery vulnerable to timestamp collisions

2012-01-13 Thread Antoine Pitrou

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

Now pushed in. Thanks for the reviews!

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

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



[issue13764] Misc/build.sh is outdated... talks about svn

2012-01-13 Thread Neal Norwitz

Neal Norwitz nnorw...@gmail.com added the comment:

If this script isn't used any more, it should be removed.

On Fri, Jan 13, 2012 at 8:31 AM, Antoine Pitrou rep...@bugs.python.orgwrote:


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

 I think the script was used by the period regression test crontask that
 used to send emails to python-checkins. The crontask is offline and the
 script probably hasn't been used by anyone else, so we could indeed remove
 it.

 --
 components: +Demos and Tools -Build
 nosy: +brett.cannon, nnorwitz, pitrou
 priority: normal - low
 versions: +Python 2.7, Python 3.2, Python 3.3

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue13764
 ___


--

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



[issue13728] Description of -m and -c cli options wrong?

2012-01-13 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Ah indeed, I could have looked at sys.path doc myself after all.. sorry for the 
noise.

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

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



[issue13761] Add flush keyword to print()

2012-01-13 Thread Roundup Robot

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

New changeset 3120a988a1a3 by Georg Brandl in branch 'default':
Closes #13761: add a flush keyword argument to print().
http://hg.python.org/cpython/rev/3120a988a1a3

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

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



[issue13764] Misc/build.sh is outdated... talks about svn

2012-01-13 Thread Roundup Robot

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

New changeset f36c6f5f9d61 by Antoine Pitrou in branch '3.2':
Issue #13764: remove outdated script Misc/build.sh
http://hg.python.org/cpython/rev/f36c6f5f9d61

New changeset 609482c6710e by Antoine Pitrou in branch 'default':
Issue #13764: remove outdated script Misc/build.sh
http://hg.python.org/cpython/rev/609482c6710e

New changeset 7fcfbaad75ee by Antoine Pitrou in branch '2.7':
Issue #13764: remove outdated script Misc/build.sh
http://hg.python.org/cpython/rev/7fcfbaad75ee

--
nosy: +python-dev

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



[issue13764] Misc/build.sh is outdated... talks about svn

2012-01-13 Thread Antoine Pitrou

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

Removed then, thank you.

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

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



[issue13746] ast.Tuple's have an inconsistent col_offset value

2012-01-13 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

This is because the parentheses don't really belong to the tuple literal.

You could just as well write

b = 1, 3.14, 'abc', u'XYZ'

In other cases, the parentheses may be needed for grouping purposes (e.g. in 
function calls), but they still are only for grouping, just as in (a + b) * c.

For the empty tuple, where the parentheses actually are part of the literal, 
the col_offset is correct.

--
nosy: +georg.brandl
resolution:  - invalid
status: open - closed

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



[issue2124] xml.sax and xml.dom fetch DTDs by default

2012-01-13 Thread Brian Visel

Brian Visel aeon.descrip...@gmail.com added the comment:

..still an issue.

--
nosy: +Brian.Visel

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



[issue13737] bugs.python.org/review's Django settings file DEBUG=True

2012-01-13 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

While the actual code may be accessible to everyone, the server configuration 
(paths etc. -- just look at the page; at least the session secret key and 
passwords are masked by Django) are not, and exposing that can be a security 
problem as well.  And while I agree that this possibility appears remote, just 
look at the current discussion about hashing attacks.  Running in debug mode 
also simply looks bad to just about every web programmer, which explains this 
bug report.

Lastly, setting DEBUG to true also has other consequences, like the possibility 
to leak memory for long-running processes, as explained here: 
https://docs.djangoproject.com/en/1.3/faq/models/

--
nosy: +georg.brandl

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



[issue13753] str.join description contains an incorrect reference to argument

2012-01-13 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

You put '*' instead of '#' in the commit message.

Also, I don't think you should close more than one issue in one commit.

--
nosy: +georg.brandl

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



[issue13768] Doc/tools/dailybuild.py available only on 2.7 branch

2012-01-13 Thread Georg Brandl

New submission from Georg Brandl ge...@python.org:

Why is that a concern?  It is not needed for the doc build and intended to be 
used on python.org only.

--
nosy: +georg.brandl
resolution:  - wont fix
status: open - closed

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-01-13 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee: georg.brandl - 

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



[issue2124] xml.sax and xml.dom fetch DTDs by default

2012-01-13 Thread Martin v . Löwis

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

And my position still remains the same: this is not a bug. Applications 
affected by this need to use the APIs that are in place precisely to deal with 
this issue.

So I propose to close this report as invalid.

--

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



[issue2124] xml.sax and xml.dom fetch DTDs by default

2012-01-13 Thread Brian Visel

Brian Visel aeon.descrip...@gmail.com added the comment:

Of course, you can do as you like.

http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/

--

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



[issue2124] xml.sax and xml.dom fetch DTDs by default

2012-01-13 Thread Martin v . Löwis

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

Well, the issue is clearly underspecified, and different people read different 
things into it. I take your citation of the W3C blog entry that you are asking 
that caching should be employed. I read the issue entirely different, namely 
that by default no attempt to download the DTD should be made, or that the DOM 
loaders should provide better customization in that matter, or that catalogs 
shall be used.

Given that the issue was underspecified to begin with, I'm now closing it. 
Anybody who still has an issue here, please open a new issue and report your 
specific problem, preferably also proposing a solution.

If you need to follow up to this message, please do so in private email 
(mar...@v.loewis.de).

--
resolution:  - rejected
status: open - closed

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



[issue13774] json.loads raises a SystemError for invalid encoding on 2.7.2

2012-01-13 Thread Roundup Robot

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

New changeset a9680746ae4a by Amaury Forgeot d'Arc in branch '2.7':
Issue #13774: json: Fix a SystemError when a bogus encoding is passed to
http://hg.python.org/cpython/rev/a9680746ae4a

--
nosy: +python-dev

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



[issue13774] json.loads raises a SystemError for invalid encoding on 2.7.2

2012-01-13 Thread Amaury Forgeot d'Arc

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

This will be fixed in the next 2.7.3, thanks for the report!

--
resolution:  - fixed
status: open - closed

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



[issue8881] socket.getaddrinfo() should return named tuples

2012-01-13 Thread Floris Bruynooghe

Floris Bruynooghe floris.bruynoo...@gmail.com added the comment:

I think the part which could possibly a problem is addressed in 
http://hg.python.org/cpython/rev/384f73a104e9/.  Bearing in mind that direct 
usage for string interpolation is a pretty strange use for the result of 
getaddrinfo.

--
nosy: +flub

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



[issue8881] socket.getaddrinfo() should return named tuples

2012-01-13 Thread Antoine Pitrou

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

A reasonable request indeed.

--
stage:  - needs patch
type:  - enhancement
versions: +Python 3.3 -Python 3.2

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



[issue13753] str.join description contains an incorrect reference to argument

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I see the two as really one issue -- minor corrections to the string section of 
stdtype.rst -- that py.user happened to have filed as two.
But I could have left out the closes and done at least one explicitly.
Or I could have closed this and said I was consolidating with #13754.
Thanks for pointing out the typo.

--

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



[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-13 Thread Gregory P. Smith

New submission from Gregory P. Smith g...@krypto.org:

gzip.GzipFile accepts a fileobj parameter with an open file object.

Unfortunately gzip requires a filename be embedded in the gzip file and the 
gzip module code uses fileobj.name to get that.

This results in the fake fdopen name from posixmodule.c being embedded in 
the output gzipped file when using Python 2.x.  This causes problems when 
ungzipping these files with gzip -d or ungzip implementations that always rely 
on the embedded filename when writing their output file rather than stripping a 
suffix from the input filename as they cannot open a file called fdopen or 
if they do, each successive ungzip overwrites the previous...


On Python 3.x the problem is different, the gzip module fails entirely when 
given an os.fdopen()'ed file object:


$ ./python gzip_fdopen_prob.py 
out_file _io.BufferedWriter name='FOO.gz'
out_fd 3
fd_out_file _io.BufferedWriter name=3
fd_out_file.name 3
Traceback (most recent call last):
  File gzip_fdopen_prob.py, line 13, in module
gz_out_file = gzip.GzipFile(fileobj=fd_out_file)
  File /home/gps/oss/cpython/default/Lib/gzip.py, line 184, in __init__
self._write_gzip_header()
  File /home/gps/oss/cpython/default/Lib/gzip.py, line 221, in 
_write_gzip_header
fname = os.path.basename(self.name)
  File /home/gps/oss/cpython/default/Lib/posixpath.py, line 132, in basename
i = p.rfind(sep) + 1
AttributeError: 'int' object has no attribute 'rfind'

(code attached)

The os.fdopen()'ed file object is kindly using the integer file descriptor as 
its .name attribute.  That might or might not be an issue, but regardless of 
that:

1) GzipFile should not fail in this case.
2) GzipFile should never embed a fake made up filename in its output.

Fixing the gzip module to catch errors and use an empty b'' filename for the 
gzip code in the above error is easy.

What should be done about the .name attribute on fake file objects?  I don't 
think it should exist at all.

(another quick test shows that gzip in python 3.x can't output to a BytesIO 
fileobj at all, it thinks it is readonly)

--
files: gzip_fdopen_prob.py
messages: 151203
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: gzip module does the wrong thing with an os.fdopen()'ed fileobj
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24228/gzip_fdopen_prob.py

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



[issue2124] xml.sax and xml.dom fetch DTDs by default

2012-01-13 Thread Paul Boddie

Paul Boddie p...@boddie.org.uk added the comment:

Note that Python 3 provided a good opportunity for doing the minimal amount of 
work here - just stop things from accessing remote DTDs - but I imagine that 
even elementary standard library improvements of this kind weren't made (let 
alone the more extensive standard library changes I advocated), so there's 
going to be a backwards compatibility situation regardless of which Python 
series is involved now, unfortunately.

--

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

The MS support engineer has come back confirming the bug and suggesting using 
the MS C API instead of wstat for doing directory detection. It's still 
possible they'll fix the bug in an upcoming update, but even if they do, it 
will leave a window of broken systems, so I'm inclined to implement a 
workaround (i.e. not use stat for directory detection in import.c).

I started looking at implementing this for the Python 2.7 branch and I found 
that I could drastically simplify the code by extracting an 'isdir' function.

Consider the two changesets in this patch. I've confirmed this fixes the issue. 
Would somebody review this patch? If it's deemed acceptable, I'll consider 
something similar for Python 3.x.

--
hgrepos: +103

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Jason R. Coombs

Changes by Jason R. Coombs jar...@jaraco.com:


--
keywords: +patch
Added file: http://bugs.python.org/file24229/f3c7f4243a04.diff

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Amaury Forgeot d'Arc

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

Please regenerate your diff file, it undoes an unrelated fix :-)

--

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Alex Regueiro

Alex Regueiro alex...@gmail.com added the comment:

That's very good news. I suspected MS has written a wrapper over this somewhere 
to accommodate for this bug, and it was just a matter of using the right API.

I look forward to seeing this in the next 2.7 release.

--

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Jason R. Coombs

Changes by Jason R. Coombs jar...@jaraco.com:


Added file: http://bugs.python.org/file24230/55d164f36389.diff

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Jason R. Coombs

Changes by Jason R. Coombs jar...@jaraco.com:


Added file: http://bugs.python.org/file24231/577b717055bc.diff

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



[issue6727] ImportError when package is symlinked on Windows

2012-01-13 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

I've regenerated the diff a couple of times (once after rebasing to not undo 
Amaury's changes and another after correcting the whitespace).

--
keywords: +needs review

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



[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-13 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +nadeem.vawda
versions:  -Python 2.6, Python 3.1

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



[issue13752] add a str.casefold() method

2012-01-13 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Fixed patch.

--
Added file: http://bugs.python.org/file24232/casefolding.patch

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



[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-01-13 Thread John Machin

New submission from John Machin sjmac...@lexicon.net:

import xml.etree.ElementTree as et
node = et.Element('x')
node.append(not_an_Element_instance)

2.7 and 3.2 produce no complaint at all.
2.6 and 3.1 produce an AssertionError.

However cElementTree in all 4 versions produces a TypeError.

Please fix 2.7 and 3.2 ElementTree to produce a TypeError.

--
messages: 151210
nosy: sjmachin
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree: Element.append doesn't type-check its argument
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue8473] doctest fails if you have inconsistent lineendings

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

By 'update', do you mean to change

+Due to the way releases are made on different platforms, we sometimes test
+files on a *nix system with Windows file endings. Unfortunately, that leaves
+some of the test files broken:

to something like

+Issue8473: Make sure doctest works with mixed line endings.
+When this test is run on *nix, it has the side effect of making sure
+that doctest can handle Windows line endings on *nix.

Or just leave the last two lines off?

And also change '/r/n/r/n' x 2 to '/r/n/n' and '/n/r/n'.

--

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



[issue13752] add a str.casefold() method

2012-01-13 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou
stage: needs patch - patch review

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



[issue13722] distributions can disable the encodings package

2012-01-13 Thread Éric Araujo

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


--
nosy: +eric.araujo

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



[issue11633] Document that print may need explicit flushing

2012-01-13 Thread Éric Araujo

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

Thank you sir.  Should the doc edit be backported to the 2.7 docs, with a 
mention that it’s only on unix?

--

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



[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-01-13 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
components: +Library (Lib), XML
nosy: +santa4nt
versions: +Python 3.3 -Python 2.6, Python 3.1

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



[issue11633] Document that print may need explicit flushing

2012-01-13 Thread Cameron Simpson

Cameron Simpson c...@zip.com.au added the comment:

Putting the wording into 2.7 might be nice, but I thought it was in bugfix only 
mode.

Regarding UNIX only, I'd avoid it; any file may be buffered in almost any way 
on any platform. Saying an explicit flush call may be necessary for immediate 
output is _not_ UNIX only and would be very misleading. Remembering that ~UNIX 
!= Windows.

Telling users to explicitly call flush to ensure immediate output where that is 
necessary ensures portable coding (or ought to, user pigheadedness discounted:-)

--

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



[issue12409] Moving Documenting Python to Devguide

2012-01-13 Thread Éric Araujo

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

I just replied to your python-dev email.  I think you can update 2.7 to use 
Sphinx 1.0 as soon as you’re down to a handful of warnings.

When the migration is done, you can add the documenting doc to the devguide and 
send a message to pydev to tell people to not commit changes to Doc/documenting 
in CPython clones anymore.

In the same email you can ask who to ask for setting up redirects (BTW, will 
redirecting paths to fragments work?  e.g. docs.py.o/documenting/style to 
devguide/documenting#style-and-blah).  When the redirects are up you’ll be able 
to rm Doc/documenting.

Then we’ll open other reports to talk about the unrelated I mentioned and to 
see how to stop downloading Sphinx from svn once per clone :)

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

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



[issue13725] regrtest does not recognize -d flag

2012-01-13 Thread Éric Araujo

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

Thanks for the report and patch; I can’t easily push these days but if nobody 
gets to it today I will commit this.

BTW, are you finding these regrtest bugs while using it to run the CPython test 
suite or to run your tests?

--
nosy: +eric.araujo

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



[issue13737] bugs.python.org/review's Django settings file DEBUG=True

2012-01-13 Thread Éric Araujo

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

(FWIW this tracker is used for what is distributed as CPython, please use the 
metatracker (link on the left “Report Tracker Problem”) for future reports.  
Thanks)

--
nosy: +eric.araujo

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



[issue13756] Python3.2.2 make fail on cygwin

2012-01-13 Thread Éric Araujo

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

I am not sure building CPython with Cygwin is supported.

--
nosy: +eric.araujo, loewis, mhammond

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



[issue13760] ConfigParser exceptions are not pickleable

2012-01-13 Thread Éric Araujo

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


--
assignee:  - lukasz.langa
nosy: +lukasz.langa
stage:  - test needed
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6

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



[issue13763] rm obsolete reference in devguide

2012-01-13 Thread Éric Araujo

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

I understand the phrasing this way: The system is called Mercurial and commonly 
abbreviated “hg”, after the name of its main executable.  So we say “the hg 
server”, “I like the branches concept in hg”, etc.

--
nosy: +eric.araujo

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



[issue13766] explain the relationship between Lib/lib2to3/Grammar.txt and Grammar/Grammar

2012-01-13 Thread Éric Araujo

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


--
nosy: +benjamin.peterson, eric.araujo, gvanrossum

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



[issue13770] python3 json: add ensure_ascii documentation

2012-01-13 Thread Éric Araujo

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

Most probably.  The text model of Python has no bearing on the JSON spec, and 
2.x as well as 3.x Pythons may want to output UTF-8 JSON or JavaScript-escaped 
ASCII-only JSON.  What specific wording is an issue?

--
nosy: +eric.araujo
versions:  -Python 3.4

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



[issue13722] distributions can disable the encodings package

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Those lines were whitespace reformed by Antoine in 61466/61463.
They previously came from 28325 which fixed #663074 (2003).
I do not see any discussion in that issue of making the import optional.
I suspect there is no test of Python working with no encodings ;-)

Just for fun, I commented out the import and error checks. There is an error 
message during the build about python_d.exe not working and python_d.exe 
crashes (ungracefully) on explicit startup, as you expected. I presume the 
patch is to delete the entire block added in 28325:
if (PyErr_ExceptionMatches(PyExc_ImportError)) {
/* Ignore ImportErrors... this is done so that
   distributions can disable the encodings package. Note
   that other errors are not masked, e.g. SystemErrors
   raised to inform the user of an error in the Python
   configuration are still reported back to the user. */
PyErr_Clear();
return 0;

Only in 3.3 or further back? I can do it if you like.

--
nosy: +terry.reedy
stage:  - needs patch

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



[issue13773] Support sqlite3 uri filenames

2012-01-13 Thread Éric Araujo

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


--
assignee:  - ghaering
nosy: +eric.araujo, ghaering

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



[issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client

2012-01-13 Thread Éric Araujo

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


--
nosy: +eric.araujo, ezio.melotti

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



[issue13723] Regular expressions: (?:X|\s+)*$ takes a long time

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I believe it is a known fact that repeated repeats, like (...+)*, make for slow 
matching (if they work at all) with the current re engine.
[I would not be surprised if Perl does some special casing to (in effect at 
least) rewrite the re to your second version.] This is not going to be improved 
in 2.7, nor immediately in 3.x. You can try the regex module on pypi, but it 
may act the same. I suspect there are similar issues like this on the tracker. 
Best to write the re properly.

[Antoine or Ezio: If you think I am mistaken in closing this, please reopen.]

--
nosy: +ezio.melotti, pitrou, terry.reedy
resolution:  - wont fix
status: open - closed

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



[issue13770] python3 json: add ensure_ascii documentation

2012-01-13 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
versions:  -Python 3.1

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



[issue13726] regrtest ambiguous -S flag

2012-01-13 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +ezio.melotti, michael.foord
stage:  - needs patch

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



[issue13725] regrtest does not recognize -d flag

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

unittest.test.test_program.TestCommandLineArgs has a few test functions that do 
at least a minimal test of help and verbosity options and command line args. 
Should more be added for other options, like this and #13726?

--
nosy: +ezio.melotti, michael.foord, terry.reedy

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



[issue11633] Document that print may need explicit flushing

2012-01-13 Thread Éric Araujo

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

Bug fixes include doc improvements, so 2.7 is fair game.

Thanks for your suggestion to not mention specific platforms.  Let’s just 
backport the 3.2 text.

--

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



[issue13730] Grammar mistake in Decimal documentation

2012-01-13 Thread Roundup Robot

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

New changeset 1e65183337ff by Terry Jan Reedy in branch '2.7':
closes #13730
http://hg.python.org/cpython/rev/1e65183337ff

New changeset bac18092c1dc by Terry Jan Reedy in branch '3.2':
#13730 grammar fix
http://hg.python.org/cpython/rev/bac18092c1dc

New changeset e6b0d9d209f2 by Terry Jan Reedy in branch 'default':
Merge with 3.2 #13730 grammar fix
http://hg.python.org/cpython/rev/e6b0d9d209f2

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

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



[issue13730] Grammar mistake in Decimal documentation

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Thanks for the report.

--
nosy: +terry.reedy
versions: +Python 2.7, Python 3.2

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



[issue13725] regrtest does not recognize -d flag

2012-01-13 Thread Erno Tukia

Erno Tukia erno.tu...@iki.fi added the comment:

@Éric I just tried to fix, with tests, the imaplib bug (#13700) and I found 
this bug. And fixing this bug I happened to notice in the source code another 
bug (#13726). No problems with CPython test suite relating to these regrtest 
bugs.

--

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



[issue11633] Document that print may need explicit flushing

2012-01-13 Thread Roundup Robot

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

New changeset 8935a33773b9 by Terry Jan Reedy in branch '2.7':
#11633 about buffering of print
http://hg.python.org/cpython/rev/8935a33773b9

--

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



[issue13744] raw byte strings are described in a confusing way

2012-01-13 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy
versions:  -Python 3.1

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



[issue13749] socketserver can't stop

2012-01-13 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - test needed
versions: +Python 3.3

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



[issue13751] multiprocessing.pool hangs if any worker raises an Exception whose constructor requires a parameter

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

2.6 and 3.1 only get security fixes.
I am only guessing that this is still an issue for 3.2. A test with 3.2.2 would 
be good. If this is really about pickling behavior w/r/t exceptions that cannot 
be changed then this should be closed.

--
nosy: +alexandre.vassalotti, jnoller, pitrou, terry.reedy
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6

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



[issue13779] os.walk: bottom-up

2012-01-13 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
nosy: +rosslagerwall

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



[issue13725] regrtest does not recognize -d flag

2012-01-13 Thread Éric Araujo

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

Erno: Okay, I just wanted to make sure you weren’t using it for your own 
projects, as regrtest is not an official public module.  Thanks for your 
patches!

--

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



[issue13769] json.dump(ensure_ascii=False) return str instead of unicode

2012-01-13 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Ezio, Raymond: is it the doc that is wrong?

--
nosy: +ezio.melotti, rhettinger, terry.reedy
stage:  - needs patch

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




[issue13780] make YieldFrom its own node

2012-01-13 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
components: +Interpreter Core
stage:  - patch review
type:  - enhancement
versions: +Python 3.3

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



[issue13769] json.dump(ensure_ascii=False) return str instead of unicode

2012-01-13 Thread Ezio Melotti

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

The docstring says:

If ``ensure_ascii`` is false, then the return value will be a
``unicode`` instance subject to normal Python ``str`` to ``unicode``
coercion rules instead of being escaped to an ASCII ``str``.


--

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



[issue13751] multiprocessing.pool hangs if any worker raises an Exception whose constructor requires a parameter

2012-01-13 Thread Faheem Mitha

Faheem Mitha fah...@faheem.info added the comment:

This is an issue with SQLAlchemy exceptions, and has been worked around by Mike 
Bayer in http://www.sqlalchemy.org/trac/ticket/2371

For the record, I think the real problem is that Python exception pickling is 
broken, see http://bugs.python.org/issue1692335

It would be nice to see this fixed, otherwise this issue will continue to 
plague the Python standard libraries as well as other libraries. Library 
writers don't seem to be aware of the issue.

--

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



[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-01-13 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

This does not only affect `append`, but also, `insert`, `extend`, etc.

In fact, the list-like operations on Element are merely forwarded to its 
`_children` (a list) field. Should we really type check these methods' 
arguments each? Doesn't strike as Pythonic to me...

OTOH, in cElementTree, by virtue of C-API's tuple unpacking convention, the 
argument's type is always strictly checked prior to accessing the children list.

--

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



[issue13780] make YieldFrom its own node

2012-01-13 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Thanks for the review, Nick.

--
Added file: http://bugs.python.org/file24233/yieldfromnode.patch

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



[issue13783] Clean up PEP 380 C API additions

2012-01-13 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

Georg noted that the PEP 380 patch added a couple of new C interfaces without 
documenting them. These interfaces need to be either:
1. Documented;
2. Made private; or
3. Removed (if they're completely trivial)

PyGen_FetchStopIterationValue: probably document, explicitly noting that it 
also clears the StopIteration exception from the thread state

PyStopIteration_Create: probably remove

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 151235
nosy: docs@python, ncoghlan
priority: normal
severity: normal
status: open
title: Clean up PEP 380 C API additions
versions: Python 3.3

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



[issue13783] Clean up PEP 380 C API additions

2012-01-13 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

The current use of PyStopIteration_Create in genobject.c can probably be 
replaced with PyErr_SetObject(PyExc_StopIteration, value) anyway.

--

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



[issue4106] multiprocessing occasionally spits out exception during shutdown

2012-01-13 Thread Yaniv Aknin

Yaniv Aknin yaniv.ak...@gmail.com added the comment:

Ugh. Not 100% sure it's related, but I've been getting a similar traceback when 
running pip's test suite (python setup.py test) on OSX 10.6.8 with Python 2.7.2.

Traceback (most recent call last):
  File 
/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py,
 line 24, in _run_exitfuncs
func(*targs, **kargs)
  File 
/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/util.py,
 line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable

Obviously it's not the exact same bug as fixed here, but Googling the traceback 
led me here and I do think it's the same genre of bug, i.e., multiprocessing's 
use of forking leads to issues when atexit is called (wasn't sure whether to 
open it here or #9207). Also, see 
https://groups.google.com/forum/#!topic/nose-users/fnJ-kAUbYHQ, it seems other 
users of the nose testsuite ran into this.

I'm afraid I won't have time to look much further into this (the reason I'm 
running pip's testsuite is that I'm already trying to make a contribution to 
pip...), but I thought it's best to at least mention it somewhere.

--
nosy: +Yaniv.Aknin

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



[issue13294] http.server: minor code style changes.

2012-01-13 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


--
status: open - closed

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



[issue13294] http.server: minor code style changes.

2012-01-13 Thread Senthil Kumaran

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

Eric - noted the point. :)

--

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



  1   2   >