[issue13903] New shared-keys dictionary implementation

2012-04-06 Thread Mark Shannon

Mark Shannon  added the comment:

How about changing the method-cache size in a separate patch?

On my machine, reducing the method-cache size from 2**10 to 2**9 results
in a very small improvement in performance (with the original dict). 

That way we don't get a performance regression with the new dict  
and the patch is better focussed.

--

___
Python tracker 

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



[issue8555] tkinter doesn't see _tkinter

2012-04-06 Thread py.user

py.user  added the comment:

testing new e-mail

--

___
Python tracker 

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



[issue14508] gprof2html is broken

2012-04-06 Thread Popa Claudiu

Popa Claudiu  added the comment:

Hello. I've attached the new version of the patch. I used with statement in 
add_escapes and the test was rewritten according to David's suggestion.

--
Added file: http://bugs.python.org/file25139/gprof.patch

___
Python tracker 

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



[issue14236] re: Docstring for \s and \S doesn’t mention Unicode

2012-04-06 Thread py.user

Changes by py.user :


--
title: re: Docstring for \s and \S don’t mention Unicode -> re: Docstring for 
\s and \S doesn’t mention Unicode

___
Python tracker 

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



[issue14502] Document better what happens on releasing an unacquired lock

2012-04-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 068a614e9d97 by Sandro Tosi in branch 'default':
Issue #14502: it's RuntimeError on 3.3
http://hg.python.org/cpython/rev/068a614e9d97

--

___
Python tracker 

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



[issue14082] shutil doesn't copy extended attributes

2012-04-06 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

This ticket has a small catch:

There are several namespaces. According to 
http://en.wikipedia.org/wiki/Xattr#Linux :

- user: can be set by anyone
- trusted: root only
- security: root only
- system: even root can’t do that, at least not in my vm

I’m writing a shutil.copyxattr() first which could simple get another argument 
for the namespaces that should be copied.

However what to do inside copy2()?

I’m tending to either:

1. copy only user.*
2. ignore errors in any namespace != user

Personally, I find the second approach rather non-deterministic.

So I’d suggest:

- copyxattr has an extra argument called namespaces with default being 
['user'], so that in theory someone who wants to do something more 
sophisticated can do it.
- copy2 copies only user.* though because that’s what you usually want.

Please let me know what you think about it.

--

___
Python tracker 

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



[issue14502] Document better what happens on releasing an unacquired lock

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> On Thu, Apr 5, 2012 at 5:38 PM, Antoine Pitrou  wrote:
> > Antoine Pitrou  added the comment:
> 
> > Not sure what you're talking about. The doc patch is about unacquired
> > locks, not locks that someone else (another thread) holds.
> 
> Isn't one common reason for not being able to acquire a lock that
> someone else was already holding it?

We're talking about *releasing* an (un)acquired lock, not acquiring it
again...

--

___
Python tracker 

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



[issue14516] test_tools assumes BUILDDIR=SRCDIR

2012-04-06 Thread Ronald Oussoren

New submission from Ronald Oussoren :

When I run "make tests" I get (amongst others) the following test failure:

==
FAIL: test_noargs (test.test_tools.ReindentTests)
--
Traceback (most recent call last):
  File "/Users/ronald/Projects/python/rw/default/Lib/test/test_tools.py", line 
30, in test_noargs
assert_python_ok(self.script)
  File "/Users/ronald/Projects/python/rw/default/Lib/test/script_helper.py", 
line 53, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File "/Users/ronald/Projects/python/rw/default/Lib/test/script_helper.py", 
line 45, in _assert_python
"stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is 2, stderr follows:
/Users/ronald/Projects/python/rw/default/build/python.exe: can't open file 
'/Users/ronald/Projects/python/rw/default/build/Tools/scripts/reindent.py': 
[Errno 2] No such file or directory


This is because the script is actually 
"/Users/ronald/Projects/python/rw/default/Tools/scripts/reindent.py".

The attached patch fixes the issue.

