[issue12273] Change ast.__version__ calculation to provide consistent ordering

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b23ad0a6cf87 by Benjamin Peterson in branch 'default':
remove ast.__version__ (closes #12273)
http://hg.python.org/cpython/rev/b23ad0a6cf87

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

___
Python tracker 

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



[issue12533] python-celementtree prevents me from running python develop.py to compile Imprudence Viewer

2011-07-15 Thread Kristoffer Grundström

Kristoffer Grundström  added the comment:

Here's the link to the Imprudence bugzilla: 
http://redmine.kokuaviewer.org/issues/1025

--

___
Python tracker 

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



[issue12574] Documentation for Queue in 2.x has an incorrect title

2011-07-15 Thread Rafe Kettler

New submission from Rafe Kettler :

The documentation for Queue in all versions of Python 2.7 and 2.6 (see 
http://docs.python.org/release/2.6.7/library/queue.html#module-Queue for the 
2.7 docs) has the title "queue -- A synchronized queue class." The module, 
however, is named "Queue" in all of 2.x. So, while the title is appropiate for 
3.x, it's incorrect for 2.x.

I can make a patch, as well.

--
assignee: docs@python
components: Documentation
messages: 140475
nosy: docs@python, rafe.kettler
priority: normal
severity: normal
status: open
title: Documentation for Queue in 2.x has an incorrect title
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue12540] "Restart Shell" command leaves pythonw.exe processes running

2011-07-15 Thread Georg Brandl

Changes by Georg Brandl :


--
nosy: +ned.deily

___
Python tracker 

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



[issue12558] Locale-dependent exception for float width argument to Tkinter widget constructor

2011-07-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: Locale-dependent crash for float width argument to Tkinter widget 
constructor -> Locale-dependent exception for float width argument to Tkinter 
widget constructor

___
Python tracker 

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



[issue12540] "Restart Shell" command leaves pythonw.exe processes running

2011-07-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I just 'upgraded' to 3.2.1 on my XP machine and I see the same with F5-run, 
which restarts before running the saved file. This appears to be a nasty 
regression from 3.2.0 that should have been a release blocker if caught 
earlier. I believe it merits a quick re-release, once fixed, of either the 
Windows binary or Python itself depending on whether this is windows specific 
or not.

The normal behavior when starting IDLE is 2 pythonw.exe processes -- one to run 
IDLE itself and the other for the attached process that runs user code. 
Restart/Run starts a third process with a fresh interpreter for user code and 
the old, orphaned user process should and usually does disappear in 2-3 seconds 
(on my old, slow machine). (There are tracker issues about this not always 
happening when a runaway process is stopped with ^C, but is has always worked 
otherwise.) Each process appears to take about 10+Mb, so anyone doing rapid 
code/test iterations, as I sometimes do, could easily overfill physical memory. 
Closing the IDLE windows does not stop the detached processes, so they have to 
be killed 1 at a time with 3 clicks each or by rebooting. Neither is pleasant.

Although I should have 3.2.1 loaded at least for reviewing issues, I plan to 
revert to 3.2.0.

Victor: do you know of any way to test for process extinction on Windows?

--
nosy: +georg.brandl, haypo, kbk, loewis, terry.reedy
priority: normal -> critical
stage:  -> needs patch

___
Python tracker 

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



[issue11343] Make errors due to full parser stack identifiable

2011-07-15 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



[issue12531] documentation index entries for * and **

2011-07-15 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



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

2011-07-15 Thread Garen

Changes by Garen :


--
nosy: +Garen

___
Python tracker 

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



[issue12573] add resource checks for dangling threads and processes

2011-07-15 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue12573] add resource checks for dangling threads and processes

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2bedea96de60 by Antoine Pitrou in branch '3.2':
Issue #12573: Add resource checks for dangling Thread and Process objects.
http://hg.python.org/cpython/rev/2bedea96de60

New changeset 86dc49fbf4af by Antoine Pitrou in branch 'default':
Issue #12573: Add resource checks for dangling Thread and Process objects.
http://hg.python.org/cpython/rev/86dc49fbf4af

--
nosy: +python-dev

___
Python tracker 

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



[issue12573] add resource checks for dangling threads and processes

2011-07-15 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This patch adds resource checks for dangling Thread and Process objects to the 
test suite runner. This should make it easier to spot the cause of some 
potential sporadic reference leaks.

--
components: Tests
files: dangling.patch
keywords: patch
messages: 140472
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: add resource checks for dangling threads and processes
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file22673/dangling.patch

