[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

More curious and more curious...

I assume that cmath.log(100.0) and cmath.log(2.0) return the right things?
(Both answers should have zero imaginary part.)

Might this be some optimization bug?  Can you turn off all optimizations 
and see what happens?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 However, the resulting build produces to wrong result:

Darn.  That's probably because the linker needs the extra flag as well.

Here's a revised patch for you to try.  (You might need to do an svn up
before it applies cleanly...)

Added file: http://bugs.python.org/file10757/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Changes by Mark Dickinson [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10754/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue900744] catch invalid chunk length in httplib read routine

2008-06-28 Thread Philip Dorrell

Philip Dorrell [EMAIL PROTECTED] added the comment:

I have raised a bug 125 for boto (
http://code.google.com/p/boto/issues/detail?id=125 ) in relation to this
problem, because if httplib.py is not fixed in Python 2.5, then any code
calling httplib.py has to work around it by handling a ValueError
exception when it occurs.

With regard to the fix in Python 2.6, and reading through the httplib.py
source, I conclude:

* IncompleteRead(value) means something like we were expecting to read
X bytes but actually there aren't any more, and so far we have read
*value*.
* This meaning does not quite describe the error which this issue is
about, which really needs its own separate exception class, e.g.
InvalidHttpResponseChunkSize(value, badSize) meaning we were expecting
to read the size of the next chunk, but *badSize* is not a valid number,
and so far we have read *value*)

--
nosy: +pdorrell

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue900744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3225] backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c

2008-06-28 Thread kai zhu

New submission from kai zhu [EMAIL PROTECTED]:

this patch touches only Python/ceval.c.

1. the only existing thing it modifies is PyEval_EvalFrameEx (adds 8
extra cases for the new 3.0 opcodes, doesn't mess w/ any of the existing
ones, or anything else as a matter of fact)

2. that, plus it defines (the new opcodes)
#define SET_ADD 17
#define STORE_MAP 54  
#define STORE_LOCALS 69   
#define LOAD_BUILD_CLASS 34   
#define MAKE_BYTES 35 
#define POP_EXCEPT 36 
#define UNPACK_EX 94  
#define BUILD_SET 109 
and some backported vars  helper functions

only 2 contiguous areas of ceval.c is patched (1.  2. - areas are
delimited by the comments '// py3k')

this simple patch seems sufficient in theory to allow the interpreter to
natively execute most of 3.0's language syntax (nonlocal, print,
extended unpacking... have been tested to work)
*the one exception being pep3102 - keyword-only arguments

i wrote 2 small scripts which gives an interactive function
'compile_py3k' similar to __builtin__.compile except it works only for
3.0 syntax.  it doesn't actually compile, but rather cheats by querying
it to a python 3.0 server via pipe io.

here is an interactive demonstration of my script:

example demonstrating pep3132 extended unpacking syntax: a,b,*c = 1,2,3,4

Python 2.5.2 (r252:60911, Jun 27 2008, 21:19:51)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type help, copyright, credits or license for more information.

 import py3to2
py3to2 server restarting with io: (4, 5)
py3to2 server: Python 3.0b1 (r30b1:64395, Jun 24 2008, 21:53:55)
py3to2 server: [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
py3to2 server: Type help, copyright, credits or license for more
information.
py3to2 server: 

 src = a,b,*c = 1,2,3,4
 codeobject = py3to2.compile_py3k(src,,exec)
  1   0 LOAD_CONST   5 ((1, 2, 3, 4))
  3 UNPACK_EX_py3k   2
  6 STORE_NAME   0 (a)
  9 STORE_NAME   1 (b)
 12 STORE_NAME   2 (c)
 15 LOAD_CONST   4 (None)
 18 RETURN_VALUE

 exec(codeobject); print a=%s, b=%s, c=%s%(a,b,c)
a=1, b=2, c=[3, 4]


u can go c
http://pypi.python.org/pypi?name=py3to2version=20080628:action=display
for more info

anyway, i think it would b a great boost for python 3.0 (which i think
is very cool) if developers can test/develop it under the robust 2.5
environment.  this patch plus some scripts could go a long way in making
that happen

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
files: ceval.c
messages: 68873
nosy: collinwinter, kaizhu
severity: normal
status: open
title: backport python 3.0 language functionality to python 2.5 by adding 8 
opcodes to ceval.c
type: feature request
versions: Python 2.5
Added file: http://bugs.python.org/file10758/ceval.c

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3225
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3225] backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c

