[issue8153] 'set' union() fails in specific use case

2010-03-17 Thread Frank Rene Schaefer

Frank Rene Schaefer  added the comment:

Thanks, for the comments. I got it. 

In German we would say 'I was standing on the water hose' ... 
That is, something was choking the flow of my thoughts.

Best Regards

Frank

--

___
Python tracker 

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



[issue8161] inconsistency behavior in ctypes.c_char_p dereferencing

2010-03-17 Thread Jackson Yang

New submission from Jackson Yang :

# Python 3.1.2rc1 (r312rc1:78742, Mar  7 2010, 07:49:40)
# [MSC v.1500 32 bit (Intel)] on win32
import ctypes

class T(ctypes.Structure):
_fields_ = (
('member', ctypes.c_char * 16),
)

# dereference a c_char_Array variable would return 
print('%r'%((ctypes.c_char * 16)()[:]))
# dereference from a c_char_Array member would return , which is buggy
print('%r'%(T().member[:]))

--
assignee: theller
components: ctypes
messages: 101214
nosy: nullnil, theller
severity: normal
status: open
title: inconsistency behavior in ctypes.c_char_p dereferencing
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue6541] SpooledTemporaryFile breakages

2010-03-17 Thread Dan

Changes by Dan :


--
nosy: +danohuiginn

___
Python tracker 

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



[issue8162] logging.disable() incoherency

2010-03-17 Thread Pascal Chambon

New submission from Pascal Chambon :

Hello

I see some trouble in the semantic of logging.disable(lvl) :
according to the doc (and docstrings), it's the same as a logger.setLevel(lvl) 
called on all logger, but in reality it doesn't act the same way : when we call 
logger.setLevel(lvl), log messages at level lvl WILL be logged, whereas with 
logger.disable(lvl), they will NOT be logged (CF method below from 
logging/__init__.py).

So maybe the best would be to explain that disable() also disable the target 
level itself, and to set by default this disabling level to -1 (and not 0 as 
currently), so that by default ALL messages get loged, even those set to level 
0.

def isEnabledFor(self, level):
"""
Is this logger enabled for level 'level'?
"""
if self.manager.disable >= level:
return 0
return level >= self.getEffectiveLevel()

--
assignee: georg.brandl
components: Documentation, Library (Lib)
messages: 101215
nosy: georg.brandl, pakal
severity: normal
status: open
title: logging.disable() incoherency
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue8163] DictionaryServices module broken in python2.6 and later

2010-03-17 Thread Shashwat Anand

New submission from Shashwat Anand :

I am able to call DictionaryServices module from python2.5 and later. However 
it works correctly only on python2.5. Below is the stack-trace on using 
DictionaryServices on python2.5, python2.6 and python2.7

Shashwat-Anands-MacBook-Pro:PyObjCTest l0nwlf$ python2.5
Python 2.5.4 (r254:67916, Jul  7 2009, 23:51:24) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import DictionaryServices
>>> word = "lone wolf"
>>> DictionaryServices.DCSCopyTextDefinition(None, word, (0, len(word))) 
u'noun \na person who prefers to act or be alone. \n'
>>> 

Shashwat-Anands-MacBook-Pro:Desktop l0nwlf$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import DictionaryServices
>>> word = "lone wolf"
>>> DictionaryServices.DCSCopyTextDefinition(None, word, (0, len(word)))
Traceback (most recent call last):
  File "", line 1, in 
IndexError: NSRangeException - *** -[OC_PythonString 
_createSubstringWithRange:]: Range or index out of bounds
>>> 

Shashwat-Anands-MacBook-Pro:Desktop l0nwlf$ python2.7
Python 2.7a4+ (trunk:78750, Mar  7 2010, 08:09:00) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import DictionaryServices
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named DictionaryServices

--
assignee: ronaldoussoren
components: Macintosh
messages: 101216
nosy: l0nwlf, ronaldoussoren
severity: normal
status: open
title: DictionaryServices module broken in python2.6 and later
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue8163] DictionaryServices module broken in python2.6 and later

2010-03-17 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

This module is not part of Python stdlib. MacOSX might have bundled it by 
default. Reporting it to Apple might help.

--
nosy: +orsenthil
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue8163] DictionaryServices module broken in python2.6 and later

2010-03-17 Thread Florent Xicluna

Florent Xicluna  added the comment:

See also:
 * http://pypi.python.org/pypi/pyobjc-framework-DictionaryServices/