___
Python tracker 

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



[issue12535] Chained tracebacks are confusing because the first traceback is minimal

2011-07-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I agree with Nick's rationale for the current order, and also like his idea of 
indicating that the first traceback is truncated (which has not been completely 
obvious to me). Bike-shedding a bit, I would prefer something more like:

Truncated traceback of caught exception:

The '(most recent call last)' bit is nonsensical when only the most recent call 
is given.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue11343] Make errors due to full parser stack identifiable

2011-07-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Oh, I see Martin disagrees. SyntaxError is raised for anything which Python 
won't compile. For example, too many arguments gets a SyntaxError.

--

___
Python tracker 

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



[issue11343] Make errors due to full parser stack identifiable

2011-07-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Just make it a SyntaxError.

--

___
Python tracker 

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



[issue12533] python-celementtree prevents me from running python develop.py to compile Imprudence Viewer

2011-07-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The pastebin link gives me a blank box. In any case, a one-month retention does 
not work for the tracker. If you do get an error traceback indicating an error 
in CPython or its library, post it here. However, your post so far strongly 
suggests that the error is elsewhere, so we will close this in a week or so if 
nothing concrete is added.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

Terry - I apologize for jumping the gun a bit, and let me be a bit more clear.  
When I realized that the HP/UX compiler was going to have as many problems as 
it does compiling python 3, I decided it would be best to create a single issue 
for all of the compiler issues.  In retrospect, opening an issue for the single 
compiler bug discussed in issue 12561 was a mistake, and I had hoped to migrate 
the discussion of that issue here.

--

___
Python tracker 

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



[issue12531] documentation index entries for * and **

2011-07-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is just the tip of the iceberg as far as needed symbol index entries goes. 
Nearly 3 years ago, I wrote a Python 3 symbol glossary "Python3 Syntax Symbol 
Uses" that was complete as far as I knew then. I think most of the entries 
there should have a corresponding index entry in the official docs. Link to 
download/view is

https://code.google.com/p/xploro/downloads/detail?name=PySymbols.html&can=1&q=

That has 7 entries for '*':
  *: In function parameter list, make following unstarred names keyword only.
P *parameter_name: Function parameter bound to a tuple of extra positional 
arguments, any following unstarred names are keyword only.
P *iterable: In a call, unpack iterable items as arguments.
P *assignment_target: Starred target in assignment statement gets extra items 
from iterable.
I number1 * number2: Number multiplication operator.
I n * sequence or sequence * n: Operator to concatenate n copies of sequence.
S from module import *: Import all public (non-private) names from the module. 

 /P/I/S == 'nofix', prefix, infix, suffix.

I have been planning to work on a patch 'sometime', but would be happy if 
someone else grabbed the above and ran with it (and expanded the title of this 
issue).

I believe existing docs can get additions like this.

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

___
Python tracker 

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



[issue11603] Python crashes or hangs when rebinding __repr__ as __str__

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Should be fixed, now, thank you!

--
nosy: +pitrou
resolution:  -> fixed
stage: test needed -> committed/rejected
status: open -> closed
versions:  -Python 2.6

___
Python tracker 

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



[issue11603] Python crashes or hangs when rebinding __repr__ as __str__

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset cd9eca1bf531 by Antoine Pitrou in branch '2.7':
Issue #11603: Fix a crash when __str__ is rebound as __repr__.
http://hg.python.org/cpython/rev/cd9eca1bf531

--

___
Python tracker 

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



[issue11603] Python crashes or hangs when rebinding __repr__ as __str__

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b488e027c952 by Antoine Pitrou in branch '3.1':
Issue #11603: Fix a crash when __str__ is rebound as __repr__.
http://hg.python.org/cpython/rev/b488e027c952

New changeset 8b52ac4a0c9f by Antoine Pitrou in branch '3.2':
Issue #11603: Fix a crash when __str__ is rebound as __repr__.
http://hg.python.org/cpython/rev/8b52ac4a0c9f

New changeset 0a040aa9bb34 by Antoine Pitrou in branch 'default':
Issue #11603: Fix a crash when __str__ is rebound as __repr__.
http://hg.python.org/cpython/rev/0a040aa9bb34

--
nosy: +python-dev

___
Python tracker 

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



[issue12559] gzip.open() needs an optional encoding argument

2011-07-15 Thread Daniel Urban

Daniel Urban  added the comment:

> If we go this way, the "errors" and "newline" argument should be added
> as well.

