[issue7663] UTF-16 build incorrectly translates cases for non-BMP code points

2010-01-09 Thread Adam Olsen

Adam Olsen  added the comment:

See also issue5127.

--
nosy: +Rhamphoryncus

___
Python tracker 

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



[issue7663] UTF-16 build incorrectly translates cases for non-BMP code points

2010-01-09 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone :

This issue may extend beyond just unicode.upper() and unicode.lower(), but it's 
very clear with these two methods, at least.

For example, consider DESERET SMALL LETTER EW.  On a UTF-16 build, calling 
upper on a string containing this doesn't change it to the capital variation 
(DESERET CAPITAL LETTER EW):

>>> u'\N{DESERET SMALL LETTER EW}'.upper() == u'\N{DESERET SMALL LETTER EW}'
True

It can also be seen that this isn't even recognized as lower case:

>>> u'\N{DESERET SMALL LETTER EW}'.islower()
False

With a UTF-32 build, however, the expected behavior (ie, the behavior one would 
get for a code point in the BMP with small and capital variations) is provided.

--
components: Interpreter Core
messages: 97500
nosy: exarkun
severity: normal
status: open
title: UTF-16 build incorrectly translates cases for non-BMP code points
versions: Python 2.7

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-09 Thread Brett Cannon

Brett Cannon  added the comment:

The documentation is still accurate. The translation is literal so there no
shift except where the unpacking exception occurs.

On Sat, Jan 9, 2010 at 20:13, Éric Araujo  wrote:

>
> Éric Araujo  added the comment:
>
> Hello
>
> I read the diff for revision 77310 and noticed that arguments with parens
> (I mean things like ``def spam((x, y))``, forgot the name) were replaced
> by grab-all arguments that are unpacked later (``def spam(x_y)``). I was
> wondering whether the documentation for these changed functions was still
> accurate when describing the arguments they take. It seems none of them
> have a docstring, and docs.python.org/dev/ isn’t up to date so I can’t
> check right now.
>
> Kind regards
>
> --
> nosy: +Merwok
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file15814/unnamed

___
Python tracker 

___The documentation is still accurate. The translation is literal so there no 
shift except where the unpacking exception occurs.On Sat, Jan 9, 2010 at 20:13, Éric Araujo rep...@bugs.python.org> 
wrote:


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

Hello

I read the diff for revision 77310 and noticed that arguments with parens
(I mean things like ``def spam((x, y))``, forgot the name) were replaced
by grab-all arguments that are unpacked later (``def spam(x_y)``). I was
wondering whether the documentation for these changed functions was still
accurate when describing the arguments they take. It seems none of them
have a docstring, and http://docs.python.org/dev/"; 
target="_blank">docs.python.org/dev/ isn’t up to date so I can’t
check right now.

Kind regards

--
nosy: +Merwok

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

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-09 Thread Éric Araujo

Éric Araujo  added the comment:

Hello

I read the diff for revision 77310 and noticed that arguments with parens
(I mean things like ``def spam((x, y))``, forgot the name) were replaced
by grab-all arguments that are unpacked later (``def spam(x_y)``). I was
wondering whether the documentation for these changed functions was still
accurate when describing the arguments they take. It seems none of them
have a docstring, and docs.python.org/dev/ isn’t up to date so I can’t
check right now.

Kind regards

--
nosy: +Merwok

___
Python tracker 

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



[issue7458] crash in str.rfind() with an invalid start value

2010-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

> Ok, I've committed the tests after the patch for issue7462 removed the 
> offending code. Thanks!

r77241 and r77247 in trunk

--

___
Python tracker 

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



[issue7455] cPickle: stack underflow in load_pop()

2010-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

> Committed in all four branches.

trunk: r77352

--

___
Python tracker 

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



[issue7319] Silence DeprecationWarning by default

2010-01-09 Thread Brett Cannon

Brett Cannon  added the comment:

Committed in r77402. I am going to wait to see if any doc changes occur before 
I commit in py3k.

For historical reasons, here is the thread that hashed out the reasonsing: 
http://mail.python.org/pipermail/stdlib-sig/2009-November/000789.html

And thanks to everyone who helped out with this!

--
keywords:  -needs review
stage: patch review -> 
versions:  -Python 2.7

___
Python tracker 

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



[issue5372] Distutils inappropriately reuses .o files between extension modules

2010-01-09 Thread Skip Montanaro

Skip Montanaro  added the comment:

LGTM.  Nothing is quite as satisfying as simply deleting a bunch of
logic/lines.

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue5671] Speed up pickling of lists in cPickle

2010-01-09 Thread Skip Montanaro

Skip Montanaro  added the comment:

Still applies cleanly (with a little fuzz) to the trunk after applying
the issue 5683 patch.  Tests all still pass (including xpickle w/ 2.4,
2.5, 2.6 available).

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue4757] reject unicode in zlib

2010-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

> The patch was committed to py3k and 3.1. Thank you!

r76836 and r76838

--

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Richard Hansen  added the comment:

Attaching a patch that eliminates duplicate code:
  * Merge unicodeescape_string(), PyUnicode_EncodeRawUnicodeEscape(), and 
modified_EncodeRawUnicodeEscape() into one function called 
_PyUnicode_EncodeCustomUnicodeEscape().

This patch is meant to be applied after 
unicode_escape_3_check_size_nonnegative.patch.

--
Added file: 
http://bugs.python.org/file15813/unicode_escape_4_eliminate_duplicate_code.patch

___
Python tracker 

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



[issue7507] pipes.quote does not correctly escape !

2010-01-09 Thread R. David Murray

R. David Murray  added the comment:

The patch looks good to me, except that one test fails.  You seem to have 
inadvertently deleted the '=' from the safe chars list in the test.

We should also add a test for the '' case.  And presumably the docs requested 
in the other ticket...

--
priority:  -> normal
stage:  -> test needed
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Richard Hansen  added the comment:

Attaching a patch for another issue discovered while looking at the code:
  * The Unicode escape encoders now check to make sure that the provided size 
is nonnegative.
  * C API documentation updated to make it clear that size must be nonnegative.

This patch is meant to be applied after 
unicode_escape_2_utf-16_invalid_read.patch.

--
Added file: 
http://bugs.python.org/file15812/unicode_escape_3_check_size_nonnegative.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Richard Hansen  added the comment:

Attaching a patch for an issue discovered while looking at the code:
  * The UTF-16 decode logic in the Unicode escape encoders no longer reads past 
the end of the provided Py_UNICODE buffer if the last character's value is 
between 0xD800 and 0xDC00.

This patch is meant to be applied after unicode_escape_1_minimal.patch.

--
Added file: 
http://bugs.python.org/file15811/unicode_escape_2_utf-16_invalid_read.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Richard Hansen  added the comment:

Attaching a minimal patch:
  * unicode_escape now backslash-escapes single and double quotes
  * raw_unicode_escape now unicode-escapes single and double quotes
  * raw_unicode_escape now unicode-escapes backslashes
  * removes pickle's escaping workarounds so that it continues to work
  * updates documentation

--
Added file: http://bugs.python.org/file15810/unicode_escape_1_minimal.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Richard Hansen  added the comment:

Attaching updated unit tests.  The tests now check to make sure that single and 
double quotes are escaped.

--
Added file: http://bugs.python.org/file15809/unicode_escape_tests.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Changes by Richard Hansen :


Removed file: http://bugs.python.org/file15775/raw_unicode_escape_tests.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Changes by Richard Hansen :


Removed file: http://bugs.python.org/file15774/unicode_escape_tests.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Changes by Richard Hansen :


Removed file: http://bugs.python.org/file15771/unicode_escape_reorg.patch

