[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

 At this point a feature change seems unlikely,

Amaury, it is not too late to fix anything that's broken.  New features are 
out, but we are free to fix anything hosed this badly.

--

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Amaury Forgeot d'Arc

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

But there are probably working usages with unicode strings out there. For 
example, I've seen code like struct.pack('6sHHBBB', 'GIF87a', ...)
Do you suggest to make this 3.1 code stop working in 3.2?

In any case, the 'c' format should probably be changed as well.

--

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Amaury At this point a feature change seems unlikely,
Amaury but it's not too late to emit a DeprecationWarning.

I prefer to break the API today than having to maintain a broken API for
10 or 20 years :-)  And we have a very small user base using Python 3,
it's easier to change it now, than in the next release.

Amaury But there are probably working usages with unicode strings out
Amaury there. For example, I've seen code like
Amaury struct.pack('6sHHBBB','GIF87a', ...)
Amaury Do you suggest to make this 3.1 code stop working in 3.2?

Yes. As I wrote in my previous message, this can be changed to
struct.pack('6sHHBBB', b'GIF87a', ...), which works on 3.1 and 3.2
(patched).

--

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



[issue10773] Building C and C++ Extensions on Windows documentation shows 2.x way of initializing module

2010-12-28 Thread Georg Brandl

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

Thanks, fixed in r87524.

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

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