Yeah, I thought about that. I can make a new patch, that implement this, if 
needed. Though it seems there is a real problem, the one that Amaury Forgeot 
d'Arc mentioned. I can't think of a way to solve it in a backwards compatible 
way.

--

___
Python tracker 

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



[issue11627] segfault raising an arbitrary object as an exception

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 45b1ae1ef318 by Benjamin Peterson in branch '2.7':
port 8d05f697acd4 (#11627)
http://hg.python.org/cpython/rev/45b1ae1ef318

--

___
Python tracker 

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



[issue11627] segfault raising an arbitrary object as an exception

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8d05f697acd4 by Benjamin Peterson in branch '3.2':
catch nasty exception classes with __new__ that doesn't return a exception 
(closes #11627)
http://hg.python.org/cpython/rev/8d05f697acd4

New changeset bc1fbd6f667a by Benjamin Peterson in branch 'default':
merge 3.2 (#11627)
http://hg.python.org/cpython/rev/bc1fbd6f667a

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

___
Python tracker 

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



[issue11321] 9th import of module _pickle always crashes

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Should be fixed now, thank you!

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 3.1

___
Python tracker 

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



[issue11321] 9th import of module _pickle always crashes

2011-07-15 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1ae0b7b8de0b by Antoine Pitrou in branch '3.2':
Issue #11321: Fix a crash with multiple imports of the _pickle module when
http://hg.python.org/cpython/rev/1ae0b7b8de0b

New changeset 6674272754da by Antoine Pitrou in branch 'default':
Issue #11321: Fix a crash with multiple imports of the _pickle module when
http://hg.python.org/cpython/rev/6674272754da

--
nosy: +python-dev

___
Python tracker 

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



[issue11770] inspect.dir_static

2011-07-15 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: needs patch -> patch review
type: behavior -> feature request

___
Python tracker 

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



[issue11813] inspect.getattr_static doesn't get module attributes

2011-07-15 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review

___
Python tracker 

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



[issue11829] inspect.getattr_static code execution with meta-metaclasses

2011-07-15 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +ncoghlan
stage:  -> patch review

___
Python tracker 

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



[issue12570] BaseHTTPServer.shutdown() locks if the last request 404'd

2011-07-15 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue11824] freeze.py broken due to ABI flags

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Barry?

Additionally, if would be nice if we got some tests for the "freeze" tool, 
otherwise I fear we will keep breaking it.

--
nosy: +pitrou
priority: normal -> high
stage:  -> patch review

___
Python tracker 

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



[issue11343] Make errors due to full parser stack identifiable

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This looks like a rather good idea, although I'm not sure it deserves a new 
global exception type.

--
nosy: +benjamin.peterson, ncoghlan, pitrou
stage:  -> patch review

___
Python tracker 

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



[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2011-07-15 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2011-07-15 Thread Nasos Dousis

Nasos Dousis  added the comment:

Ronald,

Thanks much for your help and insight.  I tried the patch but unfortunately it 
didn't work for me-- this might be because I have Python extensions written in 
C++.

Any other suggestions?  Should I wait for the next version of boost.python?

Thanks and regards,
Nasos

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

>The fileutils.patch patch attached to this issue directly addresses what's 
>wrong in issue 5999; I'd consider it closed, ...

When an patch is committed that fixes that issue, say so there and I or someone 
will close it.

>From issue 12561 (which I will be closing):...
so Stinner's commit is overkill for me.

Issues sometimes expand beyond the original request. It is unclear to me 
whether Victor thinks that that issue is finished. If he thinks more should be 
done, then I think it should be left open.

--

___
Python tracker 

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



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-07-15 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Attached a patch against 2.7. It adds Ben's example as a test case, and his 
one-line change to the _parseparam helper function to fix the issue.

--
components: +Library (Lib)
keywords: +needs review, patch
nosy: +petri.lehtinen
stage:  -> patch review
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file22672/issue12529.patch

___
Python tracker 

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



[issue1626300] 'Installing Python Modules' does not work for Windows

2011-07-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

On Windows, scripts run with whatever name -- no extension or other extensions. 
I have tested this from both IDLE and command line.

--

___
Python tracker 

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



[issue12167] test_packaging reference leak

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I’ve also made a patch to register the caches used by
> packaging.database with the regrtest unclean environment warning; can
> someone review it?

I would call .copy() on the original dicts rather than remembering an
explicit empty dict.

--

___
Python tracker 

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



[issue12551] Provide data for TLS channel binding

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> This patch is functionally equivalent, but advertises 'tls-unique'
> support in a bit different way.
> 
> HAS_TLS_UNIQUE is not exposed in the python 'ssl' module, instead a
> list 'CHANNEL_BINDING_TYPES' is provided (empty when 'tls-unique' is
> not supported). get_channel_binding raises ValueError if the argument
> is not on this list. This way the API can be extended to other channel
> binding types without adding new constants or functions. Adding a new
> channel binding type would not need any modifications in the API
> client code (if it is designed to use arbitrary cb types).

Thanks, this is a good idea. I'm trying to get advice on the
openssl-users mailing-list about this and will commit if I don't get any
contradicting info soon ;)

--

___
Python tracker 

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



[issue12524] change httplib docs POST example

2011-07-15 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

There's also http://httpstat.us/. You can send any request (also POST) to 
http://httpstat.us/200 and it gives you a 200 OK response.

I recall seeing other similar services, but didn't find them quickly.

--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-07-15 Thread Dave Malcolm

Dave Malcolm  added the comment:

FWIW, I've filed a bug about this issue for Fedora 15's python3 package here: 
https://bugzilla.redhat.com/show_bug.cgi?id=722578

Looks like this has led to an extra .pyc in the old location for every Python 3 
.py file in Fedora 15's various python3-* rpm packages (as generated by 
distutils).  

rpm's post-processing has been generating .pyc files in the (correct) 
__pycache__ location (via rpmbuild's brp-python-bytecompile script, which uses 
"compileall").

For examples, see that Fedora bug report; so far it's affected every built rpm 
I've looked at.

I believe the impact of the extra .pyc files is merely wasted disk space within 
our rpm-packaged Python 3.2 stack.

I'm thinking of applying the patch to our downstream python3.src.rpm

--
nosy: +dmalcolm

___
Python tracker 

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



[issue12556] Disable size checks in mmap.mmap()

2011-07-15 Thread Charles-François Natali

Charles-François Natali  added the comment:

A couple remarks:
- if st_size == 0, then you have to specify an explicit length (your example 
passes 0, which would fail with EINVAL without the check)
- most enties in /proc don't support mmap file operation, so it's likely to 
fail anyway (with ENODEV, EACCESS...). Do you have an example of a /proc entry 
with st_size == 0 that can be mmapped (mapping /proc/sys/debug/exception-trace 
fails with EACCESS)?

> How about adding a keyword argument to `mmap.mmap()`, which disables
> fstat-based size checks?

I don't like the idea of adding an argument which doesn't have a counterpart in 
the POSIX version (especially to address such corner cases).

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

Update to getpath.patch (issue 12561) - this version uses _Py_char2wchar where 
possible.  Unfortunately, as lib_python is declared and defined statically, 
this can't be used in both cases where the HP/UX compiler has issues.

--
Added file: http://bugs.python.org/file22671/getpath.patch

___
Python tracker 

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



[issue12561] Compiler workaround for wide string constants in Modules/getpath.c (patch)

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

Constant initializers are required to be constants, not function calls, so 
_Py_char2wchar cannot be used in the definition of lib_python (line #138 of 
Modules/getpath.c).

--

___
Python tracker 

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



[issue12526] packaging.pypi.Crawler and resulting objects have a circular API

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report.  I noticed similar strangeness in the API when working 
on the documentation.  Alexis is quite busy these weeks, but he will with no 
doubt comment on this later.

I’m not sure the force argument is a good idea; I think we should ask ourselves 
what is the behavior that would be most intuitive for users, and implement 
that.  If there are performance or caching issues, we’ll see.

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

Minor note: we prefer unified diffs, and when possible, all related changes in 
one file.  See http://docs.python.org/devguide/

I can’t review the patches, as I don’t know C nor HP/UX.  I’m not sure why you 
opened this report instead of following on the other one :)

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