--
nosy: +flox

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-03-17 Thread Florent Xicluna

Florent Xicluna  added the comment:

re-opened to track the issue on Sparc Solaris

--
resolution: fixed -> 
stage:  -> needs patch
status: closed -> open

___
Python tracker 

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



[issue3783] dbm.sqlite proof of concept

2010-03-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


___
Python tracker 

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



[issue1275] bsddb closing a DB object before all DBCursors using it are closed crashes

2010-03-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue3783] dbm.sqlite proof of concept

2010-03-17 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



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

2010-03-17 Thread Florent Xicluna

Florent Xicluna  added the comment:

> Checking the pybsddb 4.8.4devel with current trunk I still see this:

It is because the "test_early_close" module calls resetwarnings().
It defeats the filter in the "threading" module.

You may change the test case with a context manager:

  with warnings.catch_warnings():
  warnings.resetwarnings()
  # test the warning

--

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-03-17 Thread Matthias Klose

Matthias Klose  added the comment:

no access to solaris hardware. please could you run the libffi testsuite on 
this machine? make sure that expect is installed.

--

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Florent Xicluna

Florent Xicluna  added the comment:

here come the patch.

--
components: +Tests
keywords: +easy, patch
stage: test needed -> patch review
versions: +Python 2.7
Added file: http://bugs.python.org/file16572/issue8155_check_warnings_quiet.diff

___
Python tracker 

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



[issue8162] logging.disable() incoherency

2010-03-17 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +vinay.sajip
priority:  -> normal
versions: +Python 3.1, Python 3.2

___
Python tracker 

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



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

2010-03-17 Thread Ezio Melotti

Ezio Melotti  added the comment:

I took part of Florent latest patch, changed a few things and committed it in 
r79023.

--

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

On a quick read through, the patch looks fine to me.

I actually agree it would be nice if we could keep the "quiet=True" default 
(since it is a better match for the feature set we want in our own tests), but 
I see the compatibility issue as a deal breaker for that idea.

It's probably worth adding a comment to that effect at the top of the function 
implementation to help people coming along later and asking "why did they 
choose the 'wrong' default value?".

--

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Florent Xicluna

Florent Xicluna  added the comment:

I hesitate to do it differently:

with check_warnings(('', RuntimeWarning)):
 ==> translate to check_warnings(('', RuntimeWarning), quiet=False)

with check_warnings():
 ==> translate to check_warnings(quiet=True)

If the developer passes some arguments to the function, it means that he 
expects some warnings, and he should not need to add "quiet=False" each time.
And it preserves backward compatibility for existing code.

I guess that we push same behavior for 3.x.

--

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-17 Thread Jim Smyth

Jim Smyth  added the comment:

Is there any chance of this being resolved in time for any 2.x release? I have 
a non-blocking application that I recently switched over to SSL and ran into 
this bug. I can work around it by trying to shorten the messages and beefing up 
the buflen, but these solutions are not ideal.

--
nosy: +jimsmyth

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

On a second look, there are a couple of things missing:
- the default value didn't actually get changed!
- we should add an explicit test that the no argument behaviour doesn't raise a 
warning by default

Since we don't really have an existing test suite for the support code, I'd 
suggest coopting test_sundry.py for the purpose.

I agree that an exception should be raised if the user passes in an expected 
warning but no warning at all is encountered.

--

___
Python tracker 

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



[issue8162] logging.disable() incoherency

2010-03-17 Thread Vinay Sajip

Vinay Sajip  added the comment:

I've updated the docstring and documentation to be more precise (r79026).

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

___
Python tracker 

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



[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-17 Thread Vinay Sajip

Vinay Sajip  added the comment:

Closing, as no feedback received. Please feel free to reopen when you have the 
answer to my question!

--
resolution:  -> invalid
status: pending -> closed

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-03-17 Thread Matthias Klose

Matthias Klose  added the comment:

the ports which are maintained separately still need an update:

libffi_msvc
  libffi trunk now has a port to x86/msvc. might require some
  extra updates from libffi.

libffi_osx:
  3.0.9 has support for darwin on powerpc and x86

libffi_wince:
  same, support seems to be included.

--

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-03-17 Thread Mark Dickinson

Mark Dickinson  added the comment:

For anyone interested, there's an ongoing python-dev discussion about how to 
resolve this at

http://mail.python.org/pipermail/python-dev/2010-March/098437.html

--

___
Python tracker 

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



[issue3928] os.mknod missing on Solaris

2010-03-17 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Sorry, Barry. Don't know what happened. Probably write a followup without 
reloading the page and "undid" previous changes.

I keep my issues permanently open in firefox tabs. I will try to be more 
careful.

--

___
Python tracker 

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



[issue8164] (lambda:"foo").func_doc

2010-03-17 Thread Armin Rigo

New submission from Armin Rigo :

Lambdas are a bit confused about their docstrings.  Usually they don't have 
any, but:

>>> (lambda x: "foo"+x).func_doc

'foo'

--
keywords: easy
messages: 101233
nosy: arigo
priority: low
severity: normal
status: open
title: (lambda:"foo").func_doc
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue7512] shutil.copystat may fail EOPNOTSUPP

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> pitrou
nosy: +pitrou
resolution:  -> accepted
stage:  -> commit review