(assigned to eric because he introduced these tests, unless there are 
objections I'll commit during the weekend)

--
assignee: eric.araujo
components: Tests
files: test_tools.patch
keywords: easy, needs review, patch
messages: 157655
nosy: eric.araujo, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: test_tools assumes BUILDDIR=SRCDIR
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25140/test_tools.patch

___
Python tracker 

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



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-06 Thread Rik Poggi

Rik Poggi  added the comment:

Thanks, I'll wait! In the meanwhile I couldn't help to dig a little deeper and 
found that the Metadata class is currently logging a warning. Should the 
commands raise something when there's a warning in strict mode?

I was playing with the check command about this when I stumbled in an odd 
looking piece of code in metadata.py with a FIXME note: "# FIXME this rejects 
UNKNOWN, is that right?" (see attached file). I'm not sure how, but it seems 
related to a "random" (I couldn't find any pattern) log message that sometimes 
give: 

"'UNKNOWN': '0.4.5dev' is not a valid version (field 'Version')"

and others:

"'Name': '0.4.5dev' is not a valid version (field 'Version')"

(I had this with consecutive execution from a simple test that I wrote in 
test_command_check, with metadata['name'] == 'Name').

I hoped to not have wasted your time, but I thought that it could may be 
related to this bug since it seems that the version gets rightfully (but 
strangefully) warned as not valid from this "middle-layer" check point.

--
Added file: http://bugs.python.org/file25141/metadata_set_extract.py

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

New patch with explicit mutually exclusive flags and better comments.

--
Added file: http://bugs.python.org/file25142/ob_is_gc.patch

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Thanks for your comments Jim.
They made me realize that the patch was incomplete.  What is needed are two 
mutually exclusive flags that override the presence of the tp_del slot.  This 
addresses your 1) point and is the case for Generators.

I don't think 2 is important.  Does the context of the call matter?  It is 
merely a question of whether a finalizer will or will not do something trivial.

Finalizers implemented in python can never run from garbage collection.  the 
potential to do harm is simply too great.  Which is why these extensions are 
purely the domain of specialized C extensions.  Hence I don't think adding 
another slot, or allowing self-declared idempotent python finalizers to run 
during cleanup is a good idea.

--

___
Python tracker 

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



[issue14517] Recompilation of sources with Distutils

2012-04-06 Thread Christophe Benoit

New submission from Christophe Benoit :

When using distutils to build a C-extension, I have noticed that 
my C-sources were recompiled as soon as one source file has been touched;
from python 2.6. This was not the case with previous python versions.

--
assignee: eric.araujo
components: Distutils
messages: 157659
nosy: cbenoit, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Recompilation of sources with Distutils
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



[issue10576] Add a progress callback to gcmodule

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

You are right, I was thinking more of pyobject attributes.  I'll fix this then.

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


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

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Not much happening on python-dev.
Perhaps this is not so controversial.

http://www.mail-archive.com/python-dev@python.org/msg66206.html

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I have one question: you're simply doing a binary copy of the WSAPROTOCOL_INFO 
structure. Does it mean sharing wouldn't work between e.g. different MSVC 
builds of Python (if the structure is different), or between a 32-bit and a 
64-bit Python?

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Comments about the patch:
- versionadded should be 3.3, not 3.4
- MultiprocessingFunc would deserve a meaningful, PEP8 name; it should also 
probably be a classmethod on TestSocketSharing
- please use PEP8 for comments (a space after the "#")
- it would be nice to have a test for the ValueError when passing a bytes 
object of the wrong size
- also, there should be a test that the "family", "type" and "proto" attributes 
are correctly set on the fromshare() result (perhaps "timeout" too)

--

___
Python tracker 

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



[issue14510] Regular Expression "+" perform wrong repeat

2012-04-06 Thread YunJian

YunJian  added the comment:

Well, maybe I had never understood this though I use RE oftenly, this is the 
first time I met this and in my mind capture should not perform like this, 
thank you very much!


 发件人: Matthew Barnett 
收件人: tld...@yahoo.com.cn 
发送日期: 2012年4月6日, 星期五, 上午 12:08
主题: [issue14510] Regular Expression "+" perform wrong repeat

Matthew Barnett  added the comment:

If a capture group is repeated, as in r'(\$.)+', only its last match is 
returned.

--

___
Python tracker 

___

--

___
Python tracker 

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



[issue14510] Regular Expression "+" perform wrong repeat

2012-04-06 Thread YunJian

YunJian  added the comment:

If that was caused by capture, I think I should learn and use it from start 
because it gave a result I didn't want but in the way I want, thank you very 
much, I will be more careful next time, thank you!


 发件人: Ezio Melotti 
收件人: tld...@yahoo.com.cn 
发送日期: 2012年4月6日, 星期五, 上午 9:41
主题: [issue14510] Regular Expression "+" perform wrong repeat

Ezio Melotti  added the comment:

['$b$B', '$B$b']

--
assignee:  -> ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

The binary copy:
This is a winsock2 feature.  There is no difference in layout between 32 bits 
and 64 bits.  I also don't think there is a difference between SDK versions.  
However, strangely, there is a difference between unicode and non-unicode 
builds.  But since we are using this in python3, which always uses the same 
unicode setting, this shouldn't be an issue.

I'll take your other comments into account and produce a new patch.
Similar to socket.dup(), the socket shared is assumed to be in "blockin" mode 
(this his how its timeout is initialized).  We can test for that too.

--

___
Python tracker 

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



[issue14516] test_tools assumes BUILDDIR=SRCDIR

2012-04-06 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for catching this.  The definition of projectbase and srcdir is not 
clear to me, I always have to use trial and error to find the right one in my 
tests.  The patch must be applied to all three branches; let me know if I 
should do it.

--
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2012-04-06 Thread Éric Araujo

Éric Araujo  added the comment:

Keep it simple: if a few functions work, there is no need at all to add 
classes.  Before doing more work though I suggest you wait for the feedback of 
the Mac maintainers.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2012-04-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I (as one of the Mac maintainers) like the new functionality, but would like to 
see some changes:

1) as others have noted it is odd that binary and json plists can be read but 
not written