>From issue 12561 (which I will be closing):

Author: STINNER Victor (haypo) *  Date: 2011-07-15 15:36  
Use >L"" CONSTANT< to decode a byte string to a character string doesn't work 
with non-ASCII strings. _Py_char2wchar() should be used instead: see for 
example this fix, commit 5b6e13b6b473. 

This is in reference to getpath.patch.  I have no need to support 
internationalized versions of the constant strings my patch addresses, so 
Stinner's commit is overkill for me.

--

___
Python tracker 

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



[issue12561] Compiler workaround for wide string constants in Modules/getpath.c (patch)

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

> Stinner - is the patch you mentioned in a released version
> of Python 3.2?

Yes, Python 3.2.1. (It's not part of Python 3.1.)

> Also, how is it affected by the fact that the (wide char) strings
> in question are constants?

I don't remember exactly. My patch uses the locale encoding at runtime instead 
of using the locale encoding of the compiler. See issue #6011 for the details.

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

I'm adding the original listeners for issue 5999 to this one.

The fileutils.patch patch attached to this issue directly addresses what's 
wrong in issue 5999; I'd consider it closed, but as I didn't open it, and I'm 
not actually part of the python project, that's not my call to make.

--
nosy: +eric.araujo, loewis, srid, terry.reedy

___
Python tracker 

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



[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-15 Thread Éric Araujo

Changes by Éric Araujo :


--
hgrepos: +42

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

The HP/UX C compiler grumbles when a symbol that is declared static is later 
defined without the static storage class specifier.  The attached patch just 
adds the missing "static" keywords.

--
Added file: http://bugs.python.org/file22670/Python-ast.patch

___
Python tracker 

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



[issue12141] sysconfig.get_config_vars('srcdir') fails in specific cases

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

BTW, doesn’t the change to Makefile.pre.in need to be ported to the MSI build 
system too?

--

___
Python tracker 

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



[issue1626300] 'Installing Python Modules' does not work for Windows

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

In distutils docs, I’ve mentioned “setup.py thing” as an alternative to “python 
setup.py thing” on Windows.  For packaging, the situation is different: there 
is no local script anymore, people will have to invoke the global pysetup 
command.  Would it work if I add a note like this:

  In order to run pysetup commands, you need to add the Python Scripts
  directory to your PATH *include link to relevant section of
  docs.python.org/using*.

BTW, do scripts work without file extensions, or does the installer add .py?  
If it’s the latter, then my doc note will need to mention that too.

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

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

Sorry - last comment should have been "compiler refuses to past*e*", not "past".

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

This patch just reduces compiler noise by explicitly casting pointers to void 
*.  I expect the Visual Studio C/C++ compiler suite also issued these warnings, 
too.

--
Added file: http://bugs.python.org/file22669/typeobject.patch

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

I think that getpath.patch is wrong (it's just a workaround hiding a real bug): 
see msg140422 of the issue #12561.

--

___
Python tracker 

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



[issue6743] Add function compatible with print to pprint module

2011-07-15 Thread Éric Araujo

Changes by Éric Araujo :


--
title: pprint.pprint should support no objects to print blank lines & allow 
args -> Add function compatible with print to pprint module

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

Workaround for compiler bug; HP/UX compiler refuses to past (implicitly char *) 
string constants with wide (wchar_t *) string constants.  This patch is also 
pasted to issue 12561 (which should be closed).

Note:  There is disagreement as to the best way to proceed on this issue.  
Stinner (aka haypo) has a patch that should work with non ASCII character sets, 
and my patch will almost certainly not work in those cases.  YMMV.

--
Added file: http://bugs.python.org/file22668/getpath.patch

___
Python tracker 

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



[issue6743] pprint.pprint should support no objects to print blank lines & allow args

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

Here’s a first draft at a patch.  I’ve added a module-level print function and 
a PrettyPrinter.print method which does the real work.

The functions have a signature compatible with print, but I have changed one 
default value: sep defaults to ',\n', because I think that the output is more 
useful and more pleasing (otherwise you’d have strange-looking indentation with 
containers).

If this looks good, I’ll work on doc and tests.  I guess I’ll reuse the helpers 
in test_print.

--
keywords: +patch
stage:  -> needs patch
Added file: http://bugs.python.org/file22667/pprint-print.diff

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

Oops. You may *add* the number of this issue in a comment of your patch.

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

You may the number of this issue in a comment of your patch.

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

This patch works around the problem underlying issue 5999 by making sure the 
__STDC_VERSION__ macro is defined and has a value of at least 199901

--
Added file: http://bugs.python.org/file22666/fileutils.patch

___
Python tracker 

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



[issue12167] test_packaging reference leak

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

It looks like we don’t have refleaks anymore!  I still have one question.

Victor reported some time ago that packaging.util._path_created was a cache 
that was never cleared; I fixed that in 27a70dfc38cc, but recently I’ve found 
that regrtest itself clears the similar distutils.util._path_created; I wonder 
which approach is better: one global cleaning in regrtest or piecemeal cleanup 
in each leaking test case?

I’ve also made a patch to register the caches used by packaging.database with 
the regrtest unclean environment warning; can someone review it?

--
Added file: http://bugs.python.org/file22665/packaging-caches.diff

___
Python tracker 

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



[issue12417] Inappropriate copyright on profile files

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t have clones of 2.6 and 3.1, so Benjamin, would you commit this?

--
status: closed -> open

___
Python tracker 

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



[issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type

2011-07-15 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

I am collecting HP/UX compiler workarounds in issue 12572.  I will be adding 
patches to it as I produce them, including a patch to fix this on HP/UX.

--

___
Python tracker 

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



[issue9408] curses: Link against libncursesw instead of libncurses

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

For the record, I filed the following bug against Mageia's libreadline:
https://bugs.mageia.org/show_bug.cgi?id=2156

--
nosy: +pitrou

___
Python tracker 

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



[issue12561] Compiler workaround for wide string constants in Modules/getpath.c (patch)

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

I am collecting HP/UX compiler bug workarounds in issue 12572.

Stinner - is the patch you mentioned in a released version of Python 3.2?  
Also, how is it affected by the fact that the (wide char) strings in question 
are constants?

--

___
Python tracker 

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



[issue12572] HP/UX compiler workarounds

2011-07-15 Thread Jim Schneider

New submission from Jim Schneider :

The C compiler that comes with HP/UX 11 has some shortcomings that prevent 
building Python 3.2.1 out of the box.  I am attaching patches here as I work 
through issues.

The first patch fixes namespace shortcomings when trying to use struct termios.

--
components: Build
files: termios.patch
keywords: patch
messages: 140423
nosy: jschneid
priority: normal
severity: normal
status: open
title: HP/UX compiler workarounds
type: compile error
versions: Python 3.2
Added file: http://bugs.python.org/file22664/termios.patch

___
Python tracker 

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



[issue12561] Compiler workaround for wide string constants in Modules/getpath.c (patch)

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

Use >L"" CONSTANT< to decode a byte string to a character string doesn't work 
with non-ASCII strings. _Py_char2wchar() should be used instead: see for 
example this fix, commit 5b6e13b6b473.

--
nosy: +haypo

___
Python tracker 

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



[issue12571] Python built on Linux 3.0 doesn't include DLFCN

2011-07-15 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue1813] Codec lookup failing under turkish locale

2011-07-15 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue12561] Compiler workaround for wide string constants in Modules/getpath.c (patch)

2011-07-15 Thread Jim Schneider

Jim Schneider  added the comment:

I am attaching an updated patch.  This version specifically checks for __hpux, 
and the macro name has been changed to avoid clashing with other uses.

--
Added file: http://bugs.python.org/file22663/getpath.patch

___
Python tracker 

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



[issue6786] readline and zero based indexing

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

> I'd be writing a patch which would allow a programmer the option to
> explicitly use/instantiate the library in a zero-based way. [...]
> Would this be reasonable?

I think not.  Mark already stated his opposition to “a crazy level of micro 
control”.  Such a patch would not be trivial but would not bring much.

I hope you’ll find other bugs that motivate you for a patch! :)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue3177] Add shutil.open

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