___
Python tracker 

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



[issue7512] shutil.copystat may fail EOPNOTSUPP

2010-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

For the record, this seems to break Mercurial on NFS-mounted repositories:
http://www.selenic.com/pipermail/mercurial/2010-March/030716.html

--

___
Python tracker 

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



[issue7512] shutil.copystat may fail EOPNOTSUPP

2010-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Barry, I suppose this doesn't warrant being a release blocker for 2.6.5, but in 
any case you're welcome to advise.

--
nosy: +barry

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Will apply after 2.6.5.

--
assignee:  -> pitrou
resolution:  -> accepted
stage: patch review -> commit review

___
Python tracker 

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



[issue7682] Optimisation of if with constant expression

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +rhettinger

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +flox
resolution: accepted -> fixed
status: pending -> closed

___
Python tracker 

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



[issue3783] dbm.sqlite proof of concept

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
type: behavior -> feature request

___
Python tracker 

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



[issue3580] failures in test_os

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: pitrou -> 

___
Python tracker 

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



[issue3581] failures in test_uuid

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: pitrou -> 

___
Python tracker 

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



[issue1518] Fast globals/builtins access (patch)

2010-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

There probably isn't any point in such a complication, until perhaps we have a 
JIT that magnifies the improvement.
(but I assume the JIT will be able to treat references to globals and builtins 
as "frozen" using its own logic)

--

___
Python tracker 

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



[issue1518] Fast globals/builtins access (patch)

2010-03-17 Thread Collin Winter

Collin Winter  added the comment:

Antoine: yes, this optimization is already implemented in the Unladen JIT.

--

___
Python tracker 

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



[issue1518] Fast globals/builtins access (patch)

2010-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks Collin, recommend closing then.

--

___
Python tracker 

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



[issue477863] New gc work

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +flox

___
Python tracker 

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



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> needs patch
title: New gc work -> Print warning at shutdown if gc.garbage not empty
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue8162] logging.disable() incoherency

2010-03-17 Thread Pascal Chambon

Pascal Chambon  added the comment:

Thanks you B-)

I guess it's not important if messages of severity 0 will allways be ignored 
with the current semantic ?

--

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: 
http://bugs.python.org/file16572/issue8155_check_warnings_quiet.diff

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch updated.

--
Added file: 
http://bugs.python.org/file16573/issue8155_check_warnings_quiet_v2.diff

___
Python tracker 

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



[issue8165] logging.handlers.RotatingFileHandler fails when delay parameter is set to True

2010-03-17 Thread Eli Courtwright

New submission from Eli Courtwright :

Here's a summary of the issue (also presented at 
http://stackoverflow.com/questions/2465073)

When I run the following code

{{{
import logging
from logging.handlers import RotatingFileHandler

rfh = RotatingFileHandler("testing.log", delay=True)
logging.getLogger().addHandler(rfh)
logging.warning("Boo!")
}}}

then the last line throws "AttributeError: RotatingFileHandler instance has no 
attribute 'level'".  So I add the line

{{{
rfh.setLevel(logging.DEBUG)
}}}

before the call to addHandler, and then the last line throws "AttributeError: 
RotatingFileHandler instance has no attribute 'filters'". So if I manually set 
filters to be an empty list, then it complains about not having the attribute 
"lock", etc.

When I remove the delay=True, the problem completely goes away.

So one of the parent __init__ methods somewhere up the class hierarchy isn't 
getting called when delay is set. Examining the source code to the file 
logging/__init__.py, I see the following code in the FileHandler.__init__ 
method:

{{{
if delay:
self.stream = None
else:
stream = self._open()
StreamHandler.__init__(self, stream)
}}}