2) there need to be tests, and I'd add two or even three set of tests:

   a. tests that read pre-generated files in the various formats
  (tests that we're compatible with the format generated by Apple)

   b. tests that use Apple tools to generated plists in various formats,
  and check that the library can read them
  (these tests would be skipped on platforms other than OSX)

   c. if there are read and write functions: check that the writer
  generates files that can be read back in.

3) there is a new public function for reading binary plist files, 
   I'd keep that private and add a "format" argument to readPlist
   when there is a need for forcing the usage of a specific format
   (and to mirror the (currently hypothetical) format argument for
   writePlist).

Don't worry about rearchitecturing plistlib, it might need work in that regard 
but that need not be part of this issue and makes it harder to review the 
changes. I'm also far from convinced that a redesign of the code is needed.

--

___
Python tracker 

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



[issue10197] subprocess.getoutput fails on win32

2012-04-06 Thread Éric Araujo

Éric Araujo  added the comment:

I think that adding safer wrappers and deprecating things are valuable but 
different bugs.  In the short term, we could apply the proposed small patch to 
just fix the issue at hand.  Can one of the Windows experts weigh in?

The patch does this:

if mswindows:
pipe = os.popen('( ' + cmd + ' ) 2>&1', 'r')
else:
pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')

It was tested manually; a test should be simple to write.

--
keywords: +needs review
nosy: +tim.golden
stage:  -> test needed

___
Python tracker 

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



[issue14412] Sqlite Integer Fields

2012-04-06 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

What steps can we take to further debug/address this?

--

___
Python tracker 

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



[issue14477] Rietveld test issue

2012-04-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure

2012-04-06 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue14469] Python 3 documentation links

2012-04-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
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



[issue14500] test_importlib fails in refleak mode

2012-04-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1c3bd0cc3eca by Brett Cannon in branch 'default':
Issue #14500: Fix importlib.test.import_.test_packages to clean up
http://hg.python.org/cpython/rev/1c3bd0cc3eca

--
nosy: +python-dev

___
Python tracker 

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



[issue14500] test_importlib fails in refleak mode

2012-04-06 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue14341] sporadic (?) test_urllib2 failures

2012-04-06 Thread R. David Murray

R. David Murray  added the comment:

If one changes the stacklevel in the DeprecationWarnings in the library to '2' 
instead of '1' (I believe it should be '2'), then an interesting array of 
deprecation warnings are issued...including from cookiejar code.

Most of them are in the urllib2 tests, though, and obviously they aren't being 
correctly protected.

I'm not sure what is causing the deprecation test to sometimes succeed and 
sometimes fail, though.  Running python -m unittest.test_urllib2 consistently 
fails for me without the 1->2 change, and consistently passes (but with more 
warnings) with it.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue13749] socketserver can't stop

2012-04-06 Thread Daniel Swanson

Daniel Swanson  added the comment:

what about this?
def __init__(...):
...
self.stop = False
while True:
(do stuff)
if self.stop: break
def quit(or whatever it's called): self.stop = True
That would work without the backwards copatability issue right?

--

___
Python tracker 

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



[issue2377] Replace __import__ w/ importlib.__import__

2012-04-06 Thread Brett Cannon

Brett Cannon  added the comment:

OK, -v/PYTHONVERBOSE is as done as it is going to be by me. Next up is 
(attempting) Windows registry stuff. After that I will push to default with 
test_trace and test_pydoc skipped so others can help me with those.

--

___
Python tracker 

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



[issue14341] sporadic (?) test_urllib2 failures

2012-04-06 Thread Stefan Krah

Stefan Krah  added the comment:

Running test_http_cookiejar and test_urllib2 in succession always
fails here. The same thing occurs when running test_urllib2
twice:

$ ./python -m test test_http_cookiejar test_urllib2
[1/2] test_http_cookiejar
[2/2] test_urllib2
test test_urllib2 failed -- Traceback (most recent call last):
  File "/home/stefan/pydev/cpython/Lib/test/test_urllib2.py", line 628, in 
test_method_deprecations
req.get_host()
  File "/home/stefan/pydev/cpython/Lib/contextlib.py", line 54, in __exit__
next(self.gen)
  File "/home/stefan/pydev/cpython/Lib/test/support.py", line 766, in 
_filterwarnings
missing[0])
AssertionError: filter ('', DeprecationWarning) did not catch any warning