>> dependencies: + Finding programs in PATH, adding shutil.which
> Why did you add this dependency? For example, subprocess is able to
> locate a program if the program has no full path. We don't need a
> which function.

While the Windows API call is part of Windows and the open program always 
present on Mac OS X, xdg-open is an optional program on free OSes, so I thought 
we’d need shutil.which to look before we leap.  The alternative is to call 
Popen(['xdg-open', etc.]) and check if we get ENOENT, but I don’t know if this 
would be non-ambiguous (for example, do we get ENOENT if xdg-open exists but 
not the file?).

A related question: what to do when we’re not on Windows nor Mac and xdg-open 
doesn’t exist?  Raise NotImplemented?

--

___
Python tracker 

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



[issue3177] Add shutil.open

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

See also lengthy discussion on #1301512.

--

___
Python tracker 

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



[issue1301512] desktop module (providing startfile as open, all platforms)

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

This was proposed anew as #3177.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue3177] Add shutil.open

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

> dependencies: + Finding programs in PATH, adding shutil.which

Why did you add this dependency? For example, subprocess is able to locate a 
program if the program has no full path. We don't need a which function.

--
nosy: +haypo

___
Python tracker 

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



[issue444582] Finding programs in PATH, adding shutil.which

2011-07-15 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue3177] Add shutil.open

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

