[issue8809] smtplib should support SSL contexts

2011-04-26 Thread Kasun Herath

Kasun Herath  added the comment:

Thanks for the quick review. I'm submitting a new patch with changes suggested.

--
Added file: http://bugs.python.org/file21791/smtp_sslcontext_updated3.patch

___
Python tracker 

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



[issue11884] Argparse calls ngettext but doesn't import it

2011-04-26 Thread John O'Hagan

John O'Hagan  added the comment:

Reported to Debian, bug #624277

--

___
Python tracker 

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



[issue11933] newer() function in dep_util.py mixes up new vs. old files due stat.st_mtime vs stat[ST_MTIME]

2011-04-26 Thread John S. Gruber

New submission from John S. Gruber :

In researching a bug I was surprised that a newly created file was being 
replaced when being processed a second time (it shouldn't have been processed a 
second time). 

I tracked the surprise to diff Lib/distutils/dep_util.py @ 57642:9211a5d7d0b4 
where a comparison with a resolution of 1 second was replaced by a floating 
point comparison, though the new file was copied by file_util.py which tried to 
preserve the time using a method accurate to only 1 second (truncating the 
fraction). Since a new file with a truncated modification time looks older than 
an older file with a full precision stamp the problem resulted.

(For convenience--stat.st_mtime is floating point, stat[ST_MTIME] is integer 
seconds unless os.stat_float_times has been called to change the floating point 
behavior.

Using all floating point doesn't resolve the issue as OS timestamped files can 
have more resolution than python floating point may hold, again causing 
truncation and confusion. For reference see Python issue 10148.

In my humble opinion time setting and comparison should all be done 
consistently, and, if sub-second comparisons are desired, some fuzz should be 
used such that the comparison makes sense for the platform with the least 
amount of precision available with its floating point implementation.

I briefly looked at branches other than 2.7 and they don't seem to have the 
above change.

Probably of minor importance in most cases.

Thanks all for the good work, all. I've been learning python and I love it!

--
assignee: tarek
components: Distutils
messages: 134526
nosy: eric.araujo, jsjgruber, tarek
priority: normal
severity: normal
status: open
title: newer() function in dep_util.py mixes up new vs. old files due 
stat.st_mtime vs stat[ST_MTIME]
type: behavior
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



[issue11932] Email multipart boundary detection fails on a wrapped header

2011-04-26 Thread David Strauss

David Strauss  added the comment:

Never mind. I was manipulating some text that broke the parser.

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



[issue11932] Email multipart boundary detection fails on a wrapped header

2011-04-26 Thread David Strauss

David Strauss  added the comment:

Replacing the file with a proper example.

--
Added file: http://bugs.python.org/file21790/wrapped_multipart.txt

___
Python tracker 

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



[issue11932] Email multipart boundary detection fails on a wrapped header

2011-04-26 Thread David Strauss

Changes by David Strauss :


Removed file: http://bugs.python.org/file21789/wrapped_multipart.txt

___
Python tracker 

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



[issue11932] Email multipart boundary detection fails on a wrapped header

2011-04-26 Thread David Strauss

New submission from David Strauss :

I've attached a multipart message produced by Thunderbird. For some reason, the 
email.message parser doesn't properly recognize the boundary. This causes 
legitimate multipart messages to parse as if no boundary were specified. Simply 
removing the newline on the line starting with " boundary" allows it to parse 
correctly.

To see why this is valid, refer to section 2.2.3 of RFC2822 [1].

[1] http://tools.ietf.org/html/rfc2822#section-2.2.3

--
components: Library (Lib)
files: wrapped_multipart.txt
messages: 134523
nosy: davidstrauss
priority: normal
severity: normal
status: open
title: Email multipart boundary detection fails on a wrapped header
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file21789/wrapped_multipart.txt

___
Python tracker 

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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-26 Thread Ezio Melotti

Ezio Melotti  added the comment:

This can be fixed by adding 'False', 'None', and 'True' to the Helper.keywords 
dict in Lib/pydoc.py.  I'm not sure what the topic for these should be though.  
True/False/None are documented in the "built-in constants" section[0] of the 
doc.  An alternative might be to point to 'bool'[1] for True/False or just show 
the same help of help(True/False/None) (without quotes).

[0]: http://docs.python.org/dev/py3k/library/constants.html#built-in-constants
[1]: http://docs.python.org/dev/py3k/library/functions.html#bool

--

___
Python tracker 

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



[issue11834] wrong module installation dir on Windows

2011-04-26 Thread Mark Mc Mahon

Mark Mc Mahon  added the comment:

Reviewing the patch (issue133572.py33.patch):
You have used forward slashes for the first change - but back slashes for the 
others. I see that other places in the existing docs use back slashes when 
referring to windows paths.

I have never used the --prefix option - but I am surprised that it would 
install scripts to prefix\Lib\site-packages (without the prefix option scripts 
are installed in pythondir\Scripts.

Maybe installing something like grin/pylint/etc which has an executable script 
is a way to verify?

--
nosy: +markm

___
Python tracker 

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



[issue10761] tarfile.extractall fails to overwrite symlinks

2011-04-26 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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread STINNER Victor

STINNER Victor  added the comment:

The next step is to update the datetime module: something like the attached 
patch (datetime_y2k.patch).

--
Added file: http://bugs.python.org/file21788/datetime_y2k.patch

___
Python tracker 

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



[issue10761] tarfile.extractall fails to overwrite symlinks

2011-04-26 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Scott- which platform did you observe this? I can't reproduce this on the 2.7 
code on Linux.

--
nosy: +orsenthil

___
Python tracker 

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



[issue11931] Regular expression documentation patch

2011-04-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I'll do these fix-ups but wish you would shift your focus to making substantive 
changes.  You're wasting developer time.

--

___
Python tracker 

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



[issue11931] Regular expression documentation patch

2011-04-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
priority: normal -> low

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor  wrote:
..
> .. class:: struct_time (...) A year value will be handled as described under 
> :ref:`Year 2000 (Y2K) issues ` above.

This one needs to be removed.  Thanks.

--

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Apr 26, 2011 at 6:30 PM, STINNER Victor  wrote:
>
> STINNER Victor  added the comment:
>
> "What makes you say so?
>
> 1970"
>
> Don't write ">>> " using the email interface :-)
>

Sorry.  That was the output of time.strptime('70', '%y')[0].

--

___
Python tracker 

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



[issue10914] Python sub-interpreter test

2011-04-26 Thread STINNER Victor

STINNER Victor  added the comment:

test_capi pass on x86 debian parallel 3.x: I close this issue again :-)

--
status: open -> closed

___
Python tracker 

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



[issue11931] Regular expression documentation patch

2011-04-26 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

Raymond, what about the title "search() vs. match()"? There is a dot there! 
Please add the dot where I added it. Or remove it here as well. Also, "Checking 
For a Pair" is "Checking for a Pair". The word "for" must be lowercase.

--

___
Python tracker 

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



[issue11931] Regular expression documentation patch

2011-04-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The section heads should remain in title case.

The colon in the octal escape section should remain, but the "If" following it 
should be lower cased.

"Phonebook" should remain a single word.

"vs" is fine without the period in a section head.

It would be better to replace all of the "e.g." and "i.e" with "for example" 
and "such as".

--
nosy: +rhettinger

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread STINNER Victor

STINNER Victor  added the comment:

"What makes you say so?

1970"

Don't write ">>> " using the email interface :-)

--


>>> t
time.struct_time(tm_year=70, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, 
tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=0)
>>> time.mktime(t)
-59958144561.0
>>> time.localtime(_)
time.struct_time(tm_year=70, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, 
tm_sec=0, tm_wday=2, tm_yday=1, tm_isdst=0)

Year 70 is considered as the year 70.

--

___
Python tracker 

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



[issue8326] Cannot import name SemLock on Ubuntu

2011-04-26 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Apr 26, 2011, at 09:45 PM, Matthias Klose wrote:

>Matthias Klose  added the comment:
>
>> Barry A. Warsaw  added the comment:
>> 
>> I'm closing this as invalid for Python, since I believe this is strictly an
>> Ubuntu bug caused by an out-of-date kernel on the build farm.
>
>that's where I disagree. a configure check should not be dependent on the
>running kernel.  I assume in the majority of cases you won't build against a
>current kernel, so the a fix in python maybe could be a runtime check.  Such
>configure checks will fail for cross builds too.

Perhaps so, but that's a totally different issue.  Such a change wouldn't be
appropriate for stable releases, so it could only make it into Python 3.3.  It
might be an interesting thing to work on, but I'd suggest opening a new bug
and seeing if anyone wants to work up a patch for that.

>Note that packages on Ubuntu are always built on the current kernel of the
>current LTS release, on Debian on current kernels of the current stable
>release.  So there is nothing "out-of-date".

"Out-of-date" was probably an incorrect choice of words.  My understanding was
that this bug was caused by a problem in the kernel that caused the configure
check to fail, at the time the Maverick Python 2.7 package was built, and that
the build machines have since been updated, correcting the problem.  At least,
current PPA builds don't have this problem.

In any case, I still think this specific issue is more appropriately tracked
in the Launchpad bug, and I have requested an SRU for a rebuild.

--

___
Python tracker 

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



[issue10914] Python sub-interpreter test

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c8338cfa3578 by Victor Stinner in branch 'default':
Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0)
http://hg.python.org/cpython/rev/c8338cfa3578