It looks like the FileHandler.emit method checks for un-opened streams and 
finishes initialization when logging is performed:

{{{
if self.stream is None:
stream = self._open()
StreamHandler.__init__(self, stream)
StreamHandler.emit(self, record)
}}}

So the problem is that in the BaseRotatingHandler.emit method, the 
shouldRollover and doRollover methods are called before emit-ing the record. 
This causes methods to be called which themselves assumed that the __init__ 
process has completed.

Unfortunately, I don't have time right now to submit a patch, though I might be 
able to find the time within the next few months if no one else gets to it 
first.  Hopefully this report is detailed enough to easily convey the problem.

--
components: Library (Lib)
messages: 101242
nosy: Eli.Courtwright
severity: normal
status: open
title: logging.handlers.RotatingFileHandler fails when delay parameter is set 
to True
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue8165] logging.handlers.RotatingFileHandler fails when delay parameter is set to True

2010-03-17 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> vinay.sajip
nosy: +vinay.sajip

___
Python tracker 

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



[issue8164] (lambda:"foo").func_doc

2010-03-17 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r79034.

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

___
Python tracker 

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



[issue8155] Incompatible change to test.test_support.check_warnings behaviour

2010-03-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Ah, I didn't notice that there were already tests for this in test_warnings 
(that's what I get for commenting late at night).

Updated patch looks good.

--

___
Python tracker 

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



[issue8162] logging.disable() incoherency

2010-03-17 Thread Vinay Sajip

Vinay Sajip  added the comment:

- Original Message 

> From: Pascal Chambon 

> I guess it's not important if messages 
> of severity 0 will allways be ignored with the current semantic 
> ?

Levels are supposed to be positive integers, zero is a special value indicating 
a level that isn't set.

--

___
Python tracker 

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



[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in trunk, and additional tests ported to py3k.

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

___
Python tracker 

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



[issue7512] shutil.copystat may fail EOPNOTSUPP

2010-03-17 Thread Joerg Sonnenberger

Joerg Sonnenberger  added the comment:

A better approach might be to change the function to:

def copystat(src, dst):
  st = os.stat(src)
  st_dst = os.stat(dst)
  mode = stat.S_IMODE(st.st_mode)
  mode_dst = stat.S_IMODE(st_dst.st_mode)
  if hasattr(os, 'utime'):
if st.st_atime != st_dst.st_atime or st.st_mtime != st_dst.st_mtime
  os.utime(dst, (st.st_atime, st.st_mtime))
  if hasattr(os, 'chmod'):
if mode != mode_dst:
  os.chmod(dst, mode)
  if hasattr(os, 'chflags') and hasattr(st, 'st_flags'):
if st.st_flags != st_dst.st_flags:
  os.chflags(dst, st.st_flags)

This avoids the system calls for the (common) case of not having to change 
anything at all. Given that the flags are normally not set, it also avoids the 
problem with NFS.

--
nosy: +joerg

___
Python tracker 

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



[issue8165] logging.handlers.RotatingFileHandler fails when delay parameter is set to True

2010-03-17 Thread Vinay Sajip

Vinay Sajip  added the comment:

Please check that there is nothing wrong with your Python installation. I get 
this result:

vi...@eta-jaunty:~/projects/scratch$ ls testing.log
ls: cannot access testing.log: No such file or directory
vi...@eta-jaunty:~/projects/scratch$ cat rfhtest.py 
import logging
from logging.handlers import RotatingFileHandler

rfh = RotatingFileHandler("testing.log", delay=True)
logging.getLogger().addHandler(rfh)
logging.warning("Boo!")

vi...@eta-jaunty:~/projects/scratch$ python --version
Python 2.6.2
vi...@eta-jaunty:~/projects/scratch$ python rfhtest.py
vi...@eta-jaunty:~/projects/scratch$ cat testing.log
Boo!
vi...@eta-jaunty:~/projects/scratch$ 

I'll mark this issue as pending for now, it certainly doesn't fail for me as it 
does for you, can you give more information about the problem?

I'll investigate the issue based on your analysis - can you tell me more about 
the platform you're on? Is there an existing log file when you get the error?

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

___
Python tracker 

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



[issue8165] logging.handlers.RotatingFileHandler fails when delay parameter is set to True

2010-03-17 Thread Vinay Sajip

Vinay Sajip  added the comment:

I've investigated: this issue was fixed in r68829 dated 20 Jan, 2009. This was 
after the release of 2.6.1 but before the release of 2.6.2.

Please upgrade to Python 2.6.2.

--
resolution: works for me -> out of date
status: pending -> closed

___
Python tracker 

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



[issue8165] logging.handlers.RotatingFileHandler fails when delay parameter is set to True

2010-03-17 Thread Vinay Sajip

Vinay Sajip  added the comment:

I've investigated: this issue was fixed in r68829 dated 20 Jan, 2009. This was 
after the release of 2.6.1 but before the release of 2.6.2.

Please upgrade to Python 2.6.2.

--

___
Python tracker 

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



[issue8165] logging.handlers.RotatingFileHandler fails when delay parameter is set to True

2010-03-17 Thread Vinay Sajip

Changes by Vinay Sajip :


--

___
Python tracker 

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



[issue8166] hashlib constructors for sha224, sha256, sha384, sha512 missing in Python 3.1.2rc1 with openssl 0.9.7

2010-03-17 Thread Ned Deily

New submission from Ned Deily :

3.1.2 Release Blocker

If Python 3.1.2rc1 is built with openssl 0.9.7 (which lacks support for sha256 
and sha512), hashlib is supposed to substitute use of built-in C 
implementations for them.  With 3.1.2rc1, the "built-in" versions are available 
via hashlib.new() but not by their "always available" constructor functions.  
This causes major test failures in test_hashlib, test_hmac, and test_pep247.  
The problem is critical for OS X installer builds because both OS X 10.4 and 
10.5 ship with openssl 0.9.7 but the problem should show up on other platforms 
using 0.9.7 as well.

The following comparison between 2.6.5rc2 and 3.1.2rc1 demonstrates the problem:

Python 2.6.5rc2 (release26-maint, Mar 15 2010, 00:15:31) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.new('sha1')

>>> hashlib.sha1()

>>> hashlib.new('sha512')
<_sha512.sha512 object at 0x6b3a0>
>>> hashlib.sha512()
<_sha512.sha512 object at 0x6b480>
>>> dir(hashlib)
['__builtins__', '__doc__', '__file__', '__get_builtin_constructor', 
'__hash_new', '__name__', '__package__', '__py_new', '_hashlib', 'md5', 'new', 
'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
>>> dir(_hashlib)
['__doc__', '__file__', '__name__', '__package__', 'new', 'openssl_md5', 
'openssl_sha1', 'openssl_sha224', 'openssl_sha256', 'openssl_sha384', 
'openssl_sha512']
 
Python 3.1.2rc1+ (release31-maint, Mar 17 2010, 12:38:35) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.new('sha1')

>>> hashlib.sha1()

>>> hashlib.new('sha512')
<_sha512.sha512 object at 0x9d640>
>>> hashlib.sha512()
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'sha512'
>>> dir(hashlib)
['__builtins__', '__doc__', '__file__', '__get_builtin_constructor', 
'__hash_new', '__name__', '__package__', '__py_new', '_hashlib', 'md5', 'new', 
'sha1']
>>> dir(_hashlib)
['__doc__', '__file__', '__name__', '__package__', 'new', 'openssl_md5', 
'openssl_sha1']

It appears the cause of the problem was a mismatch of merges to 3.1.  In 
response to Issue6281, some major cleanup to hashlib.py went into trunk in 
r74479 and py3k in r74482 but was not backported to 2.6 or 3.1.  Later, r77608 
to trunk added some conditional compilation tests in _hashopenssl.c based on 
openssl version, which was fine on top of the hashlib.py cleanup.  Still later, 
r77408 was auto-merged to py3k in r77937 (OK) *and* 3.1 in r77938 which is NOT 
OK, because the old hashlib.py in (3.1 and 2.6) indirectly depends on all of 
the openssl_* names being defined in _hashlib.

Probably the best solution for 3.1 at this point is to revert the conditional 
tests in _hashopenssl.c.

--
messages: 101251
nosy: benjamin.peterson, gregory.p.smith, ned.deily, ronaldoussoren
severity: normal
status: open
title: hashlib constructors for sha224, sha256, sha384, sha512 missing in 
Python 3.1.2rc1 with openssl 0.9.7
versions: Python 3.1

___
Python tracker 

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



[issue8166] hashlib constructors for sha224, sha256, sha384, sha512 missing in Python 3.1.2rc1 with openssl 0.9.7

2010-03-17 Thread Ned Deily

Ned Deily  added the comment:

Should be: "Still later, r77608 was auto-merged [...]"

--

___
Python tracker 

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