> as long as it's implemented and it's in the standard library, and
> people don't have to use subprocess to run open or xdg-open themselves
> as I currently do.

This new function would call os.startfile on Windows, xdg-open where 
applicable, and open on Mac OS X (using a subprocess for these last two).

I found the python-ideas thread: 
http://mail.python.org/pipermail/python-ideas/2011-July/010674.html
There was only limited support.

--
dependencies: +Finding programs in PATH, adding shutil.which
title: implement os.startfile on posix and MacOSX -> Add shutil.open

___
Python tracker 

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



[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-15 Thread Éric Araujo

Éric Araujo  added the comment:

FTR, some assertions about GC are embedded in the tests, for example test_set.

--

___
Python tracker 

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



[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Done.

2011/7/15 Michael Foord :
>
> Michael Foord  added the comment:
>
> I wouldn't object to having a cyclic reference test for TestCase, although if 
> it ever becomes a problem for the development of unittest we may have to 
> disable it again. I think Benjamin said he would like to modify the test from 
> Martin's patch.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

> ... I suppose that it's because readline is linked to libncurses
> (and not libncursesw) => see issue #7384.

See also the issue #9408.

--

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2011-07-15 Thread Éric Araujo

Changes by Éric Araujo :


--
title: Add mechanism to diasable optimizations -> Add mechanism to disable 
optimizations

___
Python tracker 

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



[issue12567] curses implementation of Unicode is wrong in Python 3

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

> by the way: do all platforms have wide character functions?

See msg140408 and msg140409: Antoine Pitrou (OS=Mageia 1) and some buildbots 
don't have get_wch().

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

> implicit declaration of function ‘wget_wch’

Oh oh, I expected such error: it means that your ncurses library don't have the 
wide character API. The compiler command confirm that: "gcc ... -lncurses ...". 
You use libncurses and not libncursesw.

Antoine told me that libncursesw is available on its OS, but Python chose 
libncurses. I suppose that it's because readline is linked to libncurses (and 
not libncursesw) => see issue #7384.

Antoine setup is not rare: many Linux distro link readline to libncurses, and 
so Python cannot use libncursesw.

For this issue, it's not a problem: we can just add a test to check if get_wch 
is available or not, and only define the Python function if the C function does 
exist. But for #12567, it's a bigger problem because it means that we cannot 
always use the wide character functions if the argument is Unicode 
(character/string).

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Also compilation warnings on some buildbots:

/var/lib/buildslave/3.x.murray-gentoo-wide/build/Modules/_cursesmodule.c: In 
function 'PyCursesWindow_Get_WCh':
/var/lib/buildslave/3.x.murray-gentoo-wide/build/Modules/_cursesmodule.c:919: 
warning: implicit declaration of function 'wget_wch'
/var/lib/buildslave/3.x.murray-gentoo-wide/build/Modules/_cursesmodule.c:926: 
warning: implicit declaration of function 'mvwget_wch'

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

/home/antoine/cpython/default/Modules/_cursesmodule.c: In function 
‘PyCursesWindow_Get_WCh’:
/home/antoine/cpython/default/Modules/_cursesmodule.c:919:9: attention : 
implicit declaration of function ‘wget_wch’
/home/antoine/cpython/default/Modules/_cursesmodule.c:926:9: attention : 
implicit declaration of function ‘mvwget_wch’
gcc -pthread -shared 
build/temp.linux-x86_64-3.3-pydebug/home/antoine/cpython/default/Modules/_cursesmodule.o
 -L/usr/local/lib -lncurses -o 
build/lib.linux-x86_64-3.3-pydebug/_curses.cpython-33dm.so
*** WARNING: renaming "_curses" since importing it failed: 
build/lib.linux-x86_64-3.3-pydebug/_curses.cpython-33dm.so: undefined symbol: 
mvwget_wch
*** WARNING: importing extension "_curses_panel" failed with : initialization of _curses_panel raised unreported exception

Failed to build these modules:
_curses_curses_panel

--
nosy: +pitrou
status: closed -> open

___
Python tracker 

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



[issue12559] gzip.open() needs an optional encoding argument

2011-07-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

If we go this way, the "errors" and "newline" argument should be added as well.

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

___
Python tracker 

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



[issue12567] curses implementation of Unicode is wrong in Python 3

2011-07-15 Thread Nicholas Cole

Nicholas Cole  added the comment:

I think that some platforms do not have wide character support, though I could 
be wrong.  The FAQ here: http://invisible-island.net/ncurses/ncurses.faq.html  
has a list of those that do and those that don't, but I don't know how up to 
date it is.

--

___
Python tracker 

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



[issue12567] curses implementation of Unicode is wrong in Python 3

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, by the way: do all platforms have wide character functions? I don't see any 
failure on our Python 3.x buildbots, but test_curses is skipped on many 
buildbots.

--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2011-07-15 Thread Christian Hofstaedtler

Changes by Christian Hofstaedtler :


--
nosy: +zeha

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

> I see it has been moved to "committed/rejected"
> status - does that mean that it might still go in, or that
> it is rejected?

I commited the new method, did you see my commit dec10ad41b2a?

I propose to continue the discussion on issue #12567 (for example, to decide if 
we need unget_wch or not).

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-07-15 Thread Nicholas Cole