2008-06-28 Thread kai zhu

Changes by kai zhu [EMAIL PROTECTED]:


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3225
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3225] backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c

2008-06-28 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Sorry, but adding new feature into the 2.5.3 release (or any later 2.5
release) is unacceptable; the feature list of 2.5 was frozen in 2006
(when the first beta release of 2.5 was made). Thus, I'm rejecting the
patch.

--
nosy: +loewis
resolution:  - rejected
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3225
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3174] 3.0b1 doesn't seem to install on macs

2008-06-28 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
assignee:  - benjamin.peterson
priority:  - release blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3174
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3224] Small typo in 2.6 what's new

2008-06-28 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Thanks. Fixed in r64572.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3224
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1503502] Pdb doesn't call flush on its stdout file descriptor

2008-06-28 Thread James Dominy

James Dominy [EMAIL PROTECTED] added the comment:

I've been working on a patch that allows pdb when run as a script to
split it's output such that the program being debugged uses a specified
tty for stdin/stdout, and leave the pdb.py IO on the original
stdin/stdout. I think perhaps these efforts should be merged. Certainly
your suggested patch would make my work much easier.

--
nosy: +sirlark

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1503502
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-06-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

I think I narrowed the problem to a race condition in *subclasses* of
threading.local:
In threadmodule.c::local_getattro, there is a chance that self-dict is
changed before PyObject_GenericGetAttr is called.

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3088
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Keep in mind also, these Python builds are compiled with the SUN 
compilers, i.e. the ./configure command line includes  --without-gcc.  
If we do change the CC- and LINKFLAGS, those changes should only apply 
in that particular case.

Using -xlibmieee in 3 places, BASECFLAGS, LDFLAGS and LDSHARED and 
without optimization produces the following for 32-bit:

Python 2.6b1 (r26b1:64398, Jun 28 2008, 10:31:27) [C] on sunos5
Type help, copyright, credits or license for more information.

 import cmath
 cmath.log(100.0)
(4.6051701859880918+0j)
 cmath.log(2.0)
(0.69314718055994529+0j)
 cmath.log(100.0, 2.0)
(6.6438561897747253+0j)

 import math
 math.log(float('-inf'))
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: math domain error

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3226] can't install on OSX 10.4

2008-06-28 Thread Benjamin Peterson

New submission from Benjamin Peterson [EMAIL PROTECTED]:

Mac/Makefile.in uses the arch command which doesn't have the ability to
run a given architecture in 10.4 like it does in 10.5. Hence, the
install fails.

--
assignee: ronaldoussoren
messages: 68879
nosy: benjamin.peterson, ronaldoussoren
priority: release blocker
severity: normal
status: open
title: can't install on OSX 10.4
versions: Python 2.6, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3226
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

The 32-but results are the same when built with -xO5.

Python 2.6b1 (r26b1:64398, Jun 28 2008, 10:43:53) [C] on sunos5
Type help, copyright, credits or license for more information.
 import cmath
 cmath.log(100.0)
(4.6051701859880918+0j)
 cmath.log(2.0)
(0.69314718055994529+0j)
 cmath.log(100.0, 2.0)
(6.6438561897747253+0j)

 import math
 math.log(float('-inf'))
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: math domain error

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

For 32-bit, see the latest posts at http://bugs.python.org/issue3167.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 Keep in mind also, these Python builds are compiled with the SUN 
 compilers, i.e. the ./configure command line includes  --without-gcc.  
 If we do change the CC- and LINKFLAGS, those changes should only apply 
 in that particular case.

Right.  That's the purpose of the 'if's and 'case' tests in the 
configure patch.  The test $CC=cc should exclude these changes from 
being applied when the C compiler is gcc.