1 test OK.
1 test failed:
test_urllib2

--

___
Python tracker 

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



[issue13749] socketserver can't stop

2012-04-06 Thread Daniel Swanson

Daniel Swanson  added the comment:

Or even better:
def __init__(...):
...
self.stop = False
while not self.stop:
(do stuff)
def quit(or whatever it's called): self.stop = True

--

___
Python tracker 

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



[issue14502] Document better what happens on releasing an unacquired lock

2012-04-06 Thread Jim Jewett

Jim Jewett  added the comment:

On Fri, Apr 6, 2012 at 5:57 AM, Antoine Pitrou  wrote:
> Antoine Pitrou  added the comment:

>> > Not sure what you're talking about. The doc patch is about unacquired
>> > locks, not locks that someone else (another thread) holds.

>> Isn't one common reason for not being able to acquire a lock that
>> someone else was already holding it?

> We're talking about *releasing* an (un)acquired lock, not acquiring it
> again...

Right, but I thought the original motivation was concern over a race
condition in the lock acquisition.

lock.acquire()
try:# What if something happens here, during
try setup?  Leak?
foo()
finally:
lock.release()

vs

try:
lock.acquire()
foo()
finally:
lock.release()   # But what if the acquire failed?

-jJ

--

___
Python tracker 

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



[issue14518] Add bcrypt $2a$ to crypt.py

2012-04-06 Thread Daniel Holth

New submission from Daniel Holth :

The prefix for bcrypt '$2a$' is supported on many systems and could be added to 
crypt.py

Could the documentation mention the available rounds parameter for most of 
these newer hashes? And that Unicode strings are automatically converted to 
utf-8 before being passed into the OS crypt() function, or is that just assumed 
to be common knowledge?

--
messages: 157679
nosy: dholth
priority: normal
severity: normal
status: open
title: Add bcrypt $2a$ to crypt.py

___
Python tracker 

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



[issue14518] Add bcrypt $2a$ to crypt.py

2012-04-06 Thread Daniel Holth

Changes by Daniel Holth :


--
components: +Library (Lib)
versions: +Python 3.3

___
Python tracker 

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



[issue14502] Document better what happens on releasing an unacquired lock

2012-04-06 Thread R. David Murray

R. David Murray  added the comment:

It doesn't matter *how* you get to the situation where you are releasing a lock 
that hasn't been acquired, the point is to document what actually happens when 
you do the release.  And just yesterday I needed to know this, since I have a 
lock that may or may not be currently held when I release it, and now I know I 
can just catch RuntimeError in that case.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Jim Jewett

Jim Jewett  added the comment:

> I don't think 2 is important.  Does the context of the call matter?
> It is merely a question of whether a finalizer will or will not do
> something trivial.

It would affect how I would write such functions.  If I knew that it wouldn't 
be called until the object was already garbage, then I be inclined to move 
parts of tp_del there, and break the cycle.

> Finalizers implemented in python can never run from garbage 
> collection.  the potential to do harm is simply too great.

__del__ methods do run, even if an object was collected by the cycle detector.  
And they can't do any harm that couldn't also be done by a C finalizer.

The only change from today's situation with __del__ is that once an object is 
known to be cyclic garbage, it would get a chance to break the cycles itself 
(or, admittedly, to rescue itself) before the cycle-breaker began making 
arbitrary decisions or gave up and stuffed it in the uncollectable list.

Even in your case, instead of setting a timer to clean out garbage, you could 
have the garbage itself notify your cleaner that it needed attention.

--

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

On Fri, Apr 6, 2012 at 12:51 PM, Jim Jewett  wrote:

> __del__ methods do run, even if an object was collected by the cycle
> detector.  And they can't do any harm that couldn't also be done by a C
> finalizer.
>

No, if an object with a __del__ method is part of a cycle, it is not
collected.  The objects get appended to gc.garbage instead.

See:  http://docs.python.org/py3k/library/gc.html#gc.garbage

--

___
Python tracker 

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



[issue2377] Replace __import__ w/ importlib.__import__

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> OK, -v/PYTHONVERBOSE is as done as it is going to be by me. Next up is
> (attempting) Windows registry stuff. After that I will push to default
> with test_trace and test_pydoc skipped so others can help me with
> those.

Skipped? How so? I think it would be better if you tried to debug them.
I don't think we have anyone active knowledgeable on either trace or
pydoc.

--

___
Python tracker 

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



[issue14478] Decimal hashing very slow, could be cached

2012-04-06 Thread Jim Jewett

Jim Jewett  added the comment:

@Jimbofbx:  You are correct that a value has to be reserved to indicate that 
the hash hasn't been (or can't be) computed, but python uses -1 instead of zero.