Nicholas Cole  added the comment:

> Nobody wanted to take the responsability of the choice for get_wch(): add a 
> new method or patch getch() ;-)

I suspect that a new method is the right way to go, here.  

I see it has been moved to "committed/rejected" status - does that mean that it 
might still go in, or that it is rejected?

> I think that the Unicode support of curses in Python 3 is just completly 
> broken

It certainly is less than ideal. ;-)

--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2011-07-15 Thread Nicholas Cole

Changes by Nicholas Cole :


--
nosy: +Nicholas.Cole

___
Python tracker 

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

2011-07-15 Thread Nir Aides

Nir Aides  added the comment:

Here is a morning reasoning exercise - please help find the flaws or refine it:


5) Sanitizing worker threads in the multiprocessing module

Sanitizing a worker thread in the context of this problem is to make sure it 
can not create a state that may deadlock another thread that calls fork(); or 
in other words fork-safe.
Keep in mind that in Python os.fork() is never called from a POSIX signal 
handler.
So what are examples of a fork-safe thread?

a) A thread that spins endlessly doing nothing in a C for(;;) loop is safe.

Another thread may call fork() without restrictions.

b) A Python thread that only calls function that do not yield the GIL and that 
does not acquire locks that are held beyond a Python tick is safe.

An example for such a lock is a critical-section lock acquired by a lower level 
third party library for the duration of a function call.
Such a lock will be released by the time os.fork() is called because of the GIL.