___
Python tracker 

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



[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen

Changes by Richard Hansen :


Removed file: 
http://bugs.python.org/file15729/unicode_escape_single_and_double_quotes.patch

___
Python tracker 

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



[issue5683] Speed up cPickle's pickling generally

2010-01-09 Thread Skip Montanaro

Skip Montanaro  added the comment:

Updated the patch against the latest version of cPickle.c (r77393).  All tests 
pass on my Mac.

--
nosy: +skip.montanaro
Added file: http://bugs.python.org/file15808/cPickle.-r77393.patch

___
Python tracker 

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



[issue7643] What is an ASCII linebreak?

2010-01-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Here is draft of the patch to do what is proposed by Marc André on msg97440 
(add VT and FF).
Additionnally I upgraded the UCD 5.1 -> 5.2.

The implementation uses field 16 as defined in "py3k" implementation of 
"makeunicodedata.py". It should minimize differences between Py2 and Py3 
implementations.

Documentation and tests are missing.
I can provide a "diff.gz" containing "Modules/unicodedata_db.h", 
"Modules/unicodename_db.h" and "Objects/unicodetype_db.h", if needed.


- /* Returns 1 for Unicode characters having the category 'Zl',
-  * 'Zp' or type 'B', 0 otherwise.
+ /* Returns 1 for Unicode characters having the line break
+  * property 'BK', 'CR', 'LF' or 'NL' or having bidirectional
+  * type 'B', 0 otherwise.
   */

Note: the "remove_deprecation" should be applied before to remove "-3" warnings.

--
Added file: http://bugs.python.org/file15807/issue7643_use_LineBreak.diff

___
Python tracker 

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



[issue3311] block operation on closed socket/pipe for multiprocessing

2010-01-09 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed

___
Python tracker 

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



[issue3311] block operation on closed socket/pipe for multiprocessing

2010-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

This issue was fixed by r68768 for issue #3321.

--
status: open -> closed

___
Python tracker 

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



[issue7643] What is an ASCII linebreak?

2010-01-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
keywords: +patch
Added file: http://bugs.python.org/file15806/issue7643_remove_deprecation.diff

___
Python tracker 

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



[issue3599] test_pydoc after test_urllib2 causes exception in Popen.__del__

2010-01-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Since nobody (and no bot) reported this error in twelve months,
we may close it.

--
resolution:  -> works for me
status: open -> pending

___
Python tracker 

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



[issue7544] Fatal error on thread creation in low memory condition

2010-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

Here I come with a patch! nirai idea was the good one: prealloc PyThreadState 
before creating the thread. Raise a MemoryError if the allocation fail, instead 
of raising a *fatal* Python error.

Patch is quite simple and allow better error handling.

--
keywords: +patch
Added file: http://bugs.python.org/file15805/thread_prealloc_pystate.patch

___
Python tracker 

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



[issue7607] stringlib fastsearch could be improved on 64-bit builds

2010-01-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed in the patch for issue #7622.

--
stage: needs patch -> 
superseder:  -> [patch] improve unicode methods: split() rsplit() and replace()

___
Python tracker 

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



[issue2335] Backport set literals

2010-01-09 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

It been a long week, but this patch is now committed as r77400.

--
resolution:  -> accepted
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



[issue4366] cannot find -lpythonX.X when buinding Python on FreeBSD

2010-01-09 Thread Nick Bastin

Nick Bastin  added the comment:

NetBSD is netbsd* and DragonFly is dragonfly* (currently dragonfly2, although I 
suspect in this way dragonfly1 was identical, if it ever existed).

--

___
Python tracker 

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



[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file15804/issue7532_wontfix_tests_py3k.diff

___
Python tracker 

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



[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15801/issue7532_wontfix_tests_py3k.diff

___
Python tracker 

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



[issue7507] pipes.quote does not correctly escape !

2010-01-09 Thread Georg Brandl

Georg Brandl  added the comment:

Really adding the patch now.

--
keywords: +patch
Added file: http://bugs.python.org/file15803/pipes.diff

___
Python tracker 

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



[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file15802/issue7532_bytearray.diff

___
Python tracker 

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



[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Here it is, with some cleaning and simple Bytes/Bytearray tests.

And Bytearray tests backported to 2.7.

--
Added file: http://bugs.python.org/file15801/issue7532_wontfix_tests_py3k.diff

___
Python tracker 

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



[issue6688] Optimize PyBytes_FromObject.

2010-01-09 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

Committed in r77398.

--
resolution:  -> accepted
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



[issue3783] dbm.sqlite proof of concept

2010-01-09 Thread Runar Tenfjord

Runar Tenfjord  added the comment:

Multi threading:

According to http://www.sqlite.org/cvstrac/wiki?p=MultiThreading
we need to keep a connection for each thread to support multi threaded
access to the database. 

I came across this when deploying an application in a multi threaded
environment. Solution is to keep the connection in the thread local-data.

Also note that a memory database is not shared between threads and
a hairy workaround with a separate working thread with queues for access
is needed. A memory database could perhaps be disallowed as the dbm is file 
only?

import threading

class SQLhash(collections.MutableMapping):
def __init__(self, filename=':memory:', flags='r', mode=None):
self.__filename = filename
self.__local = threading.local()

MAKE_SHELF = 'CREATE TABLE IF NOT EXISTS shelf (key TEXT PRIMARY KEY, 
value TEXT NOT NULL)'
self.conn.execute(MAKE_SHELF)
self.conn.commit()

@property
def conn(self):
try:
conn = self.__local.conn
except AttributeError:
conn = self.__local.conn = sqlite3.connect(self.__filename)
self.conn.text_factory = bytes

return conn

--
type: feature request -> behavior

___
Python tracker 

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



[issue7662] time.utcoffset()

2010-01-09 Thread Brian Curtin

Brian Curtin  added the comment:

I think this would be nice, but see msg97471 from your diff.py ISO timestamp 
issue. time.daylight should probably be time.localtime().tm_isdst.

--
nosy: +brian.curtin
type:  -> feature request
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



[issue7582] [patch] diff.py to use iso timestamp

2010-01-09 Thread Brian Curtin

Brian Curtin  added the comment:

Using time.daylight is incorrect. time.daylight specifies the number of hours 
that the daylight offset is, not a flag to specify whether or not daylight 
savings time is in effect.

Steven's suggestion of using time.localtime().tm_isdst seems to be the better 
route.

--
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue4331] Can't use _functools.partial() created function as method

2010-01-09 Thread Christophe Simonis

Christophe Simonis  added the comment:

I followed the advice of Raymond and implement a descriptor on partial.

--
keywords: +patch
Added file: http://bugs.python.org/file15800/issue4331.patch

___
Python tracker 

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



[issue1023290] Conversion of longs to bytes and vice-versa.

2010-01-09 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

Committed in r77394. Thank you for the good reviews!

--
resolution:  -> accepted
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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-09 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue4294] Macros for PyLong: sign, number of digits, fits in an int

2010-01-09 Thread Mark Dickinson

Changes by Mark Dickinson :


--
status: pending -> closed

___
Python tracker 

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



[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2010-01-09 Thread Mark Dickinson

Changes by Mark Dickinson :


--
status: pending -> closed

___
Python tracker 

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



[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2010-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

So, would this fix be part of python 2.7?

--

___
Python tracker 

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



[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Tests applied to trunk in r77391.  Are you interested in producing a py3k 
version of the patch?

--

___
Python tracker 

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



[issue4366] cannot find -lpythonX.X when buinding Python on FreeBSD

2010-01-09 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

configure.in has the same action for NetBSD*|FreeBSD*|DragonFly*, so I think 
distutils should parallel that. Not sure what sys.platform would be on the 
other BSDs, though.

--

___
Python tracker 

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



[issue4366] cannot find -lpythonX.X when buinding Python on FreeBSD

2010-01-09 Thread Nick Bastin

Nick Bastin  added the comment:

A more appropriate patch should be (for 2.7 trunk - I'm grabbing a checkout of 
3.2 trunk now):

Index: build_ext.py
===
--- build_ext.py(revision 77388)
+++ build_ext.py(working copy)
@@ -280,7 +280,7 @@
 # Python's library directory must be appended to library_dirs
 sysconfig.get_config_var('Py_ENABLE_SHARED')
 if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
- or sys.platform.startswith('sunos'))
+ or sys.platform.startswith('sunos') or 
sys.platform.startswith('freebsd'))
 and sysconfig.get_config_var('Py_ENABLE_SHARED')):
 if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
 # building third party extensions


I'm hoping someone will weigh in on whether this should be done on all versions 
of FreeBSD (I don't see why not, but perhaps there is some magic that I don't 
understand in newer versions).

--
keywords: +patch
nosy: +nbastin
Added file: http://bugs.python.org/file15799/4366.diff

___
Python tracker 

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



[issue6681] email.parser clips trailing \n of multipart/mixed part if part ends in \r\n

2010-01-09 Thread R. David Murray

R. David Murray  added the comment:

This turns out to be a duplicate of issue 5610, which has a better solution.

--
resolution:  -> duplicate
stage: patch review -> committed/rejected
status: open -> closed
superseder:  -> email feedparser.py CRLFLF bug: $ vs \Z

___
Python tracker 

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



[issue7662] time.utcoffset()

2010-01-09 Thread anatoly techtonik

Changes by anatoly techtonik :


--
title: time.utcoffset(dst=true) -> time.utcoffset()

___
Python tracker 

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



[issue6523] smtplib exception smtp.connect TypeError encode_plain

2010-01-09 Thread R. David Murray

Changes by R. David Murray :


--
priority:  -> normal
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> smtplib is broken in Python3

___
Python tracker 

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



[issue7662] time.utcoffset(dst=true)

2010-01-09 Thread anatoly techtonik

New submission from anatoly techtonik :

The proposal to add the function that will allow to get current UTC offset. Do 
we need a PEP for this one?

def time.utcoffset():
  """Return current UTC offset in seconds"""
  return -(time.altzone if time.daylight else time.timezone)

--
components: Library (Lib)
messages: 97463
nosy: techtonik
severity: normal
status: open
title: time.utcoffset(dst=true)
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord

Changes by Michael Foord :


--
assignee:  -> michael.foord

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord

Michael Foord  added the comment:

I'm unhappy with a straight change in behaviour because it will break code that 
is currently catching AttributeError.

A slightly less invasive change would be to raise an AttributeError if the 
module doesn't exist, otherwise letting the original error propagate.

That means distinguishing between a module not existing and an ImportError 
raised whilst importing the module. Example code that does this by walking the 
stack: 
http://twistedmatrix.com/trac/browser/trunk/twisted/python/reflect.py#L382

In addition we could add a new method that loads a test from name, returning an 
'ErrorHolder' if loading the test fails. (A TestCase that reraises the original 
error when run - test discovery already does this in fact so that a test module 
failing to load doesn't halt discovery.)

--

___
Python tracker 

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



[issue6327] [mimetext] long lines get cut with exclamation mark and newline

2010-01-09 Thread R. David Murray

R. David Murray  added the comment:

Since there's no response I'm closing this as 'works for me'.

--
nosy: +r.david.murray
priority:  -> normal
resolution:  -> works for me
stage:  -> committed/rejected

___
Python tracker 

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



[issue7582] [patch] diff.py to use iso timestamp

2010-01-09 Thread anatoly techtonik

anatoly techtonik  added the comment:

New version detects DST using time.daylight flag.

utcoffset = -(time.altzone if time.daylight else time.timezone) // 60

--
Added file: 
http://bugs.python.org/file15798/diff.py_iso_timestamps_true_with_dst.diff

___
Python tracker 

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



[issue7632] dtoa.c: oversize b in quorem

2010-01-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's the (rather crude) testing program that turned up these errors.

--
Added file: http://bugs.python.org/file15797/test_dtoa.py

___
Python tracker 

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



[issue7632] dtoa.c: oversize b in quorem

2010-01-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Second patch, adding a fix for the rounding bug to the first patch.

--
Added file: http://bugs.python.org/file15796/issue7632_v2.patch

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord

Michael Foord  added the comment:

Wouldn't this be a backwards incompatible change of tested behaviour though?

--

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This can wait.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue7498] test_multiprocessing test_rapid_restart fails if port 9999 already in use

2010-01-09 Thread R. David Murray

Changes by R. David Murray :


--
status: open -> closed

___
Python tracker 

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



[issue7651] Python3: guess text file charset using the BOM

2010-01-09 Thread Walter Dörwald

Walter Dörwald  added the comment:

IMHO this is the wrong approach.

As Martin v. Löwis suggested here 
http://mail.python.org/pipermail/python-dev/2010-January/094841.html the best 
solution would be a new codec (which he named sniff), that autodetects the 
encoding on reading. This doesn't require *any* changes to the IO library. It 
could even be developed as a standalone project and published in the Cheeseshop.

--
nosy: +doerwalter

___
Python tracker 

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



[issue7507] pipes.quote does not correctly escape !

2010-01-09 Thread Georg Brandl

Georg Brandl  added the comment:

I'm attaching a patch that changes quote() logic.  It also fixes #7476, the 
empty argument case.

Strings with unsafe characters are now always quoted with single quotes. Single 
quotes themselves are replaced by a single quote in double quotes, so that

te$t'quoting

becomes

'te$t'"'"'quoting'

which I believe is portable across all commonly used shells.

(Another implementation would be to just backslash-quote all unsafe chars, but 
it makes for less readable results.)

Assigning to David for review -- you recently claimed to like shells :)

--
assignee:  -> r.david.murray
nosy: +georg.brandl, r.david.murray

___
Python tracker 

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



[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Georg Brandl

Georg Brandl  added the comment:

Okay.  Would it then make sense to migrate those constants in the stat module 
to posix, and deprecate the former?

--

___
Python tracker 

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



[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think having a stat module is a mistake in the first place. It's primary 
purpose (giving symbolic names to fields in a stat result) is out-of-date, now 
that we have named tuples. It's secondary purpose (collecting symbolic 
constants and macros around them) is flawed, as there is no guarantee that they 
are fixed across systems (unless we explicitly map the values correspondingly.

So I support addition of the constants to the posix module. Not sure whether 
documentation is lacking in the patch (i.e. whether they ought to be 
documented).

--

___
Python tracker 

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



[issue7498] test_multiprocessing test_rapid_restart fails if port 9999 already in use

2010-01-09 Thread Georg Brandl

Georg Brandl  added the comment:

Can this be closed?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue7441] Py3.1: Fatal Python Error: Py_Initialize...unknown encoding: chcp 65001.

2010-01-09 Thread Georg Brandl

Changes by Georg Brandl :


--
status: open -> closed

___
Python tracker 

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



[issue7422] Document inspect.get(full)argspec limitation to Python function

2010-01-09 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, added "Python" in r77382, r77383.

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

___
Python tracker 

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



[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Georg Brandl

Georg Brandl  added the comment:

IMO these symbols should go to the "stat" module, not the "posix" module.  
However, that module is Python, so the values would need to be hardcoded.  Do 
you know whether they are constant on all relevant systems?

--
assignee:  -> loewis
nosy: +georg.brandl, loewis

___
Python tracker 

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