An integer can't return itself because a hash is an unboxed integer; that said, 
there is a fast path for small enough integers.  You can see the actual code at
http://hg.python.org/cpython/file/388016438a50/Objects/longobject.c#l2581 

Since it is too late for 3.2, I suggest closing this and opening a separate 3.3 
issue if the existing improvements are not sufficient.

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Right Daniel, but currently an exception is made for Generator objects.  The 
generator can tell that the finalizer won't do anything and then allow 
collection regardless.  It knows the finalizer and that in its state it will at 
most do some Py_DECREF operations.

This patch aims to generalize this exception mechanism, and also its opposite, 
so that we don´t need to rely on the presence of the finalizer slot to decide.  
We can then remove a silly function from the public (but undocumented) API.

Of course, you can only allow collectino of an object with a finalizer if you 
know for sure that it will not do anything but Py_DECREF.  This is possible for 
generators because they are not an inheritable class.  But we could never do 
this in general for a python class.  Even running .py code from the GC 
collector cycle would crash everything instantly.

--

___
Python tracker 

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



[issue14511] _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs

2012-04-06 Thread Éric Araujo

Éric Araujo  added the comment:

Will fix, thanks for the report.

--
assignee: docs@python -> eric.araujo
versions: +Python 3.3

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2012-04-06 Thread d9pouces

d9pouces  added the comment:

I'm working on a class, BinaryPlistParser, which allow to both read and write 
binary files.

I've also added a parameter fmt to writePlist and readPlist, to specify the 
format ('json', 'xml1' or 'binary1', using XML by default). These constants are 
used by Apple for its plutil program.

I'm now working on integrating these three formats to the test_plistlib.py. 
However, the json is less expressive than the other two, since it cannot handle 
dates.

--

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

Are __del__ and tp_del getting conflated in this conversation?  I don't see a 
__del__ method on generator objects:

filfre:$ python3.1 
Python 3.1.2 (r312:79147, Dec  9 2011, 20:47:34) 
[GCC 4.4.3] on linux2
>>> (i for i in range(5)).__del__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'generator' object has no attribute '__del__'

but I may be missing something.

--

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

typeobject.c:
TPSLOT("__del__", tp_del, slot_tp_del, NULL, ""),

I'm not super-familiar with how typeobjects and slots work, but I imagine that 
if a type is defined with a __del__ member, then the tp_del slot is 
automatically filled out.  The converse need not be true.

At any rate, the non-zero-ness of tp_del is what gcmodule.c uses to find out if 
an object has a finaliser.  There is a code rudiment present in gcmodule.c, 
that hints at an earlier time when '__del__' was looked up but that string is 
not actually used.  That can be removed to, eiter as part of this patch or 
separately since it should be quite uncontroversial.

--

___
Python tracker 

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



[issue14518] Add bcrypt $2a$ to crypt.py

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This requires someone to propose a patch. If you are interested, you can read 
the Developer's Guide - http://docs.python.org/devguide/ - for more information 
on how to contribute.

--
nosy: +jafo, pitrou
stage:  -> needs patch

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2012-04-06 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2012-04-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I agree, for reasons stated. Having to skip over the wrong instructions made 
getting started a bit harder for me. I also think TortoiseHG should get more 
than just a mention. The initial re-creation of the recent DAG for each branch 
when starting up Workbench takes some time, but having the graph makes it 
immediately obvious whether the repository is in a proper state -- two heads 
for default and 2.7, three for 3.2 -- both before starting work after pulling 
from py.org and again when ready to push changes back.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Here is a new patch, with more tests.
Note that the process worker function can't be a member function because of how 
multiprocessing works on Windows.

--
Added file: http://bugs.python.org/file25143/duplicate.patch

___
Python tracker 

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



[issue14502] Document better what happens on releasing an unacquired lock

2012-04-06 Thread Jim Jewett

Jim Jewett  added the comment:

> I have a lock that may or may not be currently held when I release it, 
> and now I know I can just catch RuntimeError in that case.

Only if you're willing to make assumptions about the threading model and the 
source of locks.  And I fear the current change overpromises.

For example, the LockType from _dummy_thread raises an error not based on 
RuntimeError, and has comments suggesting it might stop raising entirely.  I 
believe I have seen other Lock-emulation code which also does not raise an 
error, though the closest I can come to finding it right now is 
logging_releaseLock() when the import of either _thread or threading failed.

Starting with 
http://hg.python.org/cpython/file/acea9d95a6d8/Doc/library/threading.rst

I would prefer to change to following two sentences:

If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` 
will be raised.
...
When invoked on an unlocked lock, a :exc:`ThreadError` is raised.

in any of the following ways:

(a) Change "will be"/"is" --> "may be", so it isn't promised:

If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` 
may be raised.
...
When invoked on an unlocked lock, a :exc:`ThreadError` may be raised.

(b) Clarify that it is implementation-specific

If an attempt is made to release an unlocked _thread.lock, a 
:exc:`RuntimeError` will be raised.
...
When invoked on an unlocked _thread.lock, a :exc:`ThreadError` is  raised.

(and add to the caveats)
Locks provided by other modules may have slightly different behavior, 
particularly when an an operation fails.  For example, unlocking without first 
acquiring may raise a different error, or may not raise at all.