c) A Python thread that in addition to (2) also acquires a lock that is handled 
at fork is safe.

d) A Python thread that in addition to (2) and (3) calls function that yield 
the GIL but while the GIL is released only calls async-signal-safe code.

This is a bit tricky. We know that it is safe for thread A to fork and call 
async-signal-safe functions regardless of what thread B has been doing, but I 
do not know that thread A can fork and call non async-signal-safe functions if 
thread B was only calling async-signal-safe functions.

Nevertheless it makes sense: For example lets assume it isn't true, and that 
hypothetical thread A forked while thread B was doing the async-signal-safe 
function safe_foo(), and then thread A called non async-signal-safe function 
unsafe_bar() and deadlocked.

unsafe_bar() could have deadlocked trying to acquire a lock that was acquired 
by safe_foo(). But if this is so, then it could also happen the other way 
around.
Are there other practical possibilities?

Either way, we could double check and white list the async-signal-safe 
functions we are interested in, in a particular implementation.

e) Socket related functions such as bind() accept() send() and recv(), that 
Python calls without holding the GIL, are all async-signal-safe.

This means that in principle we can have a fork-safe worker thread for the 
purpose of communicating with a forked process using a socket.

--

___
Python tracker 

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



[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-15 Thread Michael Foord

Michael Foord  added the comment:

I wouldn't object to having a cyclic reference test for TestCase, although if 
it ever becomes a problem for the development of unittest we may have to 
disable it again. I think Benjamin said he would like to modify the test from 
Martin's patch.

--

___
Python tracker 

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



[issue12569] sqlite3 segfaults and bus errors when given certain unicode strings as queries

2011-07-15 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The fix was c073f3c3276e (thanks to hg bisect)
the variable operation_cstr is not used before the call to 
pysqlite_cache_get(), which also tries to encode the statement into utf8 and 
correctly raises an exception.
In early 3.1.2, the segfault came from the DECREF of an uninitialized member...

--

___
Python tracker 

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



[issue1813] Codec lookup failing under turkish locale

2011-07-15 Thread STINNER Victor

STINNER Victor  added the comment:

The decimal module has been fixed in Python 2.7, 3.2 and 3.3 for Turkish local: 
issue #11830.

--

___
Python tracker 

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



  1   2   >