[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2010-12-28 Thread Georg Brandl

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

Fine with me to fix this API during beta.

--

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



[issue10738] webbrowser.py bug with Opera on Linux

2010-12-28 Thread Georg Brandl

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

By all means.

--

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



[issue10766] optparse uses %s in gettext calls

2010-12-28 Thread Georg Brandl

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

Hmm, argparse is new, so that is a different story.  Not so sure about 
optparse, so I would not put this into 3.2.

--

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



[issue9824] SimpleCookie should escape commas and semi-colons

2010-12-28 Thread Georg Brandl

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

Looks good.

--

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



[issue10679] make altinstall may clobber OS provided scripts

2010-12-28 Thread Georg Brandl

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

Committed in r87525.

--
resolution:  - fixed
status: open - closed

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



[issue2775] Implement PEP 3108

2010-12-28 Thread Georg Brandl

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

Alas, too late for 3.2 now.

--
versions: +Python 3.3 -Python 3.2

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



[issue10784] os.getpriority() and os.setpriority()

2010-12-28 Thread Georg Brandl

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

Looks good.  Would there be a point in making any of the parameters optional?

--
nosy: +georg.brandl

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Georg Brandl

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

I agree this automatic conversion is broken and should be fixed.  Not sure if 
emitting a DeprecationWarning now and fixing it 18 months later is the right 
thing, especially since DeprecationWarnings are now silent.
As Victor says, the incompatibility is explicit, and the fix is simple and 
fully backwards compatible, while the current behavior will cause nasty 
intermittent surprises.

--
nosy: +georg.brandl

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



[issue10784] os.getpriority() and os.setpriority()

2010-12-28 Thread Martin v . Löwis

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

 Looks good.  Would there be a point in making any of the parameters optional?

No. The API should look exactly as it does on the system level. Anybody
calling these functions should know how call them.

--

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



[issue10777] xml.etree.register_namespace dictionary changed size during iteration

2010-12-28 Thread Georg Brandl

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

Thanks, this should be fixed in r87526.

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

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



[issue10768] Bug in scrolledtext

2010-12-28 Thread Georg Brandl

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

Fixed in r87527.  Terry, the reason why calling example() interactively failed 
is the strange way __doc__ is imported -- it is None in your case and that 
causes the Tkinter type error.  I fixed this as well.

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

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



[issue10767] Lib/test/crashers/README is out of date

2010-12-28 Thread Georg Brandl

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

Fixed in r87530.

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

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



[issue10742] memoryview.readonly attribute is not documented

2010-12-28 Thread Georg Brandl

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

Added in r87531.

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

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



[issue10781] minidom Node.writexml method doesn't manage encoding parameter correctly

2010-12-28 Thread Georg Brandl

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

Fixed in r87532.

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

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



[issue10708] Misc/porting should be folded in to the development FAQ

2010-12-28 Thread Georg Brandl

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

Same for Misc/SpecialBuilds.

--
nosy: +georg.brandl

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



[issue6785] IncompleteRead / BadStatus when parsing http://peakoil.mobi

2010-12-28 Thread Georg Brandl

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


--
status: pending - closed

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



[issue10739] Subprocess behavior on Windows

2010-12-28 Thread Georg Brandl

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

I agree that this belongs in the makefile docs.  Fixed in r87535.

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

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



[issue10670] Provide search scope limits

2010-12-28 Thread Georg Brandl

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


--
Removed message: http://bugs.python.org/msg123928

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



[issue10609] dbm documentation example doesn't work (iteritems())

2010-12-28 Thread Georg Brandl

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

Fixed in r87536.

--
resolution:  - fixed
status: open - closed

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Amaury Forgeot d'Arc

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

Since the Release Manager agrees with the change, I withdraw my objection.

I have three remarks to the patch: 

- Some examples in the documentation should be fixed:
http://docs.python.org/dev/py3k/library/struct.html#examples
 pack('ci', '*', 0x12131415)
will now raise an exception.

- the message argument for 's' must be a bytes looks a bit weird. a bytes 
object seems better.

- the 'p' format (Pascal String) should be changed as well. This is the last 
call to _PyUnicode_AsDefaultEncodedString() in this file...

--

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Antoine Pitrou

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

 I'm not sure how that's going to help as I don't want my library code
 to be responsible for printing out exceptions, I just want them to
 print reasonably -- and it seems very unreasonable to have the
 exception I'm converting /from/ show up in the traceback.

I don't know if it's unreasonable. In some cases it can definitely help.
Besides, if you are writing library code (as opposed to application
code), you shouldn't care at all how tracebacks are displayed, should
you?

--

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread David Beazley

David Beazley d...@dabeaz.com added the comment:

As a user of Python 3, I would like echo Victor's comment about fixing the API 
right now as opposed to having to deal with it later.  I can only speak for 
myself, but I would guess that anyone using Python 3 already understands that 
it's bleeding edge and that the bytes/strings distinction is really important.  
If fixing this breaks some third party libraries, I say good--they shouldn't 
have been blindly passing Unicode into struct in the first place.  Better to 
deal with it now when the number of users is relatively small.

--

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Fixed by r87537. Thanks Amaury for your review!

I also removed some ugly (implicit) conversions from test_struct.

--
resolution:  - fixed
status: open - closed

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Georg Brandl

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

Thanks, Victor!

--

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



[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread David Beazley

David Beazley d...@dabeaz.com added the comment:

Thanks everyone for looking at this!

--

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



[issue10348] multiprocessing: use SysV semaphores on FreeBSD

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Informations about SysV semaphores:
 - functions: semget(), semop(), semctl(), ftok()
 - http://perldoc.perl.org/IPC/SysV.html
 - http://beej.us/guide/bgipc/output/html/multipage/semaphores.html

--

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



[issue10348] multiprocessing: use SysV semaphores on FreeBSD

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Examples of programs using SysV semaphores:

http://firebird.cvs.sourceforge.net/viewvc/firebird/firebird2/src/jrd/isc_sync.cpp?revision=HEADview=markup
(Firebird, search #ifdef USE_SYS5SEMAPHORE sections)

https://github.com/mono/mono/blob/master/mono/io-layer/shared.c#L501
(Mono)

--

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-12-28 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Thanks for having a look.
Checked in with the suggested changes to r87539.

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

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



[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-28 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Fixed this in r87542 in (py3k). unescape is undocumented helper method, so no 
docs are added.

There was already an issue ( Issue6662) on malformed charref handling and it is 
fixed.

--
resolution:  - fixed
stage: patch review - committed/rejected

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



[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-28 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

r87544 (release27-maint) and r87545 (release31-maint).

--
status: open - closed

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



[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-28 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Committed backports:

r87540 (3.1)
r87541 (2.7)
r87546 (2.6)

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed
versions: +Python 3.2

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-28 Thread R. David Murray

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


--
keywords: +easy
nosy: +michael.foord
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-28 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

TextTestRunner is initialised with a stream to output messages on that defaults 
to sys.stderr. The correct way to redirect messages is to construct it with a 
different stream. 

If you want a redirectable stream then construct the runner with a stream that 
delegates operations to a 'backend stream' but allows you to redirect it.

Fixing TextTestRunner to dynamically lookup up sys.stderr would not be 
compatible with systems that redirect sys.stderr but *don't* expect this to 
prevent test run information from being output.

I suggest closing as wontfix.

--
assignee:  - michael.foord

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-28 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Actually I can't see a good reason why not to just lookup the *current* 
sys.stderr at instantiation time instead of binding at import time as is the 
current behaviour.

Patch with tests will make it more likely that this change goes in sooner 
rather than later.

--
stage:  - needs patch

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



[issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate

2010-12-28 Thread David Kremer

New submission from David Kremer david.kremer...@gmail.com:

Could you please add the exact form of the distribution, because it's rather 
confusing in the current form.

In this url, the role of k and theta is precised with a formula :
[http://tinyurl.com/24jxfrk]*

It seems that in 
[http://docs.python.org/library/random.html#random.gammavariate] , alpha is 
playing the role of k and beta is playing the role of theta.

But it's still not clear, because one can confuse beta with 1/beta and vice et 
versa, like there is two usual representation for the gamma distribution 
[http://en.wikipedia.org/wiki/Gamma_distribution]

[http://docs.scipy.org/doc/numpy-1.5.x/reference/generated/numpy.random.gamma.html#numpy.random.gamma]*

Please update the documentation to avoid this ambiguity.

I provide an indicative patch which is updating the doc string in random.py

--
assignee: d...@python
components: Documentation
files: patch_documentation_random.py.diff
keywords: patch
messages: 124803
nosy: David.Kremer, d...@python
priority: normal
severity: normal
status: open
title: [random.gammavariate] Add the expression of the distribution in a 
comprehensive form for random.gammavariate
versions: Python 2.7
Added file: http://bugs.python.org/file20181/patch_documentation_random.py.diff

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-12-28 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Checked in a small doc update in r87547. Removes the part about os.symlink not 
being available, and mentions the OSError.

--

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



[issue6027] test_xmlrpc_net fails when the ISP returns 302 Found

2010-12-28 Thread Antoine Pitrou

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

+1 on simply removing this test. *.xmlrpc.com look(s) totally unmaintained.

--
nosy: +pitrou

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



[issue1772833] -q (quiet) option for python interpreter

2010-12-28 Thread Éric Araujo

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

Is it on purpose that no sys.flags attribute has been added for quiet?

--
nosy: +eric.araujo
versions: +Python 3.2 -Python 2.6

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



[issue10764] sysconfig and alternative implementations

2010-12-28 Thread Éric Araujo

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

I suggest this bug is superseded by #9878.

--

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



[issue10788] test_logging failure

2010-12-28 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This on the Windows Server 2008 buildbot:

(http://www.python.org/dev/buildbot/all/builders/AMD64%20Windows%20Server%202008%203.x)

Re-running test 'test_logging' in verbose mode
test_flat (test.test_logging.BuiltinLevelsTest) ... FAIL
test_nested_explicit (test.test_logging.BuiltinLevelsTest) ... FAIL
test_nested_inherited (test.test_logging.BuiltinLevelsTest) ... FAIL
test_nested_with_virtual_parent (test.test_logging.BuiltinLevelsTest) ... FAIL
test_callable_filter (test.test_logging.BasicFilterTest) ... FAIL
test_filter (test.test_logging.BasicFilterTest) ... FAIL
test_handler_filter (test.test_logging.CustomLevelsAndFiltersTest) ... FAIL
test_logger_filter (test.test_logging.CustomLevelsAndFiltersTest) ... FAIL
test_specific_filters (test.test_logging.CustomLevelsAndFiltersTest) ... FAIL
test_flush (test.test_logging.MemoryHandlerTest) ... FAIL
test_config0_ok (test.test_logging.ConfigFileTest) ... FAIL
test_config1_ok (test.test_logging.ConfigFileTest) ... FAIL
test_config2_failure (test.test_logging.ConfigFileTest) ... FAIL
test_config3_failure (test.test_logging.ConfigFileTest) ... FAIL
test_config4_ok (test.test_logging.ConfigFileTest) ... FAIL
test_config5_ok (test.test_logging.ConfigFileTest) ... FAIL
test_config6_ok (test.test_logging.ConfigFileTest) ... FAIL
test_output (test.test_logging.SocketHandlerTest) ... FAIL
test_persistent_loggers (test.test_logging.MemoryTest) ... FAIL
test_encoding_cyrillic_unicode (test.test_logging.EncodingTest) ... FAIL
test_encoding_plain_file (test.test_logging.EncodingTest) ... FAIL
test_warnings (test.test_logging.WarningsTest) ... FAIL
test_config0_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config11_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config12_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config13_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config1_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config2_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config2a_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config2b_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config3_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config4_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config4a_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config5_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config6_failure (test.test_logging.ConfigDictTest) ... FAIL
test_config7_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config_10_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config_8_ok (test.test_logging.ConfigDictTest) ... FAIL
test_config_9_ok (test.test_logging.ConfigDictTest) ... FAIL
test_listen_config_10_ok (test.test_logging.ConfigDictTest) ... FAIL
test_listen_config_1_ok (test.test_logging.ConfigDictTest) ... FAIL
test_manager_loggerclass (test.test_logging.ManagerTest) ... FAIL
test_braces (test.test_logging.FormatterTest) ... ok
test_dollars (test.test_logging.FormatterTest) ... ok
test_percent (test.test_logging.FormatterTest) ... ok
test_logrecord_class (test.test_logging.LogRecordFactoryTest) ... FAIL
test_child_loggers (test.test_logging.ChildLoggerTest) ... FAIL
test_queue_handler (test.test_logging.QueueHandlerTest) ... FAIL
test_file_created (test.test_logging.RotatingFileHandlerTest) ... FAIL
test_rollover_filenames (test.test_logging.RotatingFileHandlerTest) ... FAIL
test_should_not_rollover (test.test_logging.RotatingFileHandlerTest) ... FAIL
test_should_rollover (test.test_logging.RotatingFileHandlerTest) ... FAIL
test_last_resort (test.test_logging.LastResortTest) ... FAIL

==
FAIL: test_flat (test.test_logging.BuiltinLevelsTest)
--
Traceback (most recent call last):
  File 
c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_logging.py, 
line 93, in setUp
self.assertFalse(self.logger1.hasHandlers())
AssertionError: True is not false

==
FAIL: test_nested_explicit (test.test_logging.BuiltinLevelsTest)
--
Traceback (most recent call last):
  File 
c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_logging.py, 
line 93, in setUp
self.assertFalse(self.logger1.hasHandlers())
AssertionError: True is not false

==
FAIL: test_nested_inherited (test.test_logging.BuiltinLevelsTest)
--
Traceback (most recent call last):
  File 
c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_logging.py, 
line 93, in setUp
self.assertFalse(self.logger1.hasHandlers())
AssertionError: True is not false


[issue10774] test_logging leaves temp files

2010-12-28 Thread Éric Araujo

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

Great, thanks!

--

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



[issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate

2010-12-28 Thread Éric Araujo

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


--
nosy: +rhettinger

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



[issue10764] sysconfig and alternative implementations

2010-12-28 Thread Amaury Forgeot d'Arc

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

Indeed

--
resolution:  - duplicate
status: open - closed
superseder:  - Avoid parsing pyconfig.h and Makefile by autogenerating 
extension module

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



[issue10764] sysconfig and alternative implementations

2010-12-28 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

No, issue 9878 can't be implemented for Python 2.7 whereas the issues other 
implementations have with sysconfig *could* still be resolved in 2.7 as a 
bugfix. (Specifically for IronPython on Mac OS X it would mean not assuming 
that being on a posix platform means there is a Makefile.)

--
status: closed - open

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



[issue1772833] -q (quiet) option for python interpreter

2010-12-28 Thread Georg Brandl

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

No, pure ignorance -- should be fixed in r87549.

--

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



[issue6027] test_xmlrpc_net fails when the ISP returns 302 Found

2010-12-28 Thread R. David Murray

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

See also issue 6533.

--

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



[issue9824] SimpleCookie should escape commas and semi-colons

2010-12-28 Thread R. David Murray

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

Committed to py3k in r87550.  Since the only application that would trip up 
would be one not using SimpleCookie to read SimpleCookie generated cookies 
*and* that doesn't implement unescaping (in which case it wasn't really 
handling SimpleCookie cookies, was it?), I went ahead and backported it to 3.1 
in r87551 and 2.7 in r87552.

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

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



[issue10738] webbrowser.py bug with Opera on Linux

2010-12-28 Thread Terry J. Reedy

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

3.2,3.1,2.7: r87553, r87554, r87555

--
assignee:  - terry.reedy
components: +Library (Lib)
resolution:  - fixed
status: open - closed
type:  - behavior

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-28 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

issue2636-20101228a.zip is a new version of the regex module.

It now compiles the pattern quickly.

--
Added file: http://bugs.python.org/file20182/issue2636-20101228a.zip

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



[issue10766] optparse uses %s in gettext calls

2010-12-28 Thread Éric Araujo

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

argparse is not new if you consider that it’s present in 2.7.

--

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



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-28 Thread Brian Quinlan

Brian Quinlan br...@sweetapp.com added the comment:

Fixed in r87556.

--
resolution:  - fixed
status: open - closed

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



[issue8618] test_winsound fails when no playback devices configured

2010-12-28 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Looks like this might be an issue with the Windows Server 2008 build slave. I 
restarted it last night and a bunch of builds after that have failed due to 
this test.

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

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Ethan Furman

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

 Besides, if you are writing library code (as opposed to application
 code), you shouldn't care at all how tracebacks are displayed, should
 you?

I care when it lies:

During handling of the above exception, another exception occurred:

This is a blatant falsehood -- another exception did not occur, a different 
exception was raised.

Now, when another exception does actually occur, I'm all for the nested 
traceback, but if I'm raising a different one, why is this useful:

-- d.address
Traceback (most recent call last):
  File nested_exceptions.py, line 7, in __getattr__
return self.data[self.names.index(name)]
ValueError: tuple.index(x): x not in tuple

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File stdin, line 1, in module
  File nested_exceptions.py, line 9, in __getattr__
raise AttributeError(Attribute %s does not exist % name)
AttributeError: Attribute address does not exist

?

Furthermore, I use my own library, and have no interest in seeing extra, 
completely unnecessary, and wrong (verbiage, anyway) traceback info -- not in 
my own libraries, nor in other's that I may be using.

Keep the nesting for when an exception actually occurs, not for when an 
exception is, under programmer control, being modified/changed.

--

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-28 Thread Jacques Grove

Jacques Grove jacq...@tripitinc.com added the comment:

Thanks, issue2636-20101228a.zip also resolves my compilation speed issues I had 
on other (very) complex regexes.

Found this one:

re.search((X.*?Y\s*){3}(X\s*)+AB:, XY\nX Y\nX  Y\nXY\nXX AB:)

produces a search hit with stock python 2.6.5 regex library, but not with 
issue2636-20101228a.zip.

re.search((X.*?Y\s*){3,}(X\s*)+AB:, XY\nX Y\nX  Y\nXY\nXX AB:)

matches on both, however.

--

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Antoine Pitrou

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

 During handling of the above exception, another exception occurred:
 
 This is a blatant falsehood -- another exception did not occur, a
 different exception was raised.

This doesn't make any difference in any other context, so why would it
here? If only the above sentence is problematic, you can perhaps suggest
another one.

 Now, when another exception does actually occur, I'm all for the
 nested traceback, but if I'm raising a different one, why is this
 useful:

To me that's the same as asking why the full call stack is useful. In
some cases it is useful, in other cases it is distracting. Python
displays comprehensive information by default. As I said, this can be
tweaked using the traceback module.

By the way, this is all described in detail in a PEP:
http://www.python.org/dev/peps/pep-3134/

--

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



[issue10785] parser: store the filename as an unicode object

2010-12-28 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I like the idea, but I don't like the trend that parser code continues to 
diverge from pgen.  I understand that most of the Python runtime is not 
available to pgen, but maybe a more elegant solution than changing the type 
conditional on PGEN can be found.  For example, maybe filename could be decoded 
from FS encoding to UTF-8?

--
nosy: +belopolsky

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Ethan Furman

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

 During handling of the above exception, another exception occurred:
 
 This is a blatant falsehood -- another exception did not occur, a
 different exception was raised.
 
 This doesn't make any difference in any other context, so why would it
 here?

I'm not sure I understand what you are saying -- could you rephrase?


 By the way, this is all described in detail in a PEP:
 http://www.python.org/dev/peps/pep-3134/

Yes, I know -- and from the PEP:

Rationale

The Python-Dev discussions revealed interest in exception chaining
for two quite different purposes.  To handle the unexpected raising
of a secondary exception, the exception must be retained implicitly.
To support intentional translation of an exception, there must be a
way to chain exceptions explicitly.  This PEP addresses both.

Open Issue: Suppressing Context

As written, this PEP makes it impossible to suppress '__context__',
since setting exc.__context__ to None in an 'except' or 'finally'
clause will only result in it being set again when exc is raised.

The two motivations are excellent, and I have no issue with them; what I have 
issue with is that it is no longer possible to discard previous context.  If I 
want to change the error message, I can use

except ValueError as exc:
raise AttributeError(blah) from exc

and then get

  The above exception was the direct cause of the following exception

I would also like to see:

except ValueError as exc:
raise AttributeError(blah) with exc

to get 

  During handling of the above exception, another exception occurred

which would be the same as:

1/0

to get

  During handling of the above exception, another exception occurred

and, finally, if all I have is 

except ValueError as exc:
raise AttributeError(blah)

I just get the normal, previous context free, traceback.

--

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



[issue10716] Modernize pydoc to use CSS

2010-12-28 Thread Ron Adam

Ron Adam ron_a...@users.sourceforge.net added the comment:

Here is a tentative start on this.  (css_v1.diff)

The css file is much better.  It's shorter, simpler and validated.

The header and navbar panel use it in the new server.

Added a markup call to the topic page contents.  (The same markup call is 
already used for the doc strings.)

Extra items in the css are what I come up with from testing different ways of 
doing things.

--
keywords: +patch
Added file: http://bugs.python.org/file20183/css_v1.diff

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



[issue10785] parser: store the filename as an unicode object

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 maybe a more elegant solution than changing the type conditional 
 on PGEN can be found

In pgen, the filename is only used to display the following warning, in 
indenterror():

   filename: inconsistent use of tabs and spaces in indentation

In pratical, this warning never occurs on Grammar/Grammar: this file doesn't 
use indentation at all, only continuation lines.

A better solution is maybe just to drop the filename for pgen. Anyway, pgen 
only compiles *one* file (Grammar/Grammar), so we don't need the input filename 
;-)

--

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



[issue10785] parser: store the filename as an unicode object

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

When testing my patch, I found and fixed two bugs in pgen:
 - r87557: PGEN was not defined to compile pgenmain.c and printgrammar.c
 - r87558: pgen error was ignored on make Parser/pgen.stamp (when executing 
pgen to compile the grammar)

--

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



[issue10785] parser: store the filename as an unicode object

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Version 2 of the patch:
 - remove filename attribute from perrdetail and tok_state structure in PGEN 
mode, and add a comment to explain why
 - rename filename_obj to filename
 - indenterror() no longer print the input filename in PGEN mode

--
Added file: http://bugs.python.org/file20184/parser_filename_obj-2.patch

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



[issue5672] Implement a way to change the python process name

2010-12-28 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Antoine Pitrou

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

 and, finally, if all I have is 
 
 except ValueError as exc:
 raise AttributeError(blah)
 
 I just get the normal, previous context free, traceback.

And what if the exception is raised from a subroutine?

--

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Ethan Furman

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

 And what if the exception is raised from a subroutine?

Well, if I have it surrounded by a try/except block, presumably I'm aware that 
an exception could be raised.  ;)

And if I'm aware that an exception could be raised, it may also be possible 
that I want to change the exception -- leading to the three possibilities I 
described earlier.  

Looking through my dbf module, most of those re-raises I'll be changing to use 
the raise ... from ... syntax, but there are still a couple places where it 
makes no sense to have the extra nested information available.

--

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



[issue10348] multiprocessing: use SysV semaphores on FreeBSD

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

See also #5725.

--

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Antoine Pitrou

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

  And what if the exception is raised from a subroutine?
 
 Well, if I have it surrounded by a try/except block, presumably I'm
 aware that an exception could be raised.  ;)

I'm talking about the exception raised from the except block.

--

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-28 Thread Jacques Grove

Jacques Grove aquara...@gmail.com added the comment:

Here is a somewhat crazy pattern (slimmed down from something much larger and 
more complex, which didn't finish compiling even after several minutes): 

re.compile((?:(?:[23][0-9]|3[79]|0?[1-9])(?:[Aa][Aa]|[Aa][Aa]|[Aa][Aa])??(?:[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}|[Aa]{4}|[Aa]{4}|[Aa]{3}(?:[Aa]{3})?|[Aa]{3}(?:[Aa](?:[Aa]{5})?)?|[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa]{5})?)|(?:[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}|[Aa]{4}|[Aa]{4}|[Aa]{3}(?:[Aa]{3})?|[Aa]{3}(?:[Aa](?:[Aa]{5})?)?|[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa]{5})?)(?:(?:[\-\s\.,/]){0,4}?)(?:[23][0-9]|3[79]|0?[1-9])(?:[Aa][Aa]|[Aa][Aa]|[Aa][Aa])??)\W*(?:[79][0-9]|2[0-4]|\d)(?:[\.:Aa])?(?:[0-5][0-9])\W*(?:(?:[Aa]{3}(?:[Aa]{3})?|[Aa]{3}(?:[Aa](?:[Aa]{3})?)?|[Aa]{3}(?:[Aa]{5}[Aa])?|[Aa]{3}(?:[Aa](?:[Aa]{4})?)?|[Aa]{3}(?:[Aa]{3})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa]{3})?)|(?:[Aa][Aa](?:[Aa](?:[Aa]{3})?)?|[Aa][Aa](?:[Aa](?:[Aa](?:[Aa](?:[Aa]{3})?)?)?)?|[Aa][Aa](?:[Aa](?:[Aa](?:[Aa]{4})?)?)?|[Aa][Aa](?:[Aa](?:[Aa]{3}(?:[Aa](?:[Aa]{3})?)?)?)?
 
|[Aa][Aa](?:[Aa](?:[Aa](?:[Aa]{3})?)?)?|[Aa][Aa](?:[Aa](?:[Aa](?:[Aa]{3})?)?)?|[Aa]{3}(?:[Aa](?:[Aa](?:[Aa]{4})?)?)?|[Aa][Aa](?:[Aa](?:[Aa](?:[Aa]{3})?)?)?))\s*(\-\s*)?(?:(?:[23][0-9]|3[79]|0?[1-9])(?:[Aa][Aa]|[Aa][Aa]|[Aa][Aa])??(?:(?:[\-\s\.,/]){0,4}?)(?:[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}|[Aa]{4}|[Aa]{4}|[Aa]{3}(?:[Aa]{3})?|[Aa]{3}(?:[Aa](?:[Aa]{5})?)?|[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa]{5})?)|(?:[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}(?:[Aa][Aa])?|[Aa]{3}|[Aa]{4}|[Aa]{4}|[Aa]{3}(?:[Aa]{3})?|[Aa]{3}(?:[Aa](?:[Aa]{5})?)?|[Aa]{3}(?:[Aa]{4})?|[Aa]{3}(?:[Aa]{5})?|[Aa]{3}(?:[Aa]{5})?)(?:(?:[\-\s\.,/]){0,4}?)(?:[23][0-9]|3[79]|0?[1-9])(?:[Aa][Aa]|[Aa][Aa]|[Aa][Aa])??)(?:(?:(?:[\-\s\.,/]){0,4}?)(?:(?:68)?[7-9]\d|(?:2[79])?\d{2}))?\W*(?:[79][0-9]|2[0-4]|\d)(?:[\.:Aa])?(?:[0-5][0-9]))


Runs about 10.5 seconds on my machine with issue2636-20101228a.zip, less than 
0.03 seconds with stock Python 2.6.5 regex engine.

--

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-28 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

issue2636-20101229.zip is a new version of the regex module.

It now compiles the pattern quickly.

--
Added file: http://bugs.python.org/file20185/issue2636-20101229.zip

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-12-28 Thread Amaury Forgeot d'Arc

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

Tests now fail on windows XP:
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/3874/steps/test/logs/stdio

os.symlink() may raise NotImplementedError, and test.support.can_symlink() 
should catch it.

--
stage: committed/rejected - commit review
status: closed - open

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Ethan Furman

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

 I'm talking about the exception raised from the except block.

So was I -- why should this:

try:
x = y / z
except ZeroDivisionError as exc:
raise InvalidInput()

be different from this:

try:
x = divide_and_conquer(y, z)
except ZeroDivisionError as exc:
raise InvalidInput()

?

In both cases I want to discard the previous exception, and raise my own in its 
place (without the nesting, in this example).

--

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



[issue5672] Implement a way to change the python process name

2010-12-28 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

 If somebody would provide a patch that adds prctl to the posix module,
 that would be fine with me - we have a long tradition of exposing all
 available system calls if somebody wants them.

Just for the record, I was about to try to do this, when I realized that 
exposing prctl requires expecting a variable number of arguments with variable 
types.
It turns out providing a Python wrapper for such a kind of C API is just a pain.
There's an implementation though, handling 2 args only (instead of 5):
https://github.com/seveas/python-prctl/blob/master/_prctlmodule.c#L9
Considering that this also Linux-only, I don't think it really worths the 
effort.

--

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



[issue10348] multiprocessing: use SysV semaphores on FreeBSD

2010-12-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

See also http://semanchuk.com/philip/sysv_ipc/: System V IPC for Python - 
Semaphores, Shared Memory and Message Queues

--

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



[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-28 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Sat, Nov 27, 2010 at 5:03 PM, Marc-Andre Lemburg
rep...@bugs.python.org wrote:
..
  * this version should be slightly faster and is also easier to read:

 #define Py_UCS4_READ_CODE_POINT(ptr, end) \
..
      Py_UNICODE_JOIN_SURROGATES((ptr)++, (ptr)++) : \
..
   I haven't tested it, but you get the idea.

I don't think C guarantees the order of evaluation of the operands in
bitwise expressions such as the expansion of the JOIN_SURROGATES
macro.

--

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



[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-12-28 Thread Éric Araujo

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


--
nosy: +eric.araujo

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-28 Thread Éric Araujo

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


--
nosy: +eric.araujo

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-12-28 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Oops, sorry. Fixed in r87561.

--
stage: commit review - committed/rejected
status: open - closed

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



[issue5672] Implement a way to change the python process name

2010-12-28 Thread Martin v . Löwis

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

 Just for the record, I was about to try to do this, when I realized that 
 exposing prctl requires expecting a variable number of arguments with 
 variable types.
 It turns out providing a Python wrapper for such a kind of C API is just a 
 pain.
 There's an implementation though, handling 2 args only (instead of 5):
 https://github.com/seveas/python-prctl/blob/master/_prctlmodule.c#L9
 Considering that this also Linux-only, I don't think it really worths the 
 effort.

It's actually simpler than you think: I don't think any of the existing
controls uses arg4 and arg5. PR_MCE_KILL uses arg3, though. prctl is
really a set of system calls, and should be wrapped as such: each
control needs to be supported specifically. However, several of them
are similar, i.e. take either no argument, or have

Whether it's worth supporting it, I don't know. I stand by my original
proposition: if somebody would contribute this, I'd be in favor of
including it. I'm unlikely to write it on my own from scratch, though.

--

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



[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-28 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I am attaching a patch for commit review.  I added an underscore prefix to all 
new macros.  This way I am not introducing new features and we will have a full 
release cycle to come up with better names.  i would just note that next 
terminology is consistent with PyDict_Next and _PySet_NextEntry.  The latter 
suggests that Py_UNICODE_NEXT_UCS4 may be a better choice.

--
assignee: lemburg - belopolsky
stage: patch review - commit review
Added file: http://bugs.python.org/file20186/issue10542.diff

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



[issue8618] test_winsound fails when no playback devices configured

2010-12-28 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

This isn't failing in manual runs of regrtest -uall on that machine.

--
status: open - pending

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



[issue10753] request_uri method of wsgiref module does not support RFC1808 params.

2010-12-28 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

r87564 (py3k), r87565 (release31-maint) and r87566 (release27-maint).

Just a Note.

These kind of minor changes have many a times resulted in regression for 
developers who relied upon previous bad behavior.  I have added NEWS to explain 
this change clearly and hopefully it gets noticed and accommodate this change 
in their code.

Thanks.

--
assignee:  - orsenthil
keywords: +patch
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
Added file: http://bugs.python.org/file20187/issue10753.patch

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