Do you happen to know which versions of Solaris support the -xlibmieee 
flag?  Is it new in Solaris 10?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

What about cmath.log(100.0) and cmath.log(2.0) on 64-bit?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

The SUN compiler versions

 cc -V
cc: Sun C 5.8 2005/10/13
usage: cc [ options] files.  Use 'cc -flags' for details
 CC -V
CC: Sun C++ 5.8 2005/10/13

Both define the following symbols:

#define __SUNPRO_C   0x580
#define __SunOS_5_10

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Okay, here's a third version of the patch.  Same as before, except
that it makes sure that LDFLAGS are included in LDSHARED.

Jean, does this patch fix the problem with math.log on 32-bit?  If so, 
I'll check it in.

Added file: http://bugs.python.org/file10759/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Changes by Mark Dickinson [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10757/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Forgot to mention, both 64-bit builds above includes -xlibmieee in the 
BASECFLAGS and LDFLAGS ./configure symbols (not LDSHARED!).

The complete .configure command line was (with OPT adjusted accordingly):

env CCSHARED=-KPIC LDSHARED=cc -xtarget=native64 -G LDFLAGS=-
xlibmieee -xtarget=native64  CC=cc CPP=cc -xtarget=native64  -E 
BASECFLAGS=-xtarget=native64 -xlibmieee CFLAGS=-xtarget=native64  
CXX=CC -xtarget=native64 OPT=-xO5 ./configure --enable-shared --
without-gcc --disable-ipv6 --prefix=

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Sorry, my previous post was wrong.  The LDSHARED symbol did NOT include -
xlibmieee.  Only the BASECFLAGS and the LDFLAGS.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3222] inf*inf gives inf, but inf**2 gives overflow error

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Closing as 'won't fix'.

--
resolution:  - wont fix
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3222
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3227] os.environ.clear has no effect on child processes

2008-06-28 Thread Joe P. Cool

New submission from Joe P. Cool [EMAIL PROTECTED]:

If I call os.environ.clear in a python program child processes still
see the cleared entries. But when I iterate over the keys like so

names =  os.environ.keys()
for k in names:
del  os.environ[k]

then the entries are also deleted for the child processes. Where is
the difference? Is this a bug? (Observed in Python 2.5.2)

-- 
Joe

--
components: Library (Lib)
messages: 68891
nosy: joe.p.cool
severity: normal
status: open
title: os.environ.clear has no effect on child processes
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

I applied your patch to freshly updated configure and configure.in files 
and ran  ./configure --without-gcc on Solaris.

The resulting Makefile has empty BASECFLAGS and LDFLAGS.  Here is the 
snippet:


# Compiler options
OPT=-DNDEBUG -O
BASECFLAGS= 
CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for 
setup.py to
# be able to build extension modules using the directories specified in 
the
# environment variables
CPPFLAGS=   -I. -IInclude -I$(srcdir)/Include 
LDFLAGS=
LDLAST= 
SGI_ABI=
CCSHARED=   -Kpic
LINKFORSHARED=  
# Extra C flags added for building the interpreter object files.
CFLAGSFORSHARED=
# C flags used for building the interpreter object files
PY_CFLAGS=  $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Sorry---my bad.  I missed out the $ac_sys_release bit.

Patch updated again.  Jean, could you please give it one more try?

Added file: http://bugs.python.org/file10760/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Changes by Mark Dickinson [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10759/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

This is pretty bizarre, take a look at the following, 64-bit Pyhon 2.6b1 
-xO5.

Python 2.6b1 (r26b1:64398, Jun 28 2008, 12:50:06) [C] on sunos5
Type help, copyright, credits or license for more information.
 import math
 math.log(100.0, 2.0)
6.6438561897747253
 math.log(100.0) / math.log(2.0)
6.6438561897747253

 import cmath
 cmath.log(100.0, 2.0)
(0.71244151439608006-2.0556716794852954j)
 cmath.log(complex(100.0, 0), complex(2.0, 0)) 