New changeset d3af2a2b621b by Victor Stinner in branch 'default':
Issue #10914: Initialize correctly the filesystem codec when creating a new
http://hg.python.org/cpython/rev/d3af2a2b621b

--

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor  wrote:
..
>
> timemodule.c:
>
> PyDoc_STRVAR(module_doc,
> "...
> The tuple items are:\n\
>  year (four digits, e.g. 1998)\n\
> ...")
>
> => That's wrong. Example: time.gmtime(-5558220).tm_year gives 208.

This is wrong regardless of this patch.   I don't mind fixing this,
but it would be a different issue.  Can you suggest a change?  I would
like the docstring to still inform the user that 1998 should be given
as 1998 and not as 98.  Maybe s/four/all/?

--

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor  wrote:
> It looks like struct_time note is wrong: the year 70 is now 70 and not 
> interpreted as 1970 anymore.

What makes you say so?

1970

--

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread STINNER Victor

STINNER Victor  added the comment:

time.rst:

* **Year 2000 (Y2K) issues**: Python depends on the platform's C library, which
  generally doesn't have year 2000 issues, since all dates and times are
  represented internally as seconds since the epoch.  Function :func:`strptime`
  can parse 2-digit years when given ``%y`` format code.  When 2-digit years are
  parsed, they are converted according to the POSIX and ISO C standards: values
  69--99 are mapped to 1969--1999, and values 0--68 are mapped to 2000--2068.

.. class:: struct_time (...) A year value will be handled as described under 
:ref:`Year 2000 (Y2K) issues ` above.

.. [#] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands 
to the
   preferred  hour/minute offset is not supported by all ANSI C libraries. 
Also, a
   strict reading of the original 1982 :rfc:`822` standard calls for a two-digit
   year (%y rather than %Y), but practice moved to 4-digit years long before the
   year 2000.  The 4-digit year has been mandated by :rfc:`2822`, which 
obsoletes
   :rfc:`822`.

Are these 3 notes still valid? It looks like struct_time note is wrong: the 
year 70 is now 70 and not interpreted as 1970 anymore.

---

timemodule.c:

PyDoc_STRVAR(module_doc,
"...
The tuple items are:\n\
  year (four digits, e.g. 1998)\n\
...")

=> That's wrong. Example: time.gmtime(-5558220).tm_year gives 208.

---

/home/haypo/prog/HG/cpython/Modules/timemodule.c: In function 'PyInit_time':
/home/haypo/prog/HG/cpython/Modules/timemodule.c:872: warning: unused variable 
'p'

--

___
Python tracker 

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



[issue11931] Regular expression documentation patch

2011-04-26 Thread Boštjan Mejak

New submission from Boštjan Mejak :

I have read and fixed the regular expression documentation and made a patch. 
Ezio, please review it and apply it. Thanks.

--
assignee: docs@python
components: Documentation
files: re.patch
keywords: patch
messages: 134506
nosy: Retro, docs@python, ezio.melotti
priority: normal
severity: normal
status: open
title: Regular expression documentation patch
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21787/re.patch

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when locks are implemented using POSIX condition variables

2011-04-26 Thread STINNER Victor

STINNER Victor  added the comment:

> Well, if it's called _info() in Python, it's private too!

My patch replaces thread._info() by sys.thread_info: it becomes public.

> What I mean is that the "#ifdef WITH_THREAD" could be done in
> sysmodule.c rather than in thread.c

PyThread_GetInfo() requires some informations that are only available at the 
end of thread.c: USE_SEMAPHORES define from thread_pthread.h and PYTHREAD_NAME 
from thread.c. It is easier to define PyThread_GetInfo() here, instead of 
giving access to these defines outside thread.c (and these defines should 
remaing private).

> Another small thing: your doc says "name" is optional, but it shouldn't.

By optional I mean that its value is None if Python is compiled without threads.

> Also, when Python is compiled without threads, 
> I don't think thread_info should be a structseq. 
> It should probably be None instead.

Terry Reedy proposed an empty string for name if Python is compiled without 
threads. Antoine suggested None instead of an empty string for lock and version 
fields, so I chose to use also None for None.

But yes, I like the idea of sys.thread_info being None.

--

Updated patch (sys_thread_info-2.patch):
 - sys.thread_info is None if Python is compiled without threads
 - sys.thread_info.name is no more optional
 - change the documentation of the lock and version fields
 - fix test_os (version is now a attribute and no more a key of a dict)

--
Added file: http://bugs.python.org/file21786/sys_thread_info-2.patch

___
Python tracker 

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



[issue9614] _pickle is not entirely 64-bit safe

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> The warnings at lines 284, 301, 461, 647 are benign.

I agree.  There is no loss of data because Py_ssize_t variable bounds are 
checked before these lines are reached.

> The attached patch fixes them.

I don't like these changes:

-Pdata_poptuple(Pdata *self, Py_ssize_t start)
+Pdata_poptuple(Pdata *self, int start)

-Pdata_poplist(Pdata *self, Py_ssize_t start)
+Pdata_poplist(Pdata *self, int start)

These seem to attempt to fix

Py_SIZE(self) = start;

assignments, but as far as I can tell, Py_SIZE(self) type is Py_ssize_t.

What do I miss here?

--

___
Python tracker 

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



[issue8326] Cannot import name SemLock on Ubuntu

2011-04-26 Thread Matthias Klose

Matthias Klose  added the comment:

> Barry A. Warsaw  added the comment:
> 
> I'm closing this as invalid for Python, since I believe this is strictly an
> Ubuntu bug caused by an out-of-date kernel on the build farm.

that's where I disagree. a configure check should not be dependent on the 
running kernel.  I assume in the majority of cases you won't build against a 
current kernel, so the a fix in python maybe could be a runtime check.  Such 
configure checks will fail for cross builds too.

Note that packages on Ubuntu are always built on the current kernel of the 
current LTS release, on Debian on current kernels of the current stable 
release.  So there is nothing "out-of-date".

--

___
Python tracker 

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



[issue9614] _pickle is not entirely 64-bit safe

2011-04-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger
priority: normal -> high

___
Python tracker 

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



[issue10761] tarfile.extractall fails to overwrite symlinks

2011-04-26 Thread Scott Leerssen

Scott Leerssen  added the comment:

I just hit the same issue.  This seems to work:


Modified:Lib/tarfile.py
===
---Lib/tarfile.py   2011-04-26 20:36:33 UTC (rev 49502)
+++Lib/tarfile.py   2011-04-26 21:01:24 UTC (rev 49503)
@@ -2239,6 +2239,8 @@
if hasattr(os, "symlink") and hasattr(os, "link"):
# For systems that support symbolic and hard links.
if tarinfo.issym():
+if os.path.exists(targetpath):
+os.unlink(targetpath)
os.symlink(tarinfo.linkname, targetpath)
else:
# See extract().

--
nosy: +Scott.Leerssen

___
Python tracker 

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



[issue8326] Cannot import name SemLock on Ubuntu

2011-04-26 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I'm closing this as invalid for Python, since I believe this is strictly an 
Ubuntu bug caused by an out-of-date kernel on the build farm.  I'm working on 
an SRU to fix that.  Please track further status on the Launchpad bug page 
given below.

--
assignee:  -> barry
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



[issue5115] Extend subprocess.kill to be able to kill process groups

2011-04-26 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

Note that the setpgid creation part is now somewhat redundant with Popen's 
start_new_session flag (which calls setsid). Also, this should probably be an 
option, since with that patch every subprocess is in its own process group.

> I was wondering... what if process A runs a subprocess B which runs a
> subprocess C. Is C still considered a children of A and gets killed as
> well?

No.
When setpgid/setsid is called, a new group is created, so process C will be not 
be part of the same group as B.

--
nosy: +neologix

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 5e93c5cdc378 by Raymond Hettinger in branch '3.2':
Issue 11929: Minor whitespace clean-ups.
http://hg.python.org/cpython/rev/5e93c5cdc378

New changeset 89fcadbc49df by Raymond Hettinger in branch 'default':
Issue 11929: Minor whitespace clean-ups.
http://hg.python.org/cpython/rev/89fcadbc49df

--
nosy: +python-dev

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I put a few of these in (ones where it looked like readability was improved).

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-26 Thread STINNER Victor

STINNER Victor  added the comment:

> The patch looks fine; please add a reference to PEP 11 
> into the error messages

Ok, done.

> "Our plan are to port, this year 2.7, then 3.x."

VMS is unsupported in 3.3 and the code will be removed in 3.4. If anyone comes 
with patches to have a working VMS version before Python 3.4, we can support 
VMS again and just forget the PEP 11 deprecation.

> Would be possible to publish a notice in "python insider" blog?

Sure, but I don't want to write it. Contact Doug Hellmann for that. Marc Andre 
Lemburg is also volunteer to write such notice.

--

___
Python tracker 

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



[issue11834] wrong module installation dir on Windows

2011-04-26 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin

___
Python tracker 

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



[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ec754f8d2917 by Victor Stinner in branch 'default':
Issue #11918: OS/2 and VMS are no more supported because of the lack of
http://hg.python.org/cpython/rev/ec754f8d2917

--
nosy: +python-dev

___
Python tracker 

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



[issue3526] Customized malloc implementation on SunOS and AIX

2011-04-26 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

I just noticed there's already a version of dlmalloc in 
Modules/_ctypes/libffi/src/dlmalloc.c

Compiling with gcc -shared -fpic -o /tmp/dlmalloc.so 
./Modules/_ctypes/libffi/src/dlmalloc.c

Then LD_PRELOAD=/tmp/dlmalloc.so ./python

works just fine (and by the way, it solves the problem with glibc's version in 
#11849, it's somewhat slower though).

Or am I missing something?

--

___
Python tracker 

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



[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-26 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> How can we help you ?

Please contribute a full, complete, working VMS port to Python 3.3.

I never understood whether the code that we have is supposed to be
complete, in the sense that you get a working Python out of it
(rather, I understood that this never was the case - that you always
needed additional pieces to make it do something useful).

Another step to demonstrate ongoing support would be to contribute
a VMS build slave, so that committers without VMS (which is nearly
100%) can actually find out whether it continues to work after
changes.

I'd also like to see a dedicated maintainer nominated - a person who'll
respond to bug reports about the VMS support; if that person ever
leaves, and no new maintainer is nominated, the code would again be
up for removal.

If no demonstrable improvement is contributed to Python 3.3, I'd
continue with the PEP 11 process.

--

___
Python tracker 

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



[issue11930] Remove time.accept2dyear

2011-04-26 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

As implemented in issue 10827, use of 2-digits years in timetuples to mean 
4-digit years straddling year 2000 is deprecated in 3.3.  There is no mechanism 
for issuing deprecation warning for access to a module variable, but a 
deprecation note was added to its documentation.

Attached patch removes time.accept2dyear and the associated behaviors.

--
files: remove-accept2dyear.diff
keywords: patch
messages: 134493
nosy: belopolsky, haypo
priority: normal
severity: normal
stage: patch review
status: open
title: Remove time.accept2dyear
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21785/remove-accept2dyear.diff

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> foo(x=default) vs. foo(x = default)

That's fine.  Most of the rest of it isn't.

--

___
Python tracker 

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



[issue3526] Customized malloc implementation on SunOS and AIX

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> So how about a --with-dlmalloc=path/to/dlmalloc.c?

Can't you just add dlmalloc to LDFLAGS or something? Or would the
default malloc still be selected?

> This is
> similar in how python uses e.g. openssl to provide optional extra
> functionality/performance.

It's not really similar. OpenSSL provides functionality that's not
available through the standard library. Here, we're talking about an
alternative implementation of the standard C routines.

--

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On the other hand, I would be +0 for the tzinfo-examples fixes of the form:

foo(x=default) vs. foo(x = default)

(This was also the fix suggested on the ML.)

Overall, I think it is good to judicially point out to PEP 8 violations where 
fixes would improve readability, but mechanical reformatting is likely to be 
net loss.  I may fix tzinfo-examples next time I touch it.  With addition of 
timezone class in 3.3, this set of examples needs to be updated.

--

___
Python tracker 

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



[issue3526] Customized malloc implementation on SunOS and AIX

2011-04-26 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

> > So by using dlmalloc on SunOS and AIX you would get the same level
> > of performance for memory operations that you already probably can
> > appreciate on Linux systems.
>
> Yes, but with the above "trick", you can do that without patching
> python nor your app.
> I mean, if you start embedding malloc in python, why stop there, and
> not embed the whole glibc ;-)
> Note that I realize this won't solve the problem for other AIX users
> (if there are any left :-), but since this patch doesn't seem to be
> gaining adhesion, I'm just proposing an alternative that I find
> cleaner, simpler and easier to maintain.

This trick is hard to find however and I don't think it serves Solaris
and AIX users very much (and sadly IBM keeps pushing AIX so yes it's
used more then I like :-( ).

So how about a --with-dlmalloc=path/to/dlmalloc.c?  This way the
dlmalloc code does not live inside Python and doesn't need to be
maintained by python.  But python still supports the code and will
easily be built using it.  Add a note in the README for AIX and
Solaris and I think this would be a lot friendlier to users.  This is
similar in how python uses e.g. openssl to provide optional extra
functionality/performance.

--

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Another -1 from me.  Similar changes to inline examples in the docs have been 
rejected in the past for the same reasons as Raymond wrote.  See issue 4649.

--
nosy: +belopolsky

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

IMO, this is a complete waste of time and much of the code doesn't actually 
read any better afterwards.  Some of the mathematical expressions look worse.

There may be some merit to splitting the imports but that isn't worth much 
either, perhaps not enough to warrant trouncing the version control history on 
those lines.

--
nosy: +rhettinger
priority: normal -> low

___
Python tracker 

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



[issue11929] Improve usage of PEP8 in Docs/includes/*

2011-04-26 Thread Sandro Tosi

New submission from Sandro Tosi :

Following up http://mail.python.org/pipermail/docs/2011-April/004032.html I 
made a run of pep8 on Doc/includes/ py files.

i've prepared a patch against default; if it's considered worth I can prepare 
patches for the other branches (for sure 2.7 needs a different patch, and 
probably also 3.1).

--
assignee: docs@python
components: Documentation
files: pep8_doc_includes.patch
keywords: patch
messages: 134486
nosy: docs@python, sandro.tosi
priority: normal
severity: normal
stage: patch review
status: open
title: Improve usage of PEP8 in Docs/includes/*
versions: Python 3.3
Added file: http://bugs.python.org/file21784/pep8_doc_includes.patch

___
Python tracker 

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



[issue10640] SystemError on pickling bytes >= 4GB

2011-04-26 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



[issue3526] Customized malloc implementation on SunOS and AIX

2011-04-26 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> it is possible to impact the memory allocation system on AIX using some 
> environment variables (MALLOCOPTIONS and others)

LD_PRELOAD won't impact AIX's malloc behaviour, but allows you to
replace it transparently by any other implementation you like
(dlmalloc, ptmalloc, ...), without touching neither cpython nor your
application.

For example, let's says I want a Python version where getpid always returns 42.

$ cat /tmp/pid.c
int getpid(void)
{
return 42;
}

$ gcc -o /tmp/pid.so /tmp/pid.c -fpic -shared

Now,

$ LD_PRELOAD=/tmp/pid.so python -c 'import os; print(os.getpid())'
42

That's it. If you replace pid.so by dlmalloc.so, you'll be using
dlmalloc instead of AIX's malloc, without having modified a single
line of code.
If you're concerned with impacting other applications, then you could
do something like:

$ cat python.c
#include 
#include 

int main(int argc, char *argv[])
{
setenv("LD_PRELOAD", "/tmp/pid.so", 1);
execvl(, argv);

return 1;
}

And then:
$ ./python -c 'import os; print(os.getpid())'
42

> Also note that dlmalloc (or a derivative - ptmalloc) is part of GNU glibc 
> which is used by most Linux systems, and is what you get when you call malloc.
> http://en.wikipedia.org/wiki/Malloc#dlmalloc_and_its_derivatives
>

Actually, glibc/eglibc versions have diverged quite a lot from the
original ptmalloc2, see for example http://bugs.python.org/issue11849
(that's one reason why embedding such a huge piece of code into Python
is probably not a good idea as highlighted by Antoine, it's updated
fairly frequently).

> So by using dlmalloc on SunOS and AIX you would get the same level of 
> performance for memory operations that you already probably can appreciate on 
> Linux systems.

Yes, but with the above "trick", you can do that without patching
python nor your app.
I mean, if you start embedding malloc in python, why stop there, and
not embed the whole glibc ;-)
Note that I realize this won't solve the problem for other AIX users
(if there are any left :-), but since this patch doesn't seem to be
gaining adhesion, I'm just proposing an alternative that I find
cleaner, simpler and easier to maintain.

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when locks are implemented using POSIX condition variables

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le mardi 26 avril 2011 à 01:34 +, STINNER Victor a écrit :
> STINNER Victor  added the comment:
> 
> > >  - Rename _PyThread_Info() to PyThread_GetInfo() (consistent name with
> > > PyFloat_GetInfo() and PyLong_GetInfo())
> > 
> > I don't think we want that API to be public, so it should be
> > _PyThread_GetInfo().
> 
> Why should it be private in C, but not in Python?

Well, if it's called _info() in Python, it's private too!

> > >  - Always compile thread.c, but add #ifdef WITH_THREAD around most the
> > > file (except PyThread_GetInfo())
> > 
> > What's the point? Sounds like pointless complication.
> 
> Complication? It does *simplify* configure.in.
> 
> I don't want to create a new file just for a small function.

What I mean is that the "#ifdef WITH_THREAD" could be done in
sysmodule.c rather than in thread.c

Also, when Python is compiled without threads, I don't think thread_info
should be a structseq. It should probably be None instead.

Another small thing: your doc says "name" is optional, but it shouldn't.

--

___
Python tracker 

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



[issue9614] _pickle is not entirely 64-bit safe

2011-04-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

See also issue 10640.

--
nosy: +belopolsky

___
Python tracker 

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



[issue11872] cPickle gives strange error for large objects.

2011-04-26 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



[issue9614] _pickle is not entirely 64-bit safe

2011-04-26 Thread Santoso Wijaya

Changes by Santoso Wijaya :


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



[issue11564] pickle not 64-bit ready

2011-04-26 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



[issue9614] _pickle is not entirely 64-bit safe

2011-04-26 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



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Michal Molhanec

Michal Molhanec  added the comment:

Thanks, the fix looks working.
The questions are:
a) can this situation be detected at runtime to provide better error message?
b) can it be detected during the installation so that the installation program 
can offer to the user to set the flag (or it could be set always? are there any 
disadvantages in doing so?}

--

___
Python tracker 

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



[issue8809] smtplib should support SSL contexts

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

So, thanks for the new patch. I tested it with my ISP's server and it works 
fine!

Two remaining issues though:
- in the SMTP_SSL constructor, you must add the "context" argument at the end 
of the argument list (after "timeout"), otherwise someone passing "timeout" as 
a positional argument will find their code breaking
- in the doc, you need a "versionchanged" tag for the "context" argument (in 
both instances)

Thank you again.

--

___
Python tracker 

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



[issue11928] fail on filename with space at the end

2011-04-26 Thread anatoly techtonik

Changes by anatoly techtonik :


--
title: fail if file with space at the end is present -> fail on filename with 
space at the end

___
Python tracker 

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



[issue11928] fail if file with space at the end is present

2011-04-26 Thread anatoly techtonik

New submission from anatoly techtonik :

I know this is a minor bug, but still.. Windows allows creation of filenames 
like "use MoveBufferArea " (note space at the end). When such file is present 
in current directory, `setup.py sdist` fails with `error: use MoveBufferArea : 
The system cannot find the file specified`.

--
assignee: tarek
components: Distutils
messages: 134480
nosy: eric.araujo, tarek, techtonik
priority: normal
severity: normal
status: open
title: fail if file with space at the end is present
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, 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



[issue8809] smtplib should support SSL contexts

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

For the record, issue11927 reminds me that test_smtpnet actually has a trivial 
test for SMTP-over-SSL.

--

___
Python tracker 

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



[issue11927] SMTP_SSL doesn't use port 465 by default

2011-04-26 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The SMTP_SSL doc says “If port is omitted, the standard SMTP-over-SSL port 
(465) is used”, but actually port 25 is used by default. The fix is trivial: 
make "default_port" a class attribute (in both SMTP and SMTP_SSL) instead of 
setting it inside the constructor.

test_smtpnet uses an explicit port to connect to gmail, which is why it doesn't 
exhibit the issue.

(Kasun, I'm adding you since you might be interested. Sorry if it isn't the 
case)

--
components: Library (Lib)
keywords: easy
messages: 134478
nosy: kasun, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: SMTP_SSL doesn't use port 465 by default
type: behavior
versions: Python 2.7, Python 3.1, 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



[issue11921] distutils2 should be able to compile an Extension based on the Python implementation version

2011-04-26 Thread Alexis Metaireau

Alexis Metaireau  added the comment:

This raises a concern about python specific python implementations 
dependencies. 

We probably could extend PEP 345 in order to support things such as 
'platform.python_implementation == "cpython"'.

--

___
Python tracker 

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



[issue11921] distutils2 should be able to compile an Extension based on the Python implementation version

2011-04-26 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue10517] test_concurrent_futures crashes with "--with-pydebug" on RHEL5 with "Fatal Python error: Invalid thread state for this thread"

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> > How about deleting the mapping (pthread_key_delete) and recreating it
> > from scratch, then?
> 
> Sounds good.
> So the idea would be to retrieve the current thread's tstate, destroy
> the current autoTLSkey, re-create it, and re-associate the current
> tstate to this new key. I just did a quick test on RHEL4 and it works.
> PyThread_ReinitTLS looks like a good candidate for that, but it's the
> same problem, autoTLSkey scope is limited to pystates.c (and I'm not
> sure that the tstate should be exposed to platform thread
> implementations).
> There's also PyEval_ReinitThreads in ceval.c, exposing the autoTLSkey
> would make more sense (and it already knows about tstate, of course).
> Where would you put it?

You could add a new _PyGILState_ReInit() function and call it from
PyOS_AfterFork() or PyEval_ReInitThreads().

(perhaps you also need to add a TLS-destroying function to thread.c, I
haven't looked)

--

___
Python tracker 

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



[issue10517] test_concurrent_futures crashes with "--with-pydebug" on RHEL5 with "Fatal Python error: Invalid thread state for this thread"

2011-04-26 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> How about deleting the mapping (pthread_key_delete) and recreating it
> from scratch, then?

Sounds good.
So the idea would be to retrieve the current thread's tstate, destroy the 
current autoTLSkey, re-create it, and re-associate the current tstate to this 
new key. I just did a quick test on RHEL4 and it works.
PyThread_ReinitTLS looks like a good candidate for that, but it's the same 
problem, autoTLSkey scope is limited to pystates.c (and I'm not sure that the 
tstate should be exposed to platform thread implementations).
There's also PyEval_ReinitThreads in ceval.c, exposing the autoTLSkey would 
make more sense (and it already knows about tstate, of course).
Where would you put it?

--

___
Python tracker 

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



[issue11921] distutils2 should be able to compile an Extension based on the Python implementation version

2011-04-26 Thread Éric Araujo

Éric Araujo  added the comment:

The environment markers are specific to PEP 345, that is metadata, which 
includes dependencies, so that you can depend on something only on a given 
platform.  Your proposal of putting C extensions in another distribution and 
optionally depend on it should work right now, but is IMO too cumbersome.  Why 
not extend the format of the Extensions section in setup.cfg so that it 
supports environment markers?

--

___
Python tracker 

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



[issue11913] sdist should allow for README.rst

2011-04-26 Thread Éric Araujo

Éric Araujo  added the comment:

If it’s only a warning, just ignore it.  This would be easy to fix, but as it 
would be considered a new feature, it can’t go into distutils, which is frozen. 
 I am however willing to edit the documentation to tell that PyPI will accept 
README.rst and that people need not worry about the unfortunate warning.  Would 
that be okay with you?

In distutils2, the replacement for distutils, we don’t included README by 
default.  I don’t know why this was changed.

--

___
Python tracker 

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



[issue8326] Cannot import name SemLock on Ubuntu

2011-04-26 Thread Buck Golemon

Buck Golemon  added the comment:

@Barry: Yes, it's still a problem.

The ubuntu 10.10 python2.7 still has no multiprocessing.
Since the EOL is April 2012, it needs fixed.

It may be considered an invalid python bug, since it seems to be strictly 
related to Ubuntu packaging, but I thought the python maintainers should know.

--Buck

--

___
Python tracker 

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



[issue10517] test_concurrent_futures crashes with "--with-pydebug" on RHEL5 with "Fatal Python error: Invalid thread state for this thread"

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Well, after fork, all threads have exited, so you'll be running on the
> behalf of the child process' main - and only - thread, so by
> definition you can't access other threads' thread-specific data, no?

A rather good point :)
How about deleting the mapping (pthread_key_delete) and recreating it
from scratch, then?

> As an alternate solution, I was thinking of calling
> PyThread_delete_key_value(autoTLSkey) in the path of thread bootstrap,
> i.e. starting in Modules/_threadmodule.c t_bootstrap.

That would somewhat alleviate the problem, but only for Python-created
threads. Threads created through other means (for example mod_wsgi, or
database wrappers having their own thread pools) would still face the
original issue.

--

___
Python tracker 

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



[issue5723] Incomplete json tests

2011-04-26 Thread Xuanji Li

Changes by Xuanji Li :


--
nosy: +xuanji

___
Python tracker 

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



[issue11872] cPickle gives strange error for large objects.

2011-04-26 Thread Xuanji Li

Changes by Xuanji Li :


--
nosy: +xuanji

___
Python tracker 

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



[issue5115] Extend subprocess.kill to be able to kill process groups

2011-04-26 Thread Xuanji Li

Changes by Xuanji Li :


--
nosy: +xuanji

___
Python tracker 

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



[issue11837] smtplib._quote_periods triggers spurious type error in re.sub

2011-04-26 Thread Xuanji Li

Changes by Xuanji Li :


--
nosy: +xuanji

___
Python tracker 

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



[issue3526] Customized malloc implementation on SunOS and AIX

2011-04-26 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

Hi Charles-François,

it is possible to impact the memory allocation system on AIX using some 
environment variables (MALLOCOPTIONS and others), but it is not very elegant 
(it will impact all applications running with this environment and it is 
difficult to ensure that those environment variables will be correctly set when 
distributing an application to a customer) and I am afraid most users will 
never hear about that and will just use the default behavior.

Concerning mmap performances, dlmalloc has a pool mechanism and Python has its 
own pool mechanism on top of that.
As a result, system calls to allocate memory do not happen frequently since the 
memory allocation is usually handled internally in those pools and dlmalloc is 
often faster than the native malloc.

I have been distributing a version of Python which integrates this patch with 
the application on which I work to various customers for the last few years and 
the benchmarks have not shown any significant performance degradation. On the 
other hand, the decrease in memory consumption has been clearly noticed and 
appreciated.

Also note that dlmalloc (or a derivative - ptmalloc) is part of GNU glibc which 
is used by most Linux systems, and is what you get when you call malloc.
http://en.wikipedia.org/wiki/Malloc#dlmalloc_and_its_derivatives

So by using dlmalloc on SunOS and AIX you would get the same level of 
performance for memory operations that you already probably can appreciate on 
Linux systems.

--

___
Python tracker 

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



[issue11923] gcc: unrecognized option '-n32'

2011-04-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
resolution:  -> invalid

___
Python tracker 

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



[issue11923] gcc: unrecognized option '-n32'

2011-04-26 Thread Paul Griffith

Paul Griffith  added the comment:

I found the problem, it is with my system. In the past we used to support SGI 
hosts and I had the SGI_ABI environmental variable set to -n32.


Please consider this issue closed.

--
status: open -> closed

___
Python tracker 

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



[issue11923] gcc: unrecognized option '-n32'

2011-04-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> CFAGS and friends are not set.

How about LDFLAGS?

By the way, the build should have succeeded anyway: the "python" executable 
should be at the root of your build directory.

--

___
Python tracker 

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



[issue11923] gcc: unrecognized option '-n32'

2011-04-26 Thread Paul Griffith

Paul Griffith  added the comment:

Here is the config.log file!

--
Added file: http://bugs.python.org/file21783/config.log

___
Python tracker 

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



[issue11923] gcc: unrecognized option '-n32'

2011-04-26 Thread Paul Griffith

Paul Griffith  added the comment:

I have included the config.log file and a script of configure and make process. 
CFAGS and friends are not set.

--
Added file: http://bugs.python.org/file21782/typescript.python-2.7.1

___
Python tracker 

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



[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-04-26 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Updated the NEWS entry.

--
status: open -> closed

___
Python tracker 

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



[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1b261f3bef09 by Senthil Kumaran in branch '2.7':
Update NEWS for Issue11236.
http://hg.python.org/cpython/rev/1b261f3bef09

--

___
Python tracker 

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



[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f799530dbde7 by Senthil Kumaran in branch '3.1':
Update News entry for Issue11236
http://hg.python.org/cpython/rev/f799530dbde7

--

___
Python tracker 

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



[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-04-26 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I have made the changes in 3.3,3.2,3.1 and 2.7 codeline. The behavior is 
aligned with the 2.5 (and earlier) behaviors. I cannot change this 2.6 because 
this is not a security issue to be back-ported. (rather it was misinterpreted 
problem and resulted in changed behavior in 2.6). 

I shall update this in README file just that people note this change

--
resolution:  -> fixed
stage: test needed -> committed/rejected
type:  -> behavior

___
Python tracker 

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



[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a3b4887edba4 by Senthil Kumaran in branch '2.7':
issue11236 getpass.getpass to respond ctrl-c or ctrl-z
http://hg.python.org/cpython/rev/a3b4887edba4

--

___
Python tracker 

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



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Sijin Joseph

Sijin Joseph  added the comment:

@Amaury - That sounds exactly like the issue described.

To summarize the error is caused because in some versions of windows there is a 
bug that causes the handles to stdin/stdout to not be inherited correctly for 
apps run from the console "via file association".

This is the kb article, http://support.microsoft.com/default.aspx?kbid=321788

In fact looks like this issue was discussed in the Python mailing list in 2004 
as well, see 
http://mail.python.org/pipermail/python-bugs-list/2004-August/024923.html

--

___
Python tracker 

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



[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-04-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 154b323e0e7f by Senthil Kumaran in branch '3.1':
Fix for issue11236 getpass.getpass to respond ctrl-c or ctrl-z
http://hg.python.org/cpython/rev/154b323e0e7f

--

___
Python tracker 

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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-26 Thread Sijin Joseph

Sijin Joseph  added the comment:

@Ezio - help(True), help(False) and help(None) all return the correct 
documentation for me using latest trunk. I think the quotes around True, False 
and None might be throwing things off in your case.

--

___
Python tracker 

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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-26 Thread Sijin Joseph

Sijin Joseph  added the comment:

Should True, False and None be keywords? Technically True and False are objects 
of type bool, in fact the only objects of that type allowed. And None is a 
specially designated object as well.

P.S: Can anyone point me to where the help function is defined in the source?

--
nosy: +sijinjoseph

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-26 Thread Vinay Sajip

Vinay Sajip  added the comment:

Also:

http://plumberjack.blogspot.com/2010/09/using-logging-with-multiprocessing.html

--

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-26 Thread Vinay Sajip

Vinay Sajip  added the comment:

For other options you might like to consider, see:

http://plumberjack.blogspot.com/2010/09/improved-queuehandler-queuelistener.html

which refers to QueueHandler and QueueListener classes. These were added in 3.2 
but are available for Python 2.x:

http://code.google.com/p/logutils/

--

___
Python tracker 

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



[issue11882] test_imaplib failed on x86 ubuntu

2011-04-26 Thread R. David Murray

R. David Murray  added the comment:

So this is probably not a python problem at all, but a problem with your system 
c library time functions. time.mktime is a thin wrapper around the mktime libc 
call.  Perhaps you could write a short C program to test it?  I've added Barry 
as nosy since he has some interest in ubuntu issues.

--
nosy: +barry

___
Python tracker 

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



[issue11882] test_imaplib failed on x86 ubuntu

2011-04-26 Thread Kasun Herath

Kasun Herath  added the comment:

Yes problem seems to be with time.mktime(). Here is my output,

>>> calendar.timegm((2000, 1, 1, 0, 0, 0, -1, -1, -1))
946684800

>>> x = imaplib.Internaldate2tuple(b'25 (INTERNALDATE "01-Jan-2000 00:00:00 
>>> +")')

>>> x
time.struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=5, tm_min=30, 
tm_sec=0, tm_wday=5, tm_yday=1, tm_isdst=0)

>>> time.mktime(x)
946683000.0

--

___
Python tracker 

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



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This post: 
http://stackoverflow.com/questions/3018848/cannot-run-python-script-on-windows-with-output-redirected
suggests that there is a difference between "python test.py > out.log" and 
"test.py > out.log".
It also suggests a change in the registry that fixed the problem for me some 
months ago. Can you try it?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac

2011-04-26 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Piotr Sikora wrote:
> 
> Piotr Sikora  added the comment:
> 
> It's the same on OpenBSD (and I'm pretty sure it's true for other BSDs as 
> well).
> 
 locale.resetlocale()
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/usr/local/lib/python2.6/locale.py", line 523, in resetlocale
> _setlocale(category, _build_localename(getdefaultlocale()))
> locale.Error: unsupported locale setting
 locale._build_localename(locale.getdefaultlocale())
> 'en_US.UTF8'
> 
> Works fine with Marc-Andre's alias table fix.
> 
> Any chances this will be eventually fixed in 2.x?

This can go into Python 2.7, and, of course, into the 3.x
branches.

--
title: locale.normalize strips "-" from UTF-8, which fails on Mac -> 
locale.normalize strips "-" from UTF-8,which fails on Mac

___
Python tracker 

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



[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-26 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Would be possible to publish a notice in "python insider" blog?.Enigmail

--

___
Python tracker 

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



[issue10517] test_concurrent_futures crashes with "--with-pydebug" on RHEL5 with "Fatal Python error: Invalid thread state for this thread"

2011-04-26 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> Not necessarily. You can have several interpreters (and therefore several 
> thread states) in a single thread, using Py_NewInterpreter(). It's used by 
> mod_wsgi and probably other software. If you overwrite the old value with the 
> new one, it may break such software.
>

OK, I didn't know. Better not to change that in that case.

> Would it be possible to cleanup the autoTLS mappings in PyOS_AfterFork() 
> instead?
>

Well, after fork, all threads have exited, so you'll be running on the
behalf of the child process' main - and only - thread, so by
definition you can't access other threads' thread-specific data, no?
As an alternate solution, I was thinking of calling
PyThread_delete_key_value(autoTLSkey) in the path of thread bootstrap,
i.e. starting in Modules/_threadmodule.c t_bootstrap. Obviously, this
should be done before calling _PyThreadState_Init, since it can also
be called from Py_NewInterpreter.
The problem is that it would require exporting autoTLSkey whose scope
is now limited to pystate.c (we could also create a small wrapper
function in pystate.c to delete the autoTLSkey, since it's already
done in PyThreadState_DeleteCurrent and PyThreadState_Delete).

--

___
Python tracker 

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



[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-26 Thread Piéronne Jean-François

Piéronne Jean-François  added the comment:

How can we help you ?

--

___
Python tracker 

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