[issue9567] Add attribute pointing to wrapped function in functools.update_wrapper

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Implemented in r84132

--
stage: unit test needed - committed/rejected
status: open - closed

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Implemented in r84132 (not based on this patch though).

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

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



[issue5215] change value of local variable in debug

2010-08-17 Thread Markus Pröller

Markus Pröller mproel...@googlemail.com added the comment:

Hello,

I have tested this patch since a while. In the meantime I have switched to 
Python 2.6.5, but the problem that I described above is still there.

Another problem that brought the patch is, that when I move a frame up in the 
stack trace, the variables of the current stack are not available any more 
(only the variables of the newest frame are available).

--
components:  -None
nosy: +Markus.Pröller
versions: +Python 2.6 -Python 2.5

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



[issue5215] change value of local variable in debug

2010-08-17 Thread Amaury Forgeot d'Arc

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

 In the meantime I have switched to Python 2.6.5,
 but the problem that I described above is still there.
The fix was made for 2.7, and not backported to 2.6.

 Another problem that brought the patch is, that when I move a frame up
 in the stack trace, the variables of the current stack are not available
 any more (only the variables of the newest frame are available).
This is not my experience: the variables of the current frame are available. 
What did you do exactly?

--
nosy: +amaury.forgeotdarc

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



[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Implemented in r84133

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

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



[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Final name was dis.code_info() and it accepts functions, methods, code objects 
and source strings.

--

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



[issue9623] test_site.py has a couple of stray self.assertTrue calls that test for equality

2010-08-17 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed in r84134 (py3k) and r84135 (2.7). Thanks for the report and the patch!

--
assignee:  - ezio.melotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

The buildbot XP-4 3.x fails on test_dis.
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/2770

test_code_info (test.test_dis.CodeInfoTests) ... FAIL
test_show_code (test.test_dis.CodeInfoTests) ... FAIL

==
FAIL: test_code_info (test.test_dis.CodeInfoTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py, 
line 359, in test_code_info
self.assertEqual(dis.code_info(x), expected)
AssertionError: 'Name:  tricky\nFilename:  
D:\\cygwin\\home\\db3l\\buildarea [truncated]... != 'Name:  
tricky\nFilename:  D:\\cygwin\\home\\db3l\\buildarea [truncated]...
  Name:  tricky
  Filename:  
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py
  Argument count:3
  Kw-only arguments: 3
  Number of locals:  8
  Stack size:7
  Flags: OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
  Constants:
 0: None
-1: code object f at 0x03D750F8, file 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py, 
line 246
?   - ^   ^
+1: code object f at 0x3d750f8, file 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py, 
line 246
?^   ^
  Variable names:
 0: x
 1: y
 2: z
 3: c
 4: d
 5: e
 6: args
 7: kwds
  Cell variables:
 0: e
 1: d
 2: f
 3: y
 4: x
 5: z

==
FAIL: test_show_code (test.test_dis.CodeInfoTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py, 
line 366, in test_show_code
self.assertEqual(output.getvalue(), expected+\n)
AssertionError: 'Name:  tricky\nFilename:  
D:\\cygwin\\home\\db3l\\buildarea [truncated]... != 'Name:  
tricky\nFilename:  D:\\cygwin\\home\\db3l\\buildarea [truncated]...
  Name:  tricky
  Filename:  
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py
  Argument count:3
  Kw-only arguments: 3
  Number of locals:  8
  Stack size:7
  Flags: OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
  Constants:
 0: None
-1: code object f at 0x03D750F8, file 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py, 
line 246
?   - ^   ^
+1: code object f at 0x3d750f8, file 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py, 
line 246
?^   ^
  Variable names:
 0: x
 1: y
 2: z
 3: c
 4: d
 5: e
 6: args
 7: kwds
  Cell variables:
 0: e
 1: d
 2: f
 3: y
 4: x
 5: z

--
keywords: +buildbot
nosy: +flox
status: closed - open

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



[issue9625] argparse: Problem with defaults for variable nargs

2010-08-17 Thread Martin Pengelly-Phillips

New submission from Martin Pengelly-Phillips d...@thesociable.net:

Variable argument count plays badly with choices.

Example:

 import argparse
 parser = argparse.ArgumentParser()
 parser.add_argument('choices', nargs='*', default='a', choices=['a',
'b', 'c'])
 args = parser.parse_args()
 print type(args.choices)
type 'str'
 args = parser.parse_args(['a'])
 print type(args.choices)
type 'list'


If the user specifies the value on the command line then a list is used, but if 
the value comes from the default a string is used.
Unfortunately, changing default to a list value gives an error:
error: argument choices: invalid choice: ['a'] (choose from 'a', 'b',
'c')

Additionally, this means it is also not possible to use default=['a', 'c']. 

The current workaround is to create a custom type:

def my_type(string):
if string not in ['a', 'b', 'c']:
raise TypeError
return string

--
components: Library (Lib)
messages: 114108
nosy: thesociable
priority: normal
severity: normal
status: open
title: argparse: Problem with defaults for variable nargs
type: behavior
versions: Python 2.6

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



[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I changed the test to a regex match that ignores the specific ID value of the 
nested function in r84137. That should make the buildbots happier.

--

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Antoine Pitrou

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

Adding new global objects looks a bit complicated. Why not simply update all 
thread-local objects when the global flag is set?

--
nosy: +pitrou

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Good question.  Is that simple to do?  I didn't think to look if there were a 
central list of all python TLS states.

--

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Antoine Pitrou

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

 Good question.  Is that simple to do?  I didn't think to look if there
 were a central list of all python TLS states.

There's a linked list from the current interpreter state, which in turn
can be got from the current thread state (see Include/pystate.h).
Of course, it would be better to add macros than access the fields
directly.

--

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Sounds like a much simpler change.  I'll try that out instead.

--

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



[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Switching to a regex match made the backslashes in windows paths a problem. 
r84139 changes the test to just ignore all the variable info in the code_info 
results so we'll see how that goes.

--

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



[issue8202] sys.argv[0] and python -m package

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Implemented in r84140.

Leaving issue open until the buildbots give it a clean bill of health (since 
the command line tests can be a little quirky when it comes to cross platform 
differences)

--
resolution:  - accepted
stage: unit test needed - committed/rejected

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



[issue9584] Allow curly braces in fnmatch

2010-08-17 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I agree with Antoine that this would be useful functionality and that matching 
the shell is futile here.

A quick check on an old linux server: bash and ksh do brace expansion before 
expanding '*', but that csh does both at the same time.

That is, in a directory with foo.py and no .h files 'echo *.{py,h}' returns 
foo.py with csh and '*.h foo.py' with bash.

I'm +1 on matching the behavior of csh here.

--
nosy: +ronaldoussoren

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



[issue9626] OderedDict.viewitems() does not preserve item order

2010-08-17 Thread Alexey Luchko

New submission from Alexey Luchko l...@ank-sia.com:

OrderedDict.viewitems() is expected to preserve item order like items() do
 from collections import OrderedDict
 d = OrderedDict([(1, 2), (a, b)])
 d.items()
[(1, 2), ('a', 'b')]

But it does not:
 list(d.viewitems())
[('a', 'b'), (1, 2)]

--
components: Library (Lib)
messages: 114117
nosy: luch
priority: normal
severity: normal
status: open
title: OderedDict.viewitems() does not preserve item order
type: behavior
versions: Python 2.7

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



[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

The windows buildbot still doesn't appear to be particularly happy, but this 
issue also doesn't appear to be the culprit anymore.

--
status: open - closed

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



[issue9584] Allow curly braces in fnmatch

2010-08-17 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

It's worth noting that the sh-like shells are far more widely used than the 
csh-like shells, so csh-like behavior may surprise more people.

From the sh-like shell perspective, the {...,...} syntax just isn't part of 
the globbing handling.

--
nosy: +fdrake

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



[issue9625] argparse: Problem with defaults for variable nargs

2010-08-17 Thread Steven Bethard

Changes by Steven Bethard steven.beth...@gmail.com:


--
nosy: +bethard
stage:  - needs patch
versions: +Python 2.7, Python 3.2 -Python 2.6

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



[issue9627] Regrtest failed to clean up temporary directory

2010-08-17 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

Watching the Windows buildbot to check if test_dis was working yet, I found 
this output:

http://www.python.org/dev/buildbot/stable/builders/x86%20XP-4%203.x/builds/2774/steps/test/logs/stdio

It appears something still had files open in the directory when regrtest was 
attempting to clean it out.

--
messages: 114120
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Regrtest failed to clean up temporary directory
type: behavior
versions: Python 3.2

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



[issue9627] Regrtest failed to clean up temporary directory

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

The ref count over 1 million at the end of that output is also rather
suspicious.

--

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



[issue9627] Regrtest failed to clean up temporary directory

2010-08-17 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

This is usually because the bug mentioned in issue7443 (although it 
could be something else, obviously). It should sort itself out on the 
next run. I'll rerun on my local checkout to see if there real WinXP issues.

--
nosy: +tim.golden

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



[issue9627] Regrtest failed to clean up temporary directory

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Reading through the other issue, I think you're right. Closing as a duplicate 
of issue 7443.

--
resolution:  - duplicate
status: open - closed
superseder:  - test.support.unlink issue on Windows platform

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



[issue7443] test.support.unlink issue on Windows platform

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I closed issue 9627 as a duplicate of this - the buildbot failure referenced 
there was most likely due to something else holding open a temporary file that 
the test suite thought was closed.

--
nosy: +ncoghlan

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



[issue9626] OderedDict.viewitems() does not preserve item order

2010-08-17 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue8866] socket.getaddrinfo() should support keyword arguments

2010-08-17 Thread Giampaolo Rodola'

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

Isn't that exactly as it was before?
Being now possible to specify single keyword arguments aren't [ brackets 
necessary?

--

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2010-08-17 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +alfmel

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



[issue6683] smtplib authentication - try all mechanisms

2010-08-17 Thread Giampaolo Rodola'

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

A test suite is now available for both smtpd and smtplib modules.

--
nosy: +giampaolo.rodola

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



[issue6683] smtplib authentication - try all mechanisms

2010-08-17 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +alfmel

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



[issue821862] ftplib: Strict RFC 959 (telnet in command channel)

2010-08-17 Thread Giampaolo Rodola'

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

Other than IAC what other chars need to be doubled?
As an alternative to a brand new TelnetFTP class this can be implemented as a 
FTP class attribute (strict_telnet maybe) defaulting to True.

--

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



[issue8807] poplib should support SSL contexts

2010-08-17 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
assignee:  - giampaolo.rodola

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Here is a new, much simpler patch, which simply sets the flags on all the 
threads (accessable as a linked list of PyThreadState objects) as suggested by 
Antoine.

(Note that neither of the patches has the necessary enhancements to _lsprof.c 
to make the profiling data sensible.  That is the subject of issue 9609)

--
Added file: http://bugs.python.org/file18553/glob.patch

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



[issue8866] socket.getaddrinfo() should support keyword arguments

2010-08-17 Thread Giampaolo Rodola'

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

Committed in r84143 including the doc change as suggested by Antoine.

--
resolution:  - fixed
status: open - closed

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



[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-08-17 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

STINNER Victor wrote:
 
 STINNER Victor victor.stin...@haypocalc.com added the comment:
 
 Note that the buffer interface release API is meant to protect
 against such modifications, so I don't see why rejecting objects
 that do implement this API should be rejected.
 
 As I explained, the release API is *not* used by PyObject_AsCharBuffer() in 
 Python 2.7 and 3.2.
 
 Pseudo-code example:
 ---
 PyObject_AsCharBuffer(obj, str, size)
 ... modify or destroy obj ...
 str is no more valid here
 ---

Right, but as I explained before: this doesn't really happen in
practice, otherwise we would have had issues with these APIs
long before the Py_buffers were introduced.

Note that the same comment applies to PyObject_AsReadBuffer() and
PyObject_AsWriteBuffer().

For Python 2.7 you can't change anything anymore. For Python 3.2
you could start a deprecation process as outlined in PEP 4, if you
feel this really is such a big issue.

 Restricting the API to read-only buffers would seriously limit
 it's functionality. I'm -1 on doing that.
 
 PyObject_AsCharBuffer() is dangerous because the caller has to ensure that 
 the object is not modified or destroyed. Antoine proposes to deprecated 
 PyObject_AsCharBuffer().
 
 PyObject_GetBuffer() can replace PyObject_AsCharBuffer(): it's easy to get 
 the pointer to the buffer content (view.buf) and the size (view.len) using 
 PyObject_GetBuffer(), and it does protect the buffer against modification or 
 destuction thanks to the release API (PyBuffer_Release). But 
 PyObject_GetBuffer() is maybe a little bit to low level, eg. it doesn't check 
 that the buffer is contiguous, and it requires a flag argument. A new 
 function is maybe needed to replace PyObject_AsCharBuffer(). Eg. 
 PyObject_GetCharBuffer() which will call PyObject_GetBuffer() (the caller 
 will then have to call PyBuffer_Release() to release the buffer).
 
 Example:
 ---
 PyObject_GetCharBuffer(obj, view, str, size)
 ... use str and size ...
 PyBuffer_Release(view);
 ---
 or just
 ---
 PyObject_GetCharBuffer(obj, view)
 ... use view.buf and view.len ...
 PyBuffer_Release(view);
 ---

Why add a new function ? Python 3.2 doesn't provide a way to access
a *character* buffer version of an object anymore. Not that this is
good, or shouldn't be readded at some point, but right now, we don't
have a need for such an API.

--

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



[issue9601] ftplib should accept 250 on MKD

2010-08-17 Thread alphablue52

alphablue52 alphablu...@yahoo.de added the comment:

250 is an invalid response to MKD.
M$ Windows Server 2003 does it anyways.
M$ Windows Server is a rather common OS, and there are people like me how have 
to live with this.

Maybe it should put this into the following words:
Please make ftplib usuable with M$ Win Server 2003

--

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



[issue8807] poplib should support SSL contexts

2010-08-17 Thread Giampaolo Rodola'

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

Committed in r84144 including context being the last constructor argument.

--
resolution:  - fixed
status: open - closed

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



[issue821862] ftplib: Strict RFC 959 (telnet in command channel)

2010-08-17 Thread Oleg Broytmann

Oleg Broytmann p...@phd.pp.ru added the comment:

 Other than IAC what other chars need to be doubled?

Only IAC must be doubled. Also there have to be a special prefix for urgent 
(out-of-bound) commands (ABORt); I didn't implement that.

 As an alternative to a brand new TelnetFTP class this can be implemented as a 
 FTP class attribute (strict_telnet maybe) defaulting to True.

See the first patch. Default value is False to preserve backward compatibility.

--

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



[issue9628] runtests.sh -x doesn't work with more than two args (sed error)

2010-08-17 Thread Dave Malcolm

New submission from Dave Malcolm dmalc...@redhat.com:

runtests.sh -x fails to work with more than two tests; for example, running:
  $ ./runtests.sh -x test_httplib test_http_cookies test_dl
erroneously runs test_dl

By default, sed -e s only substitutes the first match - the invocations 
within runtests.sh need to add the trailing g flag to  substitute all matches.

From info sed:
   The `s' command can be followed by zero or more of the following
FLAGS:
`g'
 Apply the replacement to _all_ matches to the REGEXP, not just the
 first.

Am attaching a patch.

(Seen with sed-4.2.1 on Fedora 13)

--
components: Tests
files: fix-sed-invocations-in-runtests.sh.patch
keywords: easy, needs review, patch, patch
messages: 114134
nosy: dmalcolm
priority: normal
severity: normal
stage: patch review
status: open
title: runtests.sh -x doesn't work with more than two args (sed error)
versions: Python 3.1, Python 3.2, Python 3.3
Added file: 
http://bugs.python.org/file18554/fix-sed-invocations-in-runtests.sh.patch

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



[issue9601] ftplib should accept 250 on MKD

2010-08-17 Thread Giampaolo Rodola'

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

What IIS version are we talking about?
Could you please paste the complete response string other than just the code?
I'm asking this because 257 response is supposed to include the name of the 
created directory.

Personally I don't like to include workarounds for stupid implementations like 
this.
If IIS erroneously replies with 250 then maybe it doesn't even include the 
directory name in which case FTP.mkd method is completely useless for you and 
you can just work around the exception by using FTP.sendcmd('MKD dirname') 
instead.

--

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



[issue9628] runtests.sh -x doesn't work with more than two args (sed error)

2010-08-17 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

FWIW it works with two args, but adding the third fails; echoing PAT indicates 
the generated regex is missing the | separator:
^(test_httplib|test_http_cookies test_dl)$

--

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Jon Parise

Jon Parise j...@indelible.org added the comment:

There are a few places in the patch where you call the global version 
immediately followed by the local version.  For example:

+PyEval_SetGlobalTrace(NULL, NULL);
 PyEval_SetTrace(NULL, NULL);

Isn't the local call now redundant given that the global version clears all of 
the threadstates already?

--
nosy: +jon

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



[issue9601] ftplib should accept 250 on MKD

2010-08-17 Thread Antoine Pitrou

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

Well, given that both replies (expected and actual) are in the 25x category, 
and that (according to the RFC) “the third digit gives a finer gradation of 
meaning in each of the function categories, specified by the second digit”, 
perhaps practicality beats purity and the exact return code isn't that 
important as long as it falls in the right category.

(what would a Web browser do in that case? say it receives a 201 instead of a 
200 or something)

Apparently bzr users hit this bug:
https://bugs.launchpad.net/bzr/+bug/224373

--
nosy: +pitrou

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



[issue433029] SRE: posix classes aren't supported

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

This has not been implemented as part of the new regex module, see :-

http://mail.python.org/pipermail/python-dev/2010-July/102181.html

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7

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



[issue460474] codecs.StreamWriter: reset() on close()

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Anyone interested in this?  Marc-Andre seemed +0.? on this in msg61288.

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7

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



[issue502236] Asynchronous exceptions between threads

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Is anyone likely to work on this given msg53440 quote Does anybody want to 
write a PEP on thread cancellation? It sure looks like a hairy issue!

--
nosy: +BreamoreBoy
versions:  -Python 2.7

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



[issue9601] ftplib should accept 250 on MKD

2010-08-17 Thread alphablue52

alphablue52 alphablu...@yahoo.de added the comment:

Jep I also discovered it by using Bazaar, but apparently it goes down to the 
ftplib. The bazaar fix works, and here is the response of strato.com (I use 
bash ftp):

ftp open ftp.strato.com
Connected to ftp.strato.com.
220 Speak friend, and enter
Name (ftp.strato.com:ich): m...@mywebsite.com
331 FTP login okay, send password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp mkdir test
250 Directory created.

--

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

I think it's too late to try to get this into 2.6.6.  rc2's already been 
released, I don't expect/want an rc3, and I'm not comfortable changing this at 
this point.  Unless you can convince me it's absolutely critical, I won't 
approve this for 2.6.6.

--
versions:  -Python 2.6

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



[issue9629] SIZEOF_SOCKET_T used in longobject.h but undefined

2010-08-17 Thread Antoine Pitrou

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

longobject.h uses SIZEOF_SOCKET_T:

#if SIZEOF_SOCKET_T = SIZEOF_LONG
#define PyLong_FromSocket_t(fd) PyLong_FromLong((SOCKET_T)(fd))
#define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLong(fd)
#else
#define PyLong_FromSocket_t(fd) PyLong_FromLongLong(((SOCKET_T)(fd));
#define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLongLong(fd)
#endif

but SIZEOF_SOCKET_T doesn't exist at that point since it is defined in 
Modules/socketmodule.h which isn't part of Include/Python.h. As a result, 
PyLong_FromSocket_t is always aliased to PyLong_FromLong, which is wrong under 
64-bit Windows (a SOCKET is 64-bit there, while a long is 32-bit).

--
components: Extension Modules
messages: 114144
nosy: brian.curtin, christian.heimes, pitrou, tim.golden
priority: normal
severity: normal
stage: needs patch
status: open
title: SIZEOF_SOCKET_T used in longobject.h but undefined
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

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



[issue9629] SIZEOF_SOCKET_T used in longobject.h but undefined

2010-08-17 Thread Antoine Pitrou

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

This is witnessed in MSVC warning messages such as:

2..\Modules\socketmodule.c(1611) : warning C4244: 'function' : conversion from 
'SOCKET_T' to 'long', possible loss of data

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9629
___
___
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-08-17 Thread A.M. Kuchling

Changes by A.M. Kuchling li...@amk.ca:


--
nosy:  -akuchling

___
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



[issue9626] OderedDict.viewitems() does not preserve item order

2010-08-17 Thread Raymond Hettinger

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

The effort to backport dictviews was incomplete.
Fixed in r84148.
Thanks for the report.

--
resolution:  - fixed
status: open - closed

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



[issue9625] argparse: Problem with defaults for variable nargs

2010-08-17 Thread Eric Smith

Changes by Eric Smith e...@trueblade.com:


--
nosy: +eric.smith

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



[issue9629] SIZEOF_SOCKET_T used in longobject.h but undefined

2010-08-17 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Looks like a dup of issue 4835

--
nosy: +dmalcolm

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



[issue5737] add Solaris errnos

2010-08-17 Thread A.M. Kuchling

A.M. Kuchling li...@amk.ca added the comment:

This patch looks unproblematic to me, unless we're trying to keep 
platform-specific error codes out of errnomodule.c.

I removed Python 2.7 and 3.1 from Versions, guessing that this change would be 
unacceptable in a bugfix release.

--
nosy: +akuchling
stage: needs patch - patch review
versions: +Python 3.2 -Python 2.7, Python 3.1

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



[issue9629] SIZEOF_SOCKET_T used in longobject.h but undefined

2010-08-17 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
resolution:  - duplicate
status: open - closed
superseder:  - SIZEOF_SOCKET_T not defined

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



[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou

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

We don't need a separate header file, the definitions can go into pyport.h 
instead.

--
nosy: +brian.curtin, pitrou, tim.golden
versions: +Python 2.7 -Python 3.3

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



[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou

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

However, since this makes SOCKET_T public, it should probably be renamed to 
Py_SOCKET_T.

--
nosy: +loewis

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



[issue9612] setobject.c warnings under 64-bit Windows

2010-08-17 Thread Antoine Pitrou

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

This is now fixed in r84146 (py3k) and r84151 (3.1). I've made the hash field 
a Py_ssize_t, consistently with the dict implementation.

--
resolution:  - fixed
status: open - closed

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



[issue9612] setobject.c warnings under 64-bit Windows

2010-08-17 Thread Martin v . Löwis

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

I'm not sure whether backporting it to 3.1 is a good idea. It's potentially an 
ABI change (although a minor one, as the field offsets remain the same, only 
the interpretation of the padding may change).

--

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Are there any applications out there that actually rely on forking during 
import?

(someone discovered this bug... i'd like to know why.  i think its a disgusting 
thing to do but never explicitly disallowed it in the past)

--

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now 10.3 but 10.5 during configure

2010-08-17 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I can reproduce this with a script that builds and installs a couple of python 
versions, annoyingly enough I don't understand why that code fails.

In particular, in my script the run of python that fails is started with this 
code:


lg.debug(Run setup script with '%s', python)
pprint.pprint(os.environ)
p = subprocess.Popen([
python, setup.py, install],
cwd=distribute_dir, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)


This prints the environment and then runs a setup.py script. What confuses me 
is that the printed environment does *not* contain MACOSX_DEPLOYMENT_TARGET 
while that is the only way to trigger this bug.

--

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



[issue9612] setobject.c warnings under 64-bit Windows

2010-08-17 Thread Antoine Pitrou

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

 I'm not sure whether backporting it to 3.1 is a good idea. It's
 potentially an ABI change (although a minor one, as the field offsets
 remain the same, only the interpretation of the padding may change).

Well, it is unlikely that anyone is accessing setentry structures
directly, given that no API function returns one, and the hash collision
resolution algorithm is not provided.

--

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now 10.3 but 10.5 during configure

2010-08-17 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This (untested) patch should fix the issue:


Index: Lib/sysconfig.py
===
--- Lib/sysconfig.py(revision 84147)
+++ Lib/sysconfig.py(working copy)
@@ -295,9 +295,8 @@
 cur_target = cfg_target
 os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
 elif map(int, cfg_target.split('.'))  map(int, cur_target.split('.')):
-msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now %s but %s '
-   'during configure' % (cur_target, cfg_target))
-raise IOError(msg)
+os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
+cfg_target = cur_target
 
 # On AIX, there are wrong paths to the linker scripts in the Makefile
 # -- these paths are relative to the Python source, but when installed


This removes the exception, and instead replaces the incompatible environment 
setting by the configured setting.

It might be better to just have:

Index: Lib/sysconfig.py
===
--- Lib/sysconfig.py(revision 84147)
+++ Lib/sysconfig.py(working copy)
@@ -291,13 +291,8 @@
 if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in vars:
 cfg_target = vars['MACOSX_DEPLOYMENT_TARGET']
 cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '')
-if cur_target == '':
-cur_target = cfg_target
+if cur_target != cfg_target:
 os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
-elif map(int, cfg_target.split('.'))  map(int, cur_target.split('.')):
-msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now %s but %s '
-   'during configure' % (cur_target, cfg_target))
-raise IOError(msg)
 
 # On AIX, there are wrong paths to the linker scripts in the Makefile
 # -- these paths are relative to the Python source, but when installed


This entirely ignores the environment variable and always uses the value that 
was present during the configure run.

--

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



[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou

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

After trying it out, pulling SOCKET in the Python headers brings complications 
under Windows, because you need to include winsock2.h which in turn breaks 
compilation of _pickle.c (duplicate definition of FLOAT, INT, etc.).

An alternative approach would be to define only SIZEOF_SOCKET_T in the standard 
headers (we don't actually need access to the SOCKET type to compute it, as the 
current hard-coding shows), and leave SOCKET_T in socketmodule.h.

--

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



[issue9614] _pickle is not entirely 64-bit safe

2010-08-17 Thread Amaury Forgeot d'Arc

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

The warnings at lines 284, 301, 461, 647 are benign. The attached patch fixes 
them.

The others (lines 628, 1320, 1558, 1806) are real issues: pickle will fail when 
given a list, a tuple or a dict larger than INT_MAX, or when the memo is too 
large.

There are other issues in 2.7: pickling a large string fails with a 
SystemError(Negative size passed to PyString_FromStringAndSize)

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file18556/pickle_warnings_easy.patch

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



[issue504152] rfc822 long header continuation broken

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Confirmed still an issue in py3k by using the email subject line from msg8771 
and adding two extra test cases to TestParsers got two failures.  Tried several 
variations of the patch from msg71573 (in the original the parantheses are 
unbalanced) and pushed the number of failures to over 80.  I've attached a 
patch against the unit test file, note that the comments will need changing.

--
nosy: +BreamoreBoy
stage: unit test needed - needs patch
versions: +Python 3.2 -Python 2.6, Python 3.0
Added file: http://bugs.python.org/file18555/email_test.diff

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



[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou

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

Here is a patch implementing the approach I proposed above.
It successfully removes warnings about casting SOCKET to long under 64-bit 
Windows.

--
Added file: http://bugs.python.org/file18557/sockdefine.patch

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



[issue9584] Allow curly braces in fnmatch

2010-08-17 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


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

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



[issue6683] smtplib authentication - try all mechanisms

2010-08-17 Thread Gerhard Häring

Gerhard Häring g...@ghaering.de added the comment:

Wow! That's great!

--

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Indeed it is.  This is a remnant of the previous method.  I will fix it, and 
add documentation.  I also think I'll leave the change to _lsprof out of this 
so that this change can stand on its own, irrespective of the profiling engine 
being used.

--

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



[issue502236] Asynchronous exceptions between threads

2010-08-17 Thread Antoine Pitrou

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

For the record, there is now a C API function (PyThreadState_SetAsyncExc()) to 
raise an asynchronous exception on a Python thread, although the signature is 
bizarre (it takes the thread id rather than the thread state structure itself).

--
nosy: +pitrou

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

I just realized that this is probably a redundant change.
We have C apis to get all the Thread states in an interpreter state (I didn't 
even know there was such a thing as multiple interpreter states, but there!)
This is the PyInterpreterState_ThreadHead() api et al.
From C, all that is missing is a SetTrace api that takes a thread state.

From python, the threading module provides access to all Thread objects, and 
each of those has a settrace/setprofile method.

To turn on global tracing from cProfile, all that is needed is to iterate over 
all the Thread objects.

--

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



[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Setting this to invalid, since there already are APIs to do this, at least from 
.py code.

--
resolution:  - invalid

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

It turns out my proposed patch is incorrect anyway - it will do the wrong thing 
if a thread *other* than the one doing the fork is in the middle of a nested 
import at the time the fork occurs.

With issue 7242 establishing that the current thread ID may not survive the 
forking process on all platforms, the only way I can see to get completely 
correct semantics for the fork-as-a-side-effect of import case is to give the 
forking thread another way to detect did I own the import lock before the 
fork?. One way to do that would be to move the lock nesting count into thread 
local storage, although that would likely suffer cross-platform incompatibility 
fun and games as well.

Given that, I'm inclined to go with what Brett said: don't do that. Use a 
__name__ == __main__ guard so the fork only happens when run as a script, not 
when imported.

--
assignee: barry - 
priority: release blocker - normal

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



[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Brian Curtin

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

sockdefine.patch seems fine to me.

--

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



[issue9193] Versioned .so files

2010-08-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


Removed file: http://bugs.python.org/file17895/preview.diff

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



[issue9193] Versioned .so files

2010-08-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


Removed file: http://bugs.python.org/file17972/2010-07-12.txt

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



[issue9193] Versioned .so files

2010-08-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


Removed file: http://bugs.python.org/file18125/diff.txt

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



[issue9193] PEP 3149 (versioned .so files) reference implementation

2010-08-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
title: Versioned .so files - PEP 3149 (versioned .so files) reference 
implementation
Added file: http://bugs.python.org/file18558/pep3149.txt

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Alex Roitman

Alex Roitman rsh...@gmail.com added the comment:

gregory.p.smith: This is my use case: we had the following situation with the 
test scripts at work.  Each script is required to import TestApi module in 
order to run the tests.  That module in turn imported the module that forks, 
and in the parent waits for the child to exit, then kills all child's children 
processes.  That way tests don't leave any processes behind.

So any script that imported the cleanup module, whether directly or via another 
module, had this cleanup functionality for free. One workaround for this 
issue would be to change all existing test scripts to call the cleanup 
function, instead of the cleanup module calling it at the module level.

I can see your reservations about forking/starting threads during import, but 
it seems like it either should work or it should be disallowed.  The thing is, 
the actual import is working fine with the fork() call, it's releasing the lock 
that is messed up, because it was not initialized correctly after the fork.  
The patch attached by ncoghlan looks good though.

--

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Alex Roitman

Alex Roitman rsh...@gmail.com added the comment:

I already worked around this for my use case.

For the future, it would be nice if fork() raised an exception if called during 
the import, and if the documentation mentioned that forking while in import is 
not allowed.

--

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



[issue3488] Provide compress/uncompress functions on the gzip module

2010-08-17 Thread Antoine Pitrou

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

Modified patch committed in r84155 (py3k). Thanks for your contribution!

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

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Agreed on the explicit exception and documentation. :)

--

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



[issue504219] locale.resetlocale is broken

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Still a problems on py3k.  Set stage to needs patch as it's so easy to 
reproduce.

--
assignee: mhammond - 
nosy: +BreamoreBoy
stage: unit test needed - needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Alex Roitman

Alex Roitman rsh...@gmail.com added the comment:

Will starting a thread while in import also be disallowed?  If so, issue 7242 
will also become moot...

--

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-17 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

On further further reflection - I'm back to thinking my patch is correct. With 
the way fork is now implemented, the forking thread *always* holds the import 
lock, so the assumption in my patch regarding the meaning of the nesting level 
is correct.

It could use a comment in _PyImport_ReInitLock to better explain that, though.

Unless there are any objections, I'll apply the fix to 2.7, 3.1 and 3.2.

2.6 is out of luck though (as per Barry's comment). I'll do a doc change for 
that, but I can't promise I'll get to it before the binary releases go out.

--

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



[issue513840] entity unescape for sgml/htmllib

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Is anyone aware if this was implemented in 2.5 or later as hinted at in 
msg61077?  If yes please close this.  If no any point in putting this into 3.2?

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7

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



[issue515073] subtypable weak references

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Closing as nobody replied to msg71508.

--
nosy: +BreamoreBoy
resolution:  - wont fix
status: open - closed

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



[issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows

2010-08-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +brian.curtin, tim.golden

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



[issue515074] Extended storage in new-style classes

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

I'll close this unless there's a positive response within a couple of weeks.

--
nosy: +BreamoreBoy
status: open - pending

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



[issue515073] subtypable weak references

2010-08-17 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

You can create weakref subclasses anyway now.

--
resolution: wont fix - out of date

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



[issue539907] Tkinter lock conflicts extension widgets

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

@Guilherme I'm guessing that you're still interested in this, yes?

--
nosy: +BreamoreBoy

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



[issue515074] Extended storage in new-style classes

2010-08-17 Thread Dave Abrahams

Dave Abrahams d...@boostpro.com added the comment:

I can't imagine what kind of positive response you'd want from me.  I 
responded to the last question asked.  I certainly don't know whether this is 
still an issue, though.

--
nosy: +dabrahams
status: pending - open

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



[issue592703] HTTPS does not handle pipelined requests

2010-08-17 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

is this still an issue or can it be closed as out fo date?

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue616013] cPickle documentation incomplete

2010-08-17 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
assignee:  - d...@python
nosy: +d...@python
versions: +Python 3.1

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



[issue539907] Tkinter lock conflicts extension widgets

2010-08-17 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

 @Guilherme I'm guessing that you're still interested in this, yes?

I don't see the point in closing an issue simple because no one
responded. I think the question to be asked is more towards is it
solved? than are you interested on it?. If the issue is invalid
considering all the changes that happened since the initial message
then I'm in favor in closing it.

--

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



[issue616013] cPickle documentation incomplete

2010-08-17 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
versions:  -Python 3.1, Python 3.2

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



[issue8063] Call _PyGILState_Init() earlier in Py_InitializeEx()

2010-08-17 Thread STINNER Victor

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

While working on #9425, I usually hit two annoying issues:
 - _PyObject_Dump() crashs (assertion error) if I call it (with gdb) in 
Py_InitializeEx()
 - because of python-gdb.py, gdb does segfault (I don't know yet where it does 
come from)

So I'm back on the GIL topic: I still would like to initialize the GIL earlier 
in Py_InitializeEx(). As Amaury wrote, I think that the right place is just 
after (void) PyThreadState_Swap(tstate);. This is exactly what does my new 
patch (for py3k).

I think that only python 3.2 should be patched.

--
Added file: http://bugs.python.org/file18559/gil_state_init-py3k.patch

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



  1   2   >