(0.71244151439608006-2.0556716794852954j)

 cmath.log(2.0)
(0.69314718055994529+0j)
 cmath.log(100.0)
(4.6051701859880918+0j)
 cmath.log(100.0) / cmath.log(2.0)
(6.6438561897747253+0j)

There is only an issue with cmath.log(100.0, 2.0) but not with 
cmath.log(100.0) / cmath.log(2.0).  That seems to indicate that the 
c_quot function may be the root cause of the problem.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2650] re.escape should not escape underscore

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

 The escaped regexp is not utf-8 (why should it be?)

I suppose it is annoying if you want to print the escaped regexp for
debugging purposes.

Anyway, I suppose someone should really decide if improving re.escape is
worth it, and if not, close the bug.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2650
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3228] mailbox.mbox creates files with execute bit set

2008-06-28 Thread Piotr Lewandowski

New submission from Piotr Lewandowski [EMAIL PROTECTED]:

#v+
$ umask
0077

$ stat /tmp/foobar
stat: cannot stat `/tmp/foobar': No such file or directory

$ python -c from mailbox import mbox; m=mbox('/tmp/foobar',
create=True); m.add(''); m.close()

$ stat -c '%A' /tmp/foobar
-rwx--
#v-

Bug is probably present in _create_carefully() function in mailbox.py.
os.open() takes mode argument (which defaults to 0777) but it's not
supplied there.

#v+
$ grep -A2 'def _create_carefully' /usr/lib/python2.5/mailbox.py
def _create_carefully(path):
Create a file if it doesn't exist and open for reading and
writing.
fd = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR)
#v-

--
components: Library (Lib)
messages: 68896
nosy: pl
severity: normal
status: open
title: mailbox.mbox creates files with execute bit set
type: behavior
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3092] Wrong unicode size detection in pybench

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

 You're right: probably not. Would be great to have the test on the
 Py2.x version as well - to see the difference in performance.

I'm not following you, what test are you talking about?
The patch is only about reporting of the Python build characteristics,
it does not (AFAIK) change anything to how or what tests are run.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3081] Py_(X)SETREF macros

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

This new patch avoids using temporary variables named new, it also
adopts the do { ... } while (0) idiom for definition of the macros.

Added file: http://bugs.python.org/file10761/py_setref.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3081
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Trying to isolate and duplicate the problem with c_quot isn't quite 
working.  See the attached c_quot.c file and the results at the end.

Added file: http://bugs.python.org/file10762/c_quot.c

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Could you try the attached patch, and see what output you get from
cmath.log(100., 2.)?  (On 64-bit, of course.)

--
keywords: +patch
Added file: http://bugs.python.org/file10763/issue3168.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 Trying to isolate and duplicate the problem with c_quot isn't quite 
 working.  See the attached c_quot.c file and the results at the end.

I'd expect that you'd need both the cmath_log and the c_quot functions, 
probably in separate files that are compiled independently and then linked 
together.  It looks like it's somehow the combination of these two that's 
causing a problem.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3168
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Yep, that one works.  As before, using ./configure --without-gcc ...


BASECFLAGS=  -xlibmieee
CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for 
setup.py to
# be able to build extension modules using the directories specified in 
the
# environment variables
CPPFLAGS=   -I. -IInclude -I$(srcdir)/Include 
LDFLAGS= -xlibmieee


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3081] Py_(X)SETREF macros

2008-06-28 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

-1 on the new macros.  The mnemonic doesn't work for me and the example 
code fragments are to my eyes less readable than before.  These add to 
the learning curve for reading and writing C extensions and provide 
nearly zero benefits.  

Assigning from an INCREF feels weird.  It is somewhat at odds with our 
coding style where we tend to stick with dirt simple C, trying to put 
operations on different lines rather than combining too many step in a 
single line.

--
nosy: +rhettinger

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3081
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Uh, actually, it works if you specify re.UNICODE. If you don't, the
getlower() function in _sre.c falls back to the plain ASCII algorithm.

 pat = re.compile('Á', re.IGNORECASE | re.UNICODE)
 pat.match('á')
_sre.SRE_Match object at 0xb7c66c28
 pat.match('Á')
_sre.SRE_Match object at 0xb7c66cd0

I wonder if re.UNICODE shouldn't be the default in Py3k, at least when
the pattern is a string and not a bytes object. There may also be a
re.ASCII flag for those cases where people want to fallback to the old
behaviour.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3081] Py_(X)SETREF macros

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Le samedi 28 juin 2008 à 20:12 +, Raymond Hettinger a écrit :
 Raymond Hettinger [EMAIL PROTECTED] added the comment:
 
 -1 on the new macros.  The mnemonic doesn't work for me and the example 
 code fragments are to my eyes less readable than before.  These add to 
 the learning curve for reading and writing C extensions and provide 
 nearly zero benefits.  

They might not be ideal, but I think they can be helpful to avoid
writing incorrect code out of laziness. There is already Py_CLEAR with
similar purposes.

 Assigning from an INCREF feels weird.  It is somewhat at odds with our 
 coding style where we tend to stick with dirt simple C, trying to put 
 operations on different lines rather than combining too many step in a 
 single line.

Ok.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3081
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Changes by Mark Dickinson [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10760/issue3167.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3227] os.environ.clear has no effect on child processes

2008-06-28 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

This has been fixed in the upcoming Python 2.6.

--
nosy: +benjamin.peterson
resolution:  - out of date
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2650] re.escape should not escape underscore

2008-06-28 Thread Morten Lied Johansen

Morten Lied Johansen [EMAIL PROTECTED] added the comment:

In my particular case, we were passing the regex on to a database which 
has regex support syntactically equal to Python, so it seemed natural 
to use re.escape to make sure we weren't matching against the pattern 
we really wanted.

The documentation of re.escape also states that it will only escape non-
alphanumeric characters, which is apparently only true if you are using 
a single byte encoding (ie. not utf-8, or any other encoding using more 
than a single byte per character). At the very least, that's probably 
worth mentioning in the docs.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2650
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Martin,

Do you have a moment to do a sanity check on the attached patch?  The 
aim of the patch is to add the -xlibmieee flag when compiling and 
linking on Solaris using Sun's compiler rather than gcc.  Jean Brouwers 
has confirmed that the patch fixes the test_math failure on this 
platform.

I'm not very sure of myself when it comes to messing with autoconf, so 
I'd like someone else to look this over before it gets committed.  If 
you don't have time right now, please do just assign it back to me.

--
assignee: marketdickinson - loewis
nosy: +loewis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3228] mailbox.mbox creates files with execute bit set

2008-06-28 Thread Jakub Wilk

Changes by Jakub Wilk [EMAIL PROTECTED]:


--
nosy: +jwilk

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3212] ssl module - should test for a wrong cert

2008-06-28 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

I've added this into my patch.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3212
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-06-28 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Thanks for pointing this out.  I've got a patch for the overrides and
the misnamings already.

We don't have implementations for recvfrom_into, or recv_into.  If you'd
care to create a patch for that, it would help.

--
assignee:  - janssen
nosy: +janssen
resolution:  - accepted

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Martina Oefelein

New submission from Martina Oefelein [EMAIL PROTECTED]:

The first use of PySet_GET_SIZE in dict_fromkeys (file dictobject.c) is applied 
to a PyDictObject. These seem to work by chance, as the PyDictObject and 
PySetObject have very 
similar structure so that it does not matter if you cast a PyDictObject* to a 
PySetObject*. But if their structure ever diverges, this would cause 
unpredictable behaviour.

Thus, this use of PySet_GET_SIZE should probably be replaced with a call of 
PyDict_Size.

(There are two more calls to PySet_GET_SIZE resp. _PySet_NextEntry in the same 
function, 
but these are OK as they actually apply to a set.)

--
components: Interpreter Core
messages: 68914
nosy: oefe
severity: normal
status: open
title: dictobject.c: inappropriate use of PySet_GET_SIZE?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Martina Oefelein

Changes by Martina Oefelein [EMAIL PROTECTED]:


--
versions: +Python 2.6, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2973] _ssl compiler warnings

2008-06-28 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Any progress here?  I haven't yet found a formulation which suppresses
the warning on all platforms.  I'm guessing there will have to be some
kind of cpp test

#if SOMEFEATURE
#define D2I_PARAMETER_2_TYPE unsigned char *
#else
#define D2I_PARAMETER_2_TYPE const unsigned char *
#endif

--
nosy: +janssen

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2973
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger

Changes by Raymond Hettinger [EMAIL PROTECTED]:


--
assignee:  - rhettinger
nosy: +rhettinger

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Will get this fixed-up.

--
priority:  - high

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2973] _ssl compiler warnings

2008-06-28 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Yes, although I have no idea what that feature may be... (sigh) Oh well,
it's a wish.

--
priority: normal - low

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2973
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3226] can't install on OSX 10.4

2008-06-28 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
versions:  -Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3226
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-28 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

Dunno about Sun's compiler, but I get test errors on Solaris 10 using 
gcc 4.2:

==
FAIL: test_specific_values (test.test_cmath.CMathTests)
--
Traceback (most recent call last):
  File /home/tuba/skipm/src/python-svn/trunk/Lib/test/test_cmath.py, 
line 338, in test_specific_values
self.fail('OverflowError not raised in test %s' % test_str)
AssertionError: OverflowError not raised in test exp0052: 
exp(complex(710.0, 1.5))

--
Ran 11 tests in 0.067s

FAILED (failures=1)
test test_cmath failed -- Traceback (most recent call last):
  File /home/tuba/skipm/src/python-svn/trunk/Lib/test/test_cmath.py, 
line 338, in test_specific_values
self.fail('OverflowError not raised in test %s' % test_str)
AssertionError: OverflowError not raised in test exp0052: 
exp(complex(710.0, 1.5))

==
FAIL: testLog (test.test_math.MathTests)
--
Traceback (most recent call last):
  File /home/tuba/skipm/src/python-svn/trunk/Lib/test/test_math.py, 
line 419, in testLog
self.assertRaises(ValueError, math.log, NINF)
AssertionError: ValueError not raised

==
FAIL: testLog10 (test.test_math.MathTests)
--
Traceback (most recent call last):
  File /home/tuba/skipm/src/python-svn/trunk/Lib/test/test_math.py, 
line 441, in testLog10
self.assertRaises(ValueError, math.log10, NINF)
AssertionError: ValueError not raised

--
nosy: +skip.montanaro

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Fixed.  See r64577
Thanks for the report.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-06-28 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Sounds like re.UNICODE should be on by default when the pattern is a str
instance.

Also (per mailing list discussion) we should probably only allow
matching bytes when the pattern is bytes, and matching str when the
pattern is str.

Finally, is there a use case of re.LOCALE any more? I'm thinking not.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-06-28 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

I've committed the patch which I have for 2.6.

Still need renamings for 3.0, and implementations
of recvfrom_into and recv_into.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Le samedi 28 juin 2008 à 22:20 +, Guido van Rossum a écrit :
 Finally, is there a use case of re.LOCALE any more? I'm thinking not.

It's used for locale-specific case matching in the non-unicode case. But
it looks to me like a bad practice and we could probably remove it.

'C'
 re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE)
 re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE 
 |re.LOCALE)
 locale.setlocale(locale.LC_CTYPE, 'fr_FR.ISO-8859-1')
'fr_FR.ISO-8859-1'
 re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE)
 re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE | 
 re.LOCALE)
_sre.SRE_Match object at 0xb7b9ac28

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3229] Language reference, class definitions: missing text in Programmer's note

2008-06-28 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Thanks fixed in r64581.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-06-28 Thread Antoine Pitrou

New submission from Antoine Pitrou [EMAIL PROTECTED]:

Some patterns can be compiled in str form but not in bytes form. This
was overlooked because the test suite wasn't correctly adapted for py3k:

 re.compile('[\\1]')
_sre.SRE_Pattern object at 0xb7be1410
 re.compile('\\09')
_sre.SRE_Pattern object at 0xb7c4f2f0
 re.compile('\\n')
_sre.SRE_Pattern object at 0xb7be1f50

but:

 re.compile(b'[\\1]')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/reunicode/Lib/re.py, line 188, in compile
return _compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/re.py, line 240, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_compile.py, line 497, in
compile
p = sre_parse.parse(p, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 685, in parse
p = _parse_sub(source, pattern, 0)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 320, in
_parse_sub
itemsappend(_parse(source, state))
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 409, in _parse
this = sourceget()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 215, in get
self.__next()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 204, in __next
char = char + c
TypeError: Can't convert 'int' object to str implicitly
 re.compile(b'\\09')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/reunicode/Lib/re.py, line 188, in compile
return _compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/re.py, line 240, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_compile.py, line 497, in
compile
p = sre_parse.parse(p, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 678, in parse
source = Tokenizer(str)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 187, in
__init__
self.__next()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 204, in __next
char = char + c
TypeError: Can't convert 'int' object to str implicitly
 re.compile(b'\\n')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/reunicode/Lib/re.py, line 188, in compile
return _compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/re.py, line 240, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_compile.py, line 497, in
compile
p = sre_parse.parse(p, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 678, in parse
source = Tokenizer(str)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 187, in
__init__
self.__next()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 204, in __next
char = char + c
TypeError: Can't convert 'int' object to str implicitly

--
components: Regular Expressions
messages: 68925
nosy: pitrou
severity: normal
status: open
title: re.compile fails with some bytes patterns
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I still see another instance of PySet_GET_SIZE on line 1274.

--
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Here is a patch fixing both the bug and the test suite.

--
keywords: +patch
Added file: http://bugs.python.org/file10765/rebytes.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

That one is technically okay because seq really is a set.  But I'm 
okay with you changing it anyway.  It would be nice to see Py_SIZE used 
everywhere in preference to the type specific versions of the same 
macro.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3230
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-06-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

After 4 hours spent with the debugger I think I have an explanation and
a correction of one of the problems.
Note that this only affects the Manager tests.

- The threading.local type overrides getattr and setattr: on every call,
it fetches a dictionary stored in the current ThreadState, and installs
it in its self-dict member, allowing the regular
PyObject_Generic[Get|Set]Attr functions to actually work on thread-local
data.
- Of course, for this to work the GIL must not be released in any way
between the moment self-dict is set, until object's dictionary is
retrieved inside PyObject_Generic[Get|Set]Attr. This condition makes the
code a bit fragile.
With current 2.6b1, there is no path in PyObject_Generic[Get|Set]Attr
that releases the GIL before the dict is retrieved - no decref, no jump
into python code (at least when the attribute name is a string). It's
almost a miracle, indeed.
- The problem is in threadmodule.c, the paragraph starting at line 285:
the first time the local object is accessed, it calls the __init__
method of the threading.local derived class. And this calls python code,
and can release the GIL.
- The consequences are dramatic: this let the possibility for another
thread to start, use the same local object, install its thread-local
dict in self-dict, and stop here; the first thread will wake up with
the wrong dict...
- in the multiprocessing case, a remote call to a synchronization
function grabs the wrong channel, and get bogus results... hence the
cannot wait on un-aquired (sic) lock message.

The actual correction is very short: only one else to remove... Here
is a patch with a test.

Added file: http://bugs.python.org/file10766/threadlocal.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3088
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3212] ssl module - should test for a wrong cert

2008-06-28 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Added this in 2.6, still needs it for 3.x.

--
versions: +Python 3.0 -Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3212
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Here is a preliminary patch which doesn't remove re.LOCALE, but adds
TypeError's for mistyped matchings, a ValueError when specifying
re.UNICODE with a bytes pattern, and implies re.UNICODE for unicode
patterns. The test suite runs fine after a few fixes.

It also includes the patch for #3231 (re.compile fails with some bytes
patterns).

--
keywords: +patch
Added file: http://bugs.python.org/file10767/reunicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-06-28 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10767/reunicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-06-28 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file10768/reunicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com