(c) Clarify that alternatives are buggy (and fix those in the stdlib)
If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` 
will be raised.
...
When invoked on an unlocked lock, a :exc:`ThreadError` is be raised.


(and add to the caveats)
Historically, many Locks have followed a slightly different contract, 
particularly when an an operation fails.  For example, unlocking without first 
acquiring might raise a different error, or might not even raise at all.

--

___
Python tracker 

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



[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-06 Thread Vinay Sajip

Changes by Vinay Sajip :


--
assignee:  -> vinay.sajip

___
Python tracker 

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



[issue14488] Can't install Python2.7.2

2012-04-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

What version of Windows?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2012-04-06 Thread Jerzy Kozera

Jerzy Kozera  added the comment:

I've updated the patch according to suggestions from Gregory P. Smith. Thanks 
to a change from #12555 (PEP 3151) now just checking for OSError is enough.

(I've decided to use mocked select() instead of calling alarm() to avoid 
depending on timing.)

--
nosy: +Jerzy.Kozera
Added file: http://bugs.python.org/file25144/socketserver_eintr_20120406.diff

___
Python tracker 

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



[issue14516] test_tools assumes BUILDDIR=SRCDIR

2012-04-06 Thread Roumen Petrov

Roumen Petrov  added the comment:

another one is in Lib/packaging/tests/support.py - should be from same commit

--
nosy: +rpetrov

___
Python tracker 

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



[issue14503] docs: 2 code examples not Pygmented (syntax color coded)

2012-04-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> needs patch
title: docs:Code not highlighted -> docs: 2 code examples not Pygmented (syntax 
color coded)
type:  -> behavior
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Here is a new patch, with more tests.
> Note that the process worker function can't be a member function
> because of how multiprocessing works on Windows.

Some comments:
- I said classmethod, not member function; this is how
test_multiprocessing works, so it should be possible...
- why did you change the gethostbyname() tests?
- before using AF_INET6, you might have to test that IPv6 is available
on the test machine (I think there are variables / functions for that in
test_socket)
- in compareSockets:

+if org.proto != 0:
+self.assertEqual(sock.proto, other.proto)

`sock` doesn't seem to exist at all...

--

___
Python tracker 

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



[issue14488] Can't install Python2.7.2

2012-04-06 Thread Janice

Janice  added the comment:

Thank you for comments, but I already fixed the problem :3

--

___
Python tracker 

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



[issue14488] Can't install Python2.7.2

2012-04-06 Thread Janice

Changes by Janice :


--
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



[issue14507] Segfault with starmap and izip combo

2012-04-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Win7, 64 bit, IDLE shell and editor, 3.2.3c2, 24 gb machine, added print():
I got no response for about 10 secs until a process restart happens, which I 
believe means that the background pythonw process stopped.
If I hit ^C before that, I get the Windows segfault equivalent, a process 
stopped window. Then a restart, without the normal red 'keyboard interrupt' 
message.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue14507] Segfault with starmap and izip combo

2012-04-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

3.3.0a2, command prompt window:
'python has stopped working' in about 2 secs.

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

by "memberfunction" I mean a member of the class.  I tried staticmethod and it 
didn't work:
I tried a staticmethod and it didn't work:
==
ERROR: testShare (test.test_socket.TestSocketSharing)
--
Traceback (most recent call last):
  File "D:\pydev\cpython\lib\test\test_socket.py", line 4723, in testShare
p.start()
  File "D:\pydev\cpython\lib\multiprocessing\process.py", line 136, in start
self._popen = Popen(self)
  File "D:\pydev\cpython\lib\multiprocessing\forking.py", line 269, in __init__
dump(process_obj, to_child, HIGHEST_PROTOCOL)
  File "D:\pydev\cpython\lib\multiprocessing\forking.py", line 190, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle : attribute lookup 
builtins.function failed

(Picking this kind of stuff should work of course but that's another story)
But changing it to staticmethod strangely fixes it.  Interesting.

the gethostbynametests were an encoding mistake.  Would not have been checked 
in but it was nice of you to notice.

These are windows only tests for python 3.3.  There is no need to test for IPV6.

Here is yet another patch.

--
Added file: http://bugs.python.org/file25145/duplicate.patch

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-06 Thread James Hutchison

James Hutchison  added the comment:

This is an issue for me (Python 3.2). I have a custom pool that sends arguments 
for a function call over a pipe. I cannot send another pipe as an argument. 

Tim's workaround also does not work for me (win xp 32bit and 64bit)

>From what I can tell, you can only send a connection as a direct argument to a 
>function call. This limits what I can do because I cannot introduce new pipes 
>to a worker process after it is instantiated.

Using this code:

def main():
from multiprocessing import Pipe, reduction
i, o = Pipe()
print(i);
reduced = reduction.reduce_connection(i)
print(reduced);
newi = reduced[0](*reduced[1])
print(newi);
newi.send("hi")
o.recv()

if __name__ == "__main__":
main();

This is my output:


(, 
(('.\\pipe\\pyc-3156-1-q5wwnr', 1756, False), True, True))

Traceback (most recent call last):
  File "H:\mti\secure\Flash\Reliability\Perl_Rel\Ambyx\James\bugs\test.py", 
line 47, in 
main();
  File "H:\mti\secure\Flash\Reliability\Perl_Rel\Ambyx\James\bugs\test.py", 
line 43, in main
newi.send("hi")
IOError: [Errno 10038] An operation was attempted on something that is not a 
socket

As you can see, the handle changes

--
nosy: +Jimbofbx

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

[...]
> But changing it to staticmethod strangely fixes it.  Interesting.

Sorry?

> Here is yet another patch.

Your patch is broken, it has lots of duplicate stuff...

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


Removed file: http://bugs.python.org/file25145/duplicate.patch

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


Removed file: http://bugs.python.org/file25143/duplicate.patch

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-06 Thread James Hutchison

James Hutchison  added the comment:

err, is it possible to edit out those file paths? I didn't intend them to be in 
the message. I'd appreciate it if someone with the privileges to do so could 
remove them.

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

>> But changing it to staticmethod strangely fixes it.  Interesting.
>Sorry?
Don't be, probably not your fault.  Today we have learned that we can spawn 
multipropcessing targets with classmethods, but not staticmethods.

>Your patch is broken, it has lots of duplicate stuff...
Yes, I'm sorry, it was a merging error.  I'm still getting to grips with Hg.  I 
removed the last two and added a new one.  Hope you like it.

--
Added file: http://bugs.python.org/file25146/duplicate.patch

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Yes, I'm sorry, it was a merging error.  I'm still getting to grips
> with Hg.  I removed the last two and added a new one.  Hope you like
> it.

It's still broken.

--

___
Python tracker 

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



[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2012-04-06 Thread Jim Jewett

Jim Jewett  added the comment:

(1)  Why did you change the name of the parameter from index to element?  If 
the underlying engine also accepts indices (e.g., self.activate(4) ) then the 
name should stay.  If it really is only meaningful to use the name of an 
element -- maybe it should still stay for backwards compatibility.  Or at least 
accept the old name too for a release.

Either way, please provide a test case showing that it works under the new 
name; there may also be doc fixes.  (I'm not sure there is documentation for 
this widget, though, and providing some in the first place is good, but perhaps 
a different task.)

FWIW, 
http://docs.python.org/dev/library/tkinter.html#the-index-parameter
suggests that the name should stay index, and can be far more than an element; 
migrating some of that to the docstring might be helpful.

(2)  It looks like the set command took *args to give some freedom.  There may 
be extensions that take a third argument.  It may well be valid to call it 
without any arguments, or with only one.  So the signature may turn into 
set(first=0, last=1, *args) or some such.  Whatever the answer about what 
arguments are really needed, there should be test cases to demonstrate this 
before the API is changed.

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Could you possibly be any more specific?  It works for me.

--

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Could you possibly be any more specific?  It works for me.

Just read it by yourself. There are still duplicate portions there:
http://bugs.python.org/file25146/duplicate.patch

In general, it's nicer to others to review your changes before uploading them.

--

___
Python tracker 

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



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-06 Thread Rik Poggi

Rik Poggi  added the comment:

My assumption that the "random" log message was related to this bug seems to be 
completely wrong. It seems, instead, related to a starstar call of create_dist 
in the support module that will loose the order (of an OrderedDict obviously). 
The behaviour is still strange because in order to reproduce it I had to re-run 
the test different. (test_star_star is the "random" failing one) Attaching the 
diff.

--
Added file: http://bugs.python.org/file25147/test_support.diff

___
Python tracker 

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



[issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

2012-04-06 Thread py.user

New submission from py.user :

http://docs.python.org/py3k/library/re.html#simulating-scanf

0[xX][\dA-Fa-f]+   ->   (0[xX])?[\dA-Fa-f]+

--
assignee: docs@python
components: Documentation, Regular Expressions
messages: 157711
nosy: docs@python, ezio.melotti, mrabarnett, py.user
priority: normal
severity: normal
status: open
title: In re's examples the example with scanf() contains wrong analog for %x, 
%X specifiers
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



[issue13749] socketserver can't stop

2012-04-06 Thread Daniel Swanson

Daniel Swanson  added the comment:

I tryed to fix the problem, here is my attemt.

--
Added file: http://bugs.python.org/file25148/tryfixsocketserver.py

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


Removed file: http://bugs.python.org/file25146/duplicate.patch

___
Python tracker 

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



[issue14310] Socket duplication for windows

2012-04-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Well, I think I have all of the merge errors out now.  You´ll forgive me if I 
didn't notice them all at first, but this is why we review code and you would 
have helped me by giving me specifics, since after a time, the eyes tend to 
glaze over.
Any other comments?

--
Added file: http://bugs.python.org/file25149/duplicate.patch

___
Python tracker 

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



[issue9141] Allow objects to decide if they can be collected by GC

2012-04-06 Thread Jim Jewett

Jim Jewett  added the comment:

On Fri, Apr 6, 2012 at 4:03 PM,
 Daniel Stutzbach  added the comment:

>> __del__ methods do run, even if an object was collected by the cycle
>> detector.  And they can't do any harm that couldn't also be done by a C
>> finalizer.

> No, if an object with a __del__ method is part of a cycle, it is not
> collected.  The objects get appended to gc.garbage instead.

> See:  http://docs.python.org/py3k/library/gc.html#gc.garbage

They can still be collected if there is only one object with a __del__
method in the cycle.

(Whether the code actually does that, it appears not to at the moment,
and I won't swear by by own memory of 2.3 era code.)

--

___
Python tracker 

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



[issue14502] Document better what happens on releasing an unacquired lock

2012-04-06 Thread R. David Murray

R. David Murray  added the comment:

I, on the other hand, would prefer if it were made part of the API contract 
that an error is raised, and to fix any stdlib implementations *of that API* 
that don't conform to that.  (That is, locks from other modules may well not 
follow that API, and their documentation should cover their API.)

--

___
Python tracker 

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



[issue14518] Add bcrypt $2a$ to crypt.py

2012-04-06 Thread R. David Murray

Changes by R. David Murray :


--
type:  -> enhancement

___
Python tracker 

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



[issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

2012-04-06 Thread R. David Murray

R. David Murray  added the comment:

The documentation appears to be correct to me.  Can you demonstrate your 
suggestion with some examples?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

2012-04-06 Thread py.user

py.user  added the comment:

the prefix "0x" is not necessary for the %x specifier in C
if the pattern will see "ABC", it will not match with it, but it should match

--

___
Python tracker 

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



[issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

2012-04-06 Thread py.user

py.user  added the comment:

#include 

int main(void)
{
unsigned n;

scanf("%x", &n);
printf("%u\n", n);
return 0;
}


[guest@localhost c]$ .ansi t.c -o t
[guest@localhost c]$ ./t
0xa
10
[guest@localhost c]$ ./t
a
10
[guest@localhost c]$
[guest@localhost c]$ alias .ansi
alias .ansi='gcc -ansi -pedantic -Wall'
[guest@localhost c]$

--

___
Python tracker 

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



[issue14478] Decimal hashing very slow, could be cached

2012-04-06 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue13708] Document ctypes.wintypes

2012-04-06 Thread Ramchandra Apte

Changes by Ramchandra Apte :


--
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