[issue15001] segmentation fault with del sys.module['__main__']

2012-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b256d054f229 by Hynek Schlawack in branch '3.2':
Issue #15001: fix segfault on del sys.module['__main__']
http://hg.python.org/cpython/rev/b256d054f229

New changeset 215297665098 by Hynek Schlawack in branch '3.3':
Issue #15001: fix segfault on del sys.module['__main__']
http://hg.python.org/cpython/rev/215297665098

New changeset 859ef54bdce2 by Hynek Schlawack in branch 'default':
Issue #15001: fix segfault on del sys.module['__main__']
http://hg.python.org/cpython/rev/859ef54bdce2

--
nosy: +python-dev

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



[issue15001] segmentation fault with del sys.modules['__main__']

2012-11-07 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
title: segmentation fault with del sys.module['__main__'] - segmentation fault 
with del sys.modules['__main__']

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Here's a demo patch (against Python 2.7) which counts hash value collisions and 
slot collisions. I had posted that in the original ticket where we discussed 
the hash problem (http://bugs.python.org/issue14621).

This avoids issues like attack 1 mentioned in 
http://mail.python.org/pipermail/python-dev/2012-January/115726.html

Attack 2 in that email can easily be worked around by reducing the collision 
limit to a smaller number.

Even better: An application could even dynamically adjust the maximum collision 
counts by catching the exception and setting a new upper limit depending on its 
knowledge of the field of application - warning the sysadmin of a potential 
problem and allowing her to take action. That way the application could start 
with a low safe maximum collision number of say 100 and then raise the limit in 
a controlled way.

BTW: When trying out new hash functions, you need to look not only at the 
performance of the hash function, but also (and more importantly) at the effect 
on dictionaries.

Just as reminder: The integer key problem is still open. Using the demo script 
http://bugs.python.org/file24300/integercollision.py, it's easy to keep Python 
going for minutes without any major effort.

I don't understand why we are only trying to fix the string problem and 
completely ignore other key types. Strings are easy to send to a web server, 
yes, but there are other applications out there which take input data from 
other sources/formats as well (e.g. csv files). And it's not unusual to convert 
input strings to integers to use them as dictionary keys, say item IDs or 
counts. So while the string keys may not cause a problem, the integer keys 
still might.

--
keywords: +patch
Added file: http://bugs.python.org/file27917/hash-attack-3.patch

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



[issue16413] Non cross-platform behavior of os.path.split

2012-11-07 Thread anatoly techtonik

anatoly techtonik added the comment:

I don't know about the differences. An expert is required.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 09:34, Marc-Andre Lemburg wrote:
 
 Here's a demo patch (against Python 2.7) which counts hash value collisions 
 and slot collisions. I had posted that in the original ticket where we 
 discussed the hash problem (http://bugs.python.org/issue14621).

Sorry, wrong URL. The correct one is http://bugs.python.org/issue13703

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Giovanni Bajo

Giovanni Bajo added the comment:

Until it's broken with a yet-unknown attack, SipHash is a pseudo-random 
function and as such it does uniformly distribute values across the output 
space, and never leak any information on the key (the randomized seed). Being 
designed by cryptographers, it is likely that it doesn't turn out to be a 
fail like the solution that was just released (no offense intended, but it's 
been a large-scale PR failure).

As long as we don't introduce bias while reducing SipHash's output to fit the 
hash table size (so for instance, usage of modulus is not appropriate), then 
the hash function should behave very well.

Any data type can be supplied to SipHash, including numbers; you just need to 
take their (platform-dependent) memory representation and feed it to SipHash. 
Obviously it will be much much slower than the current function which used to 
be hash(x) = x (before randomization), but that's the price to pay to avoid 
security issues.

--

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



[issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

For some reason, the roundup bot didn't pick up the check in, so here's the 
reference by hand:

http://hg.python.org/peps/rev/95a73d5a3af7
changeset:   4578:95a73d5a3af7
user:Marc-Andre Lemburg m...@egenix.com
date:Wed Nov 07 09:42:07 2012 +0100
summary:
  Issue #16420:
Convert PEP 249 (DB-API 2.0) to ReST format to allow linking to the
various parts.

The conversion was done mostly by Daniele Varrazzo.

--

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



[issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText

2012-11-07 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg m...@egenix.com:


--
status: open - closed

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



[issue15001] segmentation fault with del sys.modules['__main__']

2012-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4ebe1ede981e by Hynek Schlawack in branch '2.7':
Issue #15001: fix segfault on del sys.modules['__main__']
http://hg.python.org/cpython/rev/4ebe1ede981e

--

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



[issue15001] segmentation fault with del sys.modules['__main__']

2012-11-07 Thread Hynek Schlawack

Hynek Schlawack added the comment:

This should be fixed now, thanks to all who helped!

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

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



[issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document

2012-11-07 Thread Martin Kugler

New submission from Martin Kugler:

Calling doc.replaceChild(new_child, old_child) with new_child and old_child 
being similar nodes in two different documents results in new_child to be 
removed from its document instead of old_child being removed from doc.

Example:
new_child = get_element_x(doc_a)
old_child = get_element_x(doc_b)
parent = get_element_y(doc_b)
parent.replaceChild(new_child, old_child)

= new_child will be removed from doc_a. Instead old_child should be removed 
from doc_b.

--
components: XML
messages: 175057
nosy: Martin.Kugler
priority: normal
severity: normal
status: open
title: minidom replaceChild(new_child, old_child) removes new_child even if in 
another document
type: behavior
versions: Python 2.7

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



[issue16422] Decimal constants should be the same for py c module versions

2012-11-07 Thread Stefan Krah

Stefan Krah added the comment:

It would be possible to translate strings to integers; the infrastructure
is already there for pickling. The decision not to do that was actually
deliberate: Up to now no one has requested string constants for rounding
modes and I *suspect* that there's a performance penalty even though I
didn't measure it.


See Modules/_decimal/_decimal.c:1211 for the code that would need to
be called each time something like this occurs:

  context.rounding = ROUND_UP

--

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



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Václav Šmilauer

Václav Šmilauer added the comment:

Attaching patch based on Andrew's review, agains latest hg (80291:859ef54bdce).

For the MSVC files, I copied what was there for _testcapimodule in PC/VS9.0 and 
PCbuild, and created two new UUIDs: one for _testimportmultiple itself 
(36D0C52C-DF4E-45D0-8BC7-E294C3ABC781; used in .sln, .vcproj and .vcxproj 
files), and one for _testimportmultiple.vcxproj.filters 
(1ec38ad9-1abf-4b80-8628-ac43ccba324b; used only once).

Please check that I did that correctly. (I am wondering how can one maintain 
such a build system.)

I also added myself to Misc/ACKS (and sent contributor agreement by mail), 
added the entry to Misc/NEWS.

--
components: +Extension Modules -Interpreter Core
type: enhancement - behavior
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file27918/many-modules-in-one-so_3.diff

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



[issue16424] regression: os.path.split('//hostname/foo/bar.txt')

2012-11-07 Thread anatoly techtonik

anatoly techtonik added the comment:

Does that mean that Py3's split() uses splitunc() instead of splitdrive()?

--

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



[issue16424] regression: os.path.split('//hostname/foo/bar.txt')

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No. splitunc() is deprecated.

http://docs.python.org/3/library/os.path.html#os.path.splitdrive
http://docs.python.org/3/library/os.path.html#os.path.splitunc

--

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



[issue16424] regression: os.path.split('//hostname/foo/bar.txt')

2012-11-07 Thread anatoly techtonik

anatoly techtonik added the comment:

Ok, so how to fix the regression?

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg:

As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm 
creating this ticket to test the roundup email interface.

--
assignee: lemburg
components: None
messages: 175063
nosy: lemburg
priority: normal
severity: normal
status: open
title: RoundUp signature removal test (please ignore)
type: behavior

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:33, Marc-Andre Lemburg wrote:
 
 New submission from Marc-Andre Lemburg:
 
 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm 
 creating this ticket to test the roundup email interface.

Email reply 1.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm 
 creating this ticket to test the roundup email interface.
 
 Email reply 1.

Email reply 2.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:34, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm 
 creating this ticket to test the roundup email interface.

 Email reply 1.
 
 Email reply 2.

Email reply 3.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm 
 creating this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.
 
 Email reply 3.

Email reply 4.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:35, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, 
 I'm creating this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.
 
 Email reply 4.

Email reply 5 with short sig.

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:36, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, 
 I'm creating this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.
 
 Email reply 5 with short sig.

Email reply 6 with 3 line sig.

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:37, M.-A. Lemburg wrote:
 On 07.11.2012 11:36, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, 
 I'm creating this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.

 Email reply 5 with short sig.
 
 Email reply 6 with 3 line sig.

Email reply 7 with 5 line sig.

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:38, M.-A. Lemburg wrote:
 On 07.11.2012 11:37, M.-A. Lemburg wrote:
 On 07.11.2012 11:36, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, 
 I'm creating this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.

 Email reply 5 with short sig (1 line).

 Email reply 6 with 3 line sig.
 
 Email reply 7 with 5 line sig.

Email reply 8 with 7 line sig.

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:39, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:38, M.-A. Lemburg wrote:
 On 07.11.2012 11:37, M.-A. Lemburg wrote:
 On 07.11.2012 11:36, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on 
 http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating 
 this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.

 Email reply 5 with short sig (1 line).

 Email reply 6 with 3 line sig.

 Email reply 7 with 5 line sig.
 
 Email reply 8 with 7 line sig.

Email reply 8 with 9 line sig.

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:41, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:39, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:38, M.-A. Lemburg wrote:
 On 07.11.2012 11:37, M.-A. Lemburg wrote:
 On 07.11.2012 11:36, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on 
 http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating 
 this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.

 Email reply 5 with short sig (1 line).

 Email reply 6 with 3 line sig.

 Email reply 7 with 5 line sig.

 Email reply 8 with 7 line sig.
 
 Email reply 9 with 9 line sig.

Email reply 10 with 11 line sig.

-- 
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! 
   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:42, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:41, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:39, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:38, M.-A. Lemburg wrote:
 On 07.11.2012 11:37, M.-A. Lemburg wrote:
 On 07.11.2012 11:36, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on 
 http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating 
 this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.

 Email reply 5 with short sig (1 line).

 Email reply 6 with 3 line sig.

 Email reply 7 with 5 line sig.

 Email reply 8 with 7 line sig.

 Email reply 9 with 9 line sig.
 
 Email reply 10 with 11 line sig.

Email reply 11 with 10 line sig.

-- 
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! 
   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:43, Marc-Andre Lemburg wrote:
 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 11:42, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:41, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:39, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:38, M.-A. Lemburg wrote:
 On 07.11.2012 11:37, M.-A. Lemburg wrote:
 On 07.11.2012 11:36, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:35, M.-A. Lemburg wrote:
 On 07.11.2012 11:34, Marc-Andre Lemburg wrote:

 Marc-Andre Lemburg added the comment:

 On 07.11.2012 11:34, M.-A. Lemburg wrote:
 On 07.11.2012 11:33, Marc-Andre Lemburg wrote:

 New submission from Marc-Andre Lemburg:

 As discussed on 
 http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm 
 creating this ticket to test the roundup email interface.

 Email reply 1.

 Email reply 2.

 Email reply 3.

 Email reply 4.

 Email reply 5 with short sig (1 line).

 Email reply 6 with 3 line sig.

 Email reply 7 with 5 line sig.

 Email reply 8 with 7 line sig.

 Email reply 9 with 9 line sig.

 Email reply 10 with 11 line sig.
 
 Email reply 11 with 10 line sig.

Email reply 12 with 9 line (excluding empty lines) sig.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg

--

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



[issue16424] regression: os.path.split('//hostname/foo/bar.txt')

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is not a regression.  This is a feature, not a bug.

--
resolution:  - invalid

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Conclusion:

RoundUp appears to only remove sigs in case they have less than
10 lines.

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 11:46, M.-A. Lemburg wrote:
 Conclusion:
 
 RoundUp appears to only remove sigs in case they have less than
 10 lines.

The final empty 10th line (newline after the 9th line) does not seem
to count.

-- 
1 Marc-Andre Lemburg
2 eGenix.com
3
4 Professional Python Services directly from the Source  (#1, Nov 07 2012)
5  Python Projects, Consulting and Support ...   http://www.egenix.com/
6  mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
7  mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/
8 
9
10 ::: Try our new mxODBC.Connect Python Database Interface for free ! 

--

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



[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-07 Thread anatoly techtonik

anatoly techtonik added the comment:

I see nothing wrong with reimplementation with different underlying lib as long 
as behavior stays the same and lib2to3 converts code correctly.

The API that block size if constant and non-zero is broken with Python 3.3. I 
thought that API breaks are only allowed for major Python versions?

--

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



[issue16426] RoundUp signature removal test (please ignore)

2012-11-07 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg m...@egenix.com:


--
status: open - closed

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Armin Rigo

Armin Rigo added the comment:

Marc-André: estimating the risks of giving up on a valid query for a truly 
random hash, at an overestimated one billion queries per second, in a 2/3 full 
dictionary:

* for 1000: 4E159 years between mistakes

* for 100: 12.9 years between mistakes

* for 150: 8E9 years between mistakes

* for 200: 5E18 years between mistakes

So while it seems that 100 might be a bit too small, using 150 to 200 is 
perfectly safe (and that's perfect in the sense that a computer will 
encounter random hardware errors at a higher rate than that).

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 12:06, Armin Rigo wrote:
 
 Armin Rigo added the comment:
 
 Marc-André: estimating the risks of giving up on a valid query for a truly 
 random hash, at an overestimated one billion queries per second, in a 2/3 
 full dictionary:
 
 * for 1000: 4E159 years between mistakes
 
 * for 100: 12.9 years between mistakes
 
 * for 150: 8E9 years between mistakes
 
 * for 200: 5E18 years between mistakes
 
 So while it seems that 100 might be a bit too small, using 150 to 200 is 
 perfectly safe (and that's perfect in the sense that a computer will 
 encounter random hardware errors at a higher rate than that).

I used the 1000 limit only as example. In tests Victor and I ran (see the
original ticket from a few months ago), 200 turned out to be a reasonable
number for the default maximum hash collision value.

I'm not sure about the slot collision limit. We'd have to run more tests
on those.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Giovanni Bajo

Giovanni Bajo added the comment:

Il giorno 07/nov/2012, alle ore 08:40, Serhiy Storchaka 
rep...@bugs.python.org ha scritto:

 Serhiy Storchaka added the comment:
 
 I tested different kind of strings.
 
 $ ./python -m timeit -n 1 -s t = b'a' * 10**8  hash(t)
 $ ./python -m timeit -n 1 -s t = 'a' * 10**8  hash(t)
 $ ./python -m timeit -n 1 -s t = '\u0100' * 10**8  hash(t)
 $ ./python -m timeit -n 1 -s t = '\U0001' * 10**8  hash(t)
 
   current   SipHash
 
 bytes  181 msec  453 msec  2.5x
 UCS1   429 msec  453 msec  1.06x
 UCS2   179 msec  897 msec  5x
 UCS4   183 msec  1.79 sec  9.8x

Hi Serhiy,

can you please attach the generated assembly code for the siphash function with 
your compiler and your optimization flags (that is, the one that produces the 
above results)?

Thanks!
-- 
Giovanni Bajo

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 can you please attach the generated assembly code for the siphash function 
 with your compiler and your optimization flags (that is, the one that 
 produces the above results)?

GCC (Ubuntu 4.4.3-4ubuntu5.1) options:

-pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes   -I. -IInclude -I./Include-DPy_BUILD_CORE

32-bit Linux on AMD Athlon(tm) 64 X2 Dual Core Processor 4600+.

--
Added file: http://bugs.python.org/file27919/_Py_Hash_Sip24.S

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



[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-07 Thread anatoly techtonik

anatoly techtonik added the comment:

I agree that new implementation doesn't prevent me from estimating the 
progress, but it does make the callback code worse, not better. Either by 
closure or by global variable, but it makes callback stateful.

To fix this issue either blocks_number parameter should be removed, or previous 
behavior restored.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Christian Heimes

Christian Heimes added the comment:

Serhiy, the performance of hash() for long strings isn't very relevant for the 
general performance of a Python program. Short strings dominate. I've modified 
the timeit to create a new string object every time.

for I in 5 10 15 20 30 40 50 60; do echo -ne $I\t; ./python -m timeit 
-n10 -r30 -s h = hash; x = 'ä' * $I -- h(x + 'a') | awk '{print $6}' ; 
done

ASCII:
#   SIPFNV
5   0.112  0.0979
10  0.115  0.103
15  0.12   0.107
20  0.124  0.112
30  0.126  0.127
40  0.136  0.142
50  0.142  0.147
60  0.146  0.159

UCS-2:
#   SIPFNV
5   0.114  0.0977
10  0.117  0.0988
15  0.12   0.11
20  0.126  0.109
30  0.13   0.122
40  0.14   0.132
50  0.144  0.147
60  0.152  0.157

For short strings the additional round and setup costs make hash() about 10% 
slower. For long strings SIP is faster as it processes 8 bytes at once instead 
of 1 to 4 bytes.

--

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



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Looks better, will check on Windows a bit later.

BTW, ACKS and NEWS are usually edited by committer, but leave that as is for 
now.

--
versions: +Python 3.4 -Python 3.5

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Mark Dickinson

Mark Dickinson added the comment:

[MAL]
 I don't understand why we are only trying to fix the string problem
 and completely ignore other key types.

[Armin]
 estimating the risks of giving up on a valid query for a truly random
 hash, at an overestimated one billion queries per second ...

That's fine in principle, but if this gets extended to integers, note that our 
current integer hash is about as far from 'truly random' as you can get:

Python 3.4.0a0 (default:f02555353544, Nov  4 2012, 11:50:12) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type help, copyright, credits or license for more information.
 [hash(i) for i in range(20)]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]

Moreover, it's going to be *very* hard to change the int hash while preserving 
the `x == y implies hash(x) == hash(y)` invariant across all the numeric types 
(int, float, complex, Decimal, Fraction, 3rd-party types that need to remain 
compatible).

--
nosy: +mark.dickinson

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



[issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames

2012-11-07 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 12:55, Mark Dickinson wrote:
 
 Mark Dickinson added the comment:
 
 [MAL]
 I don't understand why we are only trying to fix the string problem
 and completely ignore other key types.
 
 [Armin]
 estimating the risks of giving up on a valid query for a truly random
 hash, at an overestimated one billion queries per second ...
 
 That's fine in principle, but if this gets extended to integers, note that 
 our current integer hash is about as far from 'truly random' as you can get:
 
 Python 3.4.0a0 (default:f02555353544, Nov  4 2012, 11:50:12) 
 [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
 Type help, copyright, credits or license for more information.
  [hash(i) for i in range(20)]
 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
 
 Moreover, it's going to be *very* hard to change the int hash while 
 preserving the `x == y implies hash(x) == hash(y)` invariant across all the 
 numeric types (int, float, complex, Decimal, Fraction, 3rd-party types that 
 need to remain compatible).

Exactly. And that's why trying to find secure hash functions isn't
going to solve the problem. Together with randomization they may
make things better for strings, but they are no solution for numeric
types, and they also don't allow detecting possible attacks on your
systems.

But yeah, I'm repeating myself :-)

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Mark Dickinson

Mark Dickinson added the comment:

And I'm probably repeating myself too, but: the predictability of (and 
difficulty of changing of) hashing for numeric types is why I'm strongly 
opposed to hash collision / slot collision limits:  they'd end up disallowing 
reasonably natural looking Python numeric sets (e.g. {2**k for k in range(n)} 
for smallish n).  I don't think core Python should be solving this issue at 
all---I think that's a job for the web frameworks.  Christian's idea of 
providing more suitable types in the std. lib. sounds like the right direction 
to me.

--

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



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Václav Šmilauer

Václav Šmilauer added the comment:

Good, will let editors do that next time.

I was following http://docs.python.org/devguide/patch.html#preparation which 
says Sixth, if you are not already in the Misc/ACKS file then add your name.

For NEWS, I was reading 
http://docs.python.org/devguide/committing.html#news-entries, but it is true it 
talks about commits, not about patches.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.11.2012 13:06, Mark Dickinson wrote:
 
 Mark Dickinson added the comment:
 
 And I'm probably repeating myself too, but: the predictability of (and 
 difficulty of changing of) hashing for numeric types is why I'm strongly 
 opposed to hash collision / slot collision limits:  they'd end up disallowing 
 reasonably natural looking Python numeric sets (e.g. {2**k for k in range(n)} 
 for smallish n).  I don't think core Python should be solving this issue at 
 all---I think that's a job for the web frameworks.  Christian's idea of 
 providing more suitable types in the std. lib. sounds like the right 
 direction to me.

I definitely agree on that last sentence. Having more suitable data
types in Python (like e.g. tries, b-trees or red-black-trees) would certainly
be a better solution than trying to build everything into dictionaries.

Nice comparison:
http://en.wikipedia.org/wiki/Trie

--

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



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-07 Thread Matthias Klose

Matthias Klose added the comment:

see issue #1161914 for the original script.

 2) Since we are Pythoneers, why write this script as a
 shell-script instead of a Python script? (sh may not even be
 available on Windows).

python-config is usally not used by python module builds, but third party build 
systems. When cross-building these packages you usually are unable to run the 
python interpreter for the target.

Georg, Martin, do you have any opinion if we should replace the python code 
with shell code (if it works on all targets), or if it should be added as a 
separate script?

Ray, some issues:

 - is `local' available in all shells? just avoid it.

 - is there a need for the built vs. installed prefix?
   this is logic not found in the python implementation.
   what is this supposed to do?

 - LDLIBRARY and LDSHARED are expressed in terms of Makefile
   macros, leading to syntax errors.

 - --includes doesn't include the plat specific include dir

 - abi flags are missing from the include and lib dirs.

Please recheck, and compare the output of the python implementation with the 
one of the shell implementation.

--

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



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-07 Thread Matthias Klose

Changes by Matthias Klose d...@debian.org:


--
nosy: +georg.brandl, loewis

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



[issue16427] Faster hash implementation

2012-11-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

In the discussion of issue14621 it was noted that much more complex hash 
algorithms can overtake the current one due to the fact that they process more 
data at a time.  Here is a patch that implements this idea for the current 
algorithm.  Also code duplication removed.

Microbenchmarks:

$ ./python -m timeit -n 1 -s t = b'a' * 10**8  hash(t)
$ ./python -m timeit -n 1 -s t = 'a' * 10**8  hash(t)
$ ./python -m timeit -n 1 -s t = '\u0100' * 10**8  hash(t)
$ ./python -m timeit -n 1 -s t = '\U0001' * 10**8  hash(t)

Results on 32-bit Linux on AMD Athlon 64 X2 4600+:

   original  patchedspeedup

bytes  181 msec  45.7 msec  4x
UCS1   429 msec  45.7 msec  9.4x
UCS2   179 msec  92 msec1.9x
UCS4   183 msec  183 msec   1x

If the idea is acceptable, I will create benchmarks for short strings.

--
components: Interpreter Core
files: fast_hash.patch
keywords: patch
messages: 175093
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Faster hash implementation
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file27920/fast_hash.patch

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See issue16427.

--

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



[issue16427] Faster hash implementation

2012-11-07 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-07 Thread Ray Donnelly

Ray Donnelly added the comment:

 is there a need for the built vs. installed prefix?
this is logic not found in the python implementation.
what is this supposed to do?

You are right, it is not found in the original python implementation, but I 
feel that it's useful. Without it, you couldn't give someone a -devel style 
precompiled Python archive that they can extract where-ever they want and embed 
in other software without requiring them to install it to the same prefix used 
during the build process.

 is `local' available in all shells? just avoid it.

I can't be sure about all shells, but local is *very* well supported (bash, 
dash, csh); I'm happy to remove it though as it's not necessary.

 LDLIBRARY and LDSHARED are expressed in terms of Makefile
   macros, leading to syntax errors.

This shouldn't be the case, see:

# Replace makefile compat. variable references with shell script compat. ones; 
$(VAR) - ${VAR}
+   sed -e s,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g  Misc/python-config.sh 
python-config.sh

 - --includes doesn't include the plat specific include dir

You are right, I will correct this oversight.

 - abi flags are missing from the include and lib dirs.

ABIFLAGS propagates through other variables, namely LDLIBRARY and LDVERSION, 
but again, there are some issues for me to fix with this.

I will write a new part on my build script that compares the output from the 
shell script with that from the python script and post a new patch when they 
agree 100% on all my test platforms.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Armin Rigo

Armin Rigo added the comment:

I won't try to influence the outcome of this discussion, but I'd like to 
correct myself: in the measures I posted, true randomness is not needed at 
all.  The exact criterion might be hard to pin down, but as a first 
approximation, we get the same answers as long as most keys have different 
hashes, as all the bits of the hash are used by the dict lookup in only a few 
iterations.  No two small ints have the same hash, by construction.  You can 
build a sequence of (long) integers that have all exactly the same hash, but 
doing that is not as easy as 2**k.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Serhiy, the performance of hash() for long strings isn't very relevant for 
 the general performance of a Python program.

It exposes the raw speed of hashing algorithm.  It is good as a first estimate, 
because more real cases require more sophisticated measurements.

 Short strings dominate. I've modified the timeit to create a new string 
 object every time.

timeit is absolutely not suitable for this.  Need to write a C program that 
uses the Python C API.

 for I in 5 10 15 20 30 40 50 60; do echo -ne $I\t; ./python -m timeit 
 -n10 -r30 -s h = hash; x = 'ä' * $I -- h(x + 'a') | awk '{print $6}' 
 ; done

Please, do not be fooled by the wrong measurements. You measure the height of 
the building together with the hill, on which it stands. Use -n1 and you will 
see a 
completely different numbers.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Armin Rigo

Armin Rigo added the comment:

Wrong, sorry.  On a 32-bit Python 2.7, (2**32-1)*n has the same hash -2, for 
any value of n.

Of course if you build a dict containing thousands of such integers as keys, 
then right now you get unexpectedly bad performance.  I wonder if I should open 
another bug report about that --- the hash of longs should be slightly more 
random-looking...

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Mark Dickinson

Mark Dickinson added the comment:

[Armin]
 You can build a sequence of (long) integers that have all exactly the
 same hash, but doing that is not as easy as 2**k.

Sure it is.  The hash for integers is (by design) repeated modulo a number of 
the form 2**n - 1:  we use 2**61 - 1 on 64-bit systems and 2**31 - 1 on 32-bit. 
 So in {2**k for k in range(n)} you get at most 61 distinct hash values.

--

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



[issue14621] Hash function is not randomized properly

2012-11-07 Thread Giovanni Bajo

Giovanni Bajo added the comment:

Il giorno 07/nov/2012, alle ore 12:59, Marc-Andre Lemburg 
rep...@bugs.python.org ha scritto:

 
 Marc-Andre Lemburg added the comment:
 
 On 07.11.2012 12:55, Mark Dickinson wrote:
 
 Mark Dickinson added the comment:
 
 [MAL]
 I don't understand why we are only trying to fix the string problem
 and completely ignore other key types.
 
 [Armin]
 estimating the risks of giving up on a valid query for a truly random
 hash, at an overestimated one billion queries per second ...
 
 That's fine in principle, but if this gets extended to integers, note that 
 our current integer hash is about as far from 'truly random' as you can get:
 
Python 3.4.0a0 (default:f02555353544, Nov  4 2012, 11:50:12) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type help, copyright, credits or license for more information.
 [hash(i) for i in range(20)]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
 
 Moreover, it's going to be *very* hard to change the int hash while 
 preserving the `x == y implies hash(x) == hash(y)` invariant across all the 
 numeric types (int, float, complex, Decimal, Fraction, 3rd-party types that 
 need to remain compatible).
 
 Exactly. And that's why trying to find secure hash functions isn't
 going to solve the problem. Together with randomization they may
 make things better for strings, but they are no solution for numeric
 types, and they also don't allow detecting possible attacks on your
 systems.
 
 But yeah, I'm repeating myself :-)
 

I don't see how it follows. Python has several hash functions in its core, one 
of which is the string hash function; it is currently severely broken from a 
security standpoint; it also happens to be probably the most common case for 
dictionaries in Python, and the ones that it is more easily exploited in web 
frameworks. 

If we can manage to fix the string hash function (eg: through SipHash) we will 
be one step further in mitigating the possible attacks.

Solving collisions and mitigating attacks on numeric types is a totally 
different problem because it is a totally different function. I suggest we keep 
different discussions and different bugs for it. For instance, I'm only 
personally interested in mitigating attacks on the string hash function.
-- 
Giovanni Bajo

--

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



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-07 Thread Matthias Klose

Matthias Klose added the comment:

Am 07.11.2012 13:52, schrieb Ray Donnelly:

 Ray Donnelly added the comment:

 is there a need for the built vs. installed prefix?
 this is logic not found in the python implementation.
 what is this supposed to do?

 You are right, it is not found in the original python implementation, but I 
 feel that it's useful. Without it, you couldn't give someone a -devel style 
 precompiled Python archive that they can extract where-ever they want and 
 embed in other software without requiring them to install it to the same 
 prefix used during the build process.

hmm, but python.pc, _sysconfigdata.py and Makefile still have this information. 
How would you test the output and compare it with the python implementation?

 is `local' available in all shells? just avoid it.

 I can't be sure about all shells, but local is *very* well supported (bash, 
 dash, csh); I'm happy to remove it though as it's not necessary.

 LDLIBRARY and LDSHARED are expressed in terms of Makefile
macros, leading to syntax errors.

 This shouldn't be the case, see:

 # Replace makefile compat. variable references with shell script compat. 
 ones; $(VAR) - ${VAR}
 + sed -e s,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g  Misc/python-config.sh 
 python-config.sh

ahh, ok, only looked at the file in the build location.

 - --includes doesn't include the plat specific include dir

 You are right, I will correct this oversight.

maybe should only be included, if it's different.

--

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



[issue1776160] Buffer overflow when listing deeply nested directory

2012-11-07 Thread Arno Bakker

Arno Bakker added the comment:

Can somebody please look at this bug? It still appears in SCons 2.2.0 on 
Windows 7 when it tries to do a os.listdir on 

C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program 
Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft 
SDKs\Windows\v6.0A\include;\build\libevent-2.0.20-stable-debug\include;\build\libevent-2.0.20-stable-debug\WIN32-Code;\build\gtest-1.4.0\include;

--
nosy: +a...@cs.vu.nl

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



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Yeah, ACKS is fine (we just don't mind doing it if the submitter leaves it 
out). Updating NEWS is less useful because it almost inevitably causes a 
conflict when the patch is applied. (We occasionally mutter about adopting a 
less conflict-prone approach to handling NEWS entries, but nobody has ever 
found it annoying enough to design a solution and officially propose switching 
to it)

--

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



[issue1776160] Buffer overflow when listing deeply nested directory

2012-11-07 Thread Arno Bakker

Arno Bakker added the comment:

This is on Python 2.7.3 on Win7 32-bit, sorry.

--

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



[issue1776160] Buffer overflow when listing deeply nested directory

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can you please report what Python version you are using?

--
nosy: +serhiy.storchaka

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



[issue9226] erroneous behavior when creating classes inside a closure

2012-11-07 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: +ncoghlan

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



[issue16428] turtle with compound shape doesn't get clicks

2012-11-07 Thread pythonick

New submission from pythonick:

In the standard turtle module, when a turtle has a custom shape of type 
compound, it doesn't to respond to click events. No problem with polygon 
shapes.

Observed on Windows XP, python 3.2.3, turtle version 1.1b, and on Linux, python 
2.7. 

Test code:

##
import turtle
square = ((0,0),(0,20),(20,20),(20,0))
turtle.addshape(sq1, square) # sq1 = polygon shape
s = turtle.Shape(compound)
s.addcomponent(square, red)
turtle.addshape(sq2, s) # sq2 = compound shape
t1 = turtle.Turtle(shape=sq1)
t2 = turtle.Turtle(shape=sq2)
t2.fd(20)
def click(x,y): print(click at,x,y)
t1.onclick(click)
t2.onclick(click)
turtle.mainloop()
##

When you click on the black square (i.e. t1), the message click at... is 
printed. When you click on the red square (i.e. t2), nothing happens.

--
components: Library (Lib)
messages: 175106
nosy: pythonick
priority: normal
severity: normal
status: open
title: turtle with compound shape doesn't get clicks
type: behavior
versions: Python 2.7, Python 3.2

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



[issue16429] Emit SyntaxWarning for code that risks UnboundLocalError

2012-11-07 Thread Nick Coghlan

New submission from Nick Coghlan:

The compiler is actually in a fairly good position to tell when code is at risk 
of triggering UnboundLocalError at runtime: specifically, in the section of the 
code that checks for duplicated parameter names [1]

Now, we can't emit SyntaxError here for backwards compatibility reasons (if you 
have an early reference that is never executed, your code is dodgy but will 
still run OK).

However, we should be able to emit a Syntax *Warning* when we detect an 
existing symbol at function scope having DEF_LOCAL applied for the first time 
*after* it has already been referenced in a way which doesn't create a local 
variable.

Something like:

SyntaxWarning: Local variable NAME bound after earlier reference (risks 
UnboundLocalError when function is called)

[1] http://hg.python.org/cpython/file/default/Python/symtable.c#l1002

--
messages: 175107
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Emit SyntaxWarning for code that risks UnboundLocalError
versions: Python 3.4

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2012-11-07 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: +ncoghlan
priority: high - low
versions: +Python 3.4

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



[issue1776160] Buffer overflow when listing deeply nested directory

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This issue is related to parsing of et# format which is used only in 
listdir() and _getfullpathname() under Windows. PyArg_ParseTuple() throws 
TypeError exception for multiple conversion errors (in this case it is an 
overflow of a static buffer). There are several ways to solve this issue:

1. Do nothing, close the issue as wont fix.  This is just the wrong exception 
in a very rare case only on 2.7 and only under Windows.  The issue will go away 
with 2.7.

2. Use under Windows dynamic buffer as under other platforms.  This will 
require not only dynamic memory allocation, but also reallocation for \*.* 
appending.

3. Do not use PyArg_ParseTuple().  Parse the singular argument manually.

4. If PyArg_ParseTuple() fails then check if the raised exception is TypeError 
and the error message matches (buffer overflow).  In this case raise the 
right exception.

5. Rewrite PyArg_ParseTuple() so that it will raise an appropriate type of 
exception (this will have to do anyway, but maybe later, in other issue).  In 
this case it will be OverflowError.  Then we can catch this error and raise the 
right exception.

Martin, what is your decision?

--
versions: +Python 2.7 -Python 2.6, Python 3.1

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



[issue16430] re.match blocking and taking 100% CPU

2012-11-07 Thread Sebastien Estienne

New submission from Sebastien Estienne:

Hello

re.match is blocked and takes 100% cpu forever

re_bug.py is an example of the bug.

thanx

--
components: Regular Expressions
files: re_bug.py
messages: 175109
nosy: Sebastien.Estienne, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.match blocking and taking 100% CPU
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file27921/re_bug.py

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



[issue16235] Add python-config.sh for use during cross compilation.

2012-11-07 Thread Ray Donnelly

Ray Donnelly added the comment:

 hmm, but python.pc, _sysconfigdata.py and Makefile still have this 
 information.

In my experience, as long as PYTHONHOME is set correctly before the Python .so, 
.dll or .dylib is loaded then everything works correctly.

From what I've seen, .pc files are also useless for the purposes of a 
relocatable -devel package as there's no capability for relative directories 
in pkg-config.

 maybe should only be included, if it's different.

Ok.

--

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



[issue16430] re.match blocking and taking 100% CPU

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is no a Python bug.

You have wrong regexp.  Remove $ at the end or add .* before $.

And it would be better if instead of '(?Pdate.*?)\s' and 
'(?Pmethod_uri.*?)' you use '(?Pdate\S+)\s' and '(?Pmethod_uri[^]*)'.

--
nosy: +serhiy.storchaka
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue16430] re.match blocking and taking 100% CPU

2012-11-07 Thread Mark Dickinson

Mark Dickinson added the comment:

This is a known issue: there are a good few duplicates in the tracker.  Issue 
#1662581 is one, for example.

In this particular case, you can probably fix things by tightening up your 
regex.  Part of the problem is that '.*' is going to match any sequence of 
characters, including spaces.  Judicious use of '\S' to match non-whitespace 
characters might help. There's not much point to the '?' in  '.*?', either.

--
nosy: +mark.dickinson
superseder:  - the re module can perform poorly: O(2**n) versus O(n**2)

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



[issue13723] Regular expressions: (?:X|\s+)*$ takes a long time

2012-11-07 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
superseder:  - the re module can perform poorly: O(2**n) versus O(n**2)

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



[issue4071] ntpath.abspath fails for long str paths

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I doubt this issue exists on Python = 3.2.

See also issue1776160.

--
nosy: +serhiy.storchaka
versions:  -Python 3.2, Python 3.3, Python 3.4

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



[issue1776160] Buffer overflow when listing deeply nested directory

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue4071.

--

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



[issue2771] Test issue

2012-11-07 Thread Ezio Melotti

Ezio Melotti added the comment:

test

--
nosy:  -chris.jerdonek

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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Also note that your variant of check for overflow causes undefined behavior.  
Python is gradually getting rid of such code.

--

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



[issue2771] Test issue

2012-11-07 Thread Ezio Melotti

Ezio Melotti added the comment:

another test

--

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



[issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) = sizeof(long)

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue4591, issue7365, issue15301, and issue15989.

Kimmo Mustonen, if you are not working on the patch, I'll take the work.  I 
don't want to interrupt your work, but if you are having trouble, maybe I can 
do it.  In any case, I have already spent the time to study the issue and have 
ideas for a solution.

--

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



[issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) = sizeof(long)

2012-11-07 Thread Kimmo Mustonen

Kimmo Mustonen added the comment:

Feel free to finalize this. I don't have such a system to test it anyway.

--

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



[issue16338] pysnmp/asyncore - timeout ineffective?

2012-11-07 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


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

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2012-11-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Today in pydev thread chained assignment weirdity Guido said
http://permalink.gmane.org/gmane.comp.python.devel/135746
I agree that we should be *very* conservative in changing the
meaning of existing opcodes (adding new one is a different story).
...
Hm. I really don't think that is a good development for Python to
compromise in the area of expression evaluation order where side
effects are involved.
...

I haven't looked at the proposed fixes, but I think correctness is more 
important than saving an extra bytecode (OTOH keeping the set of opcodes the 
same trumps both). I can't imagine that this extra opcode will be significant 
in many cases.

To which Nick C. replied
Since you've indicated the implementation is in the wrong here and you
also want to preserve opcode semantics, I think Skip's patch is
correct, but also needs to be applied to dict comprehensions (now we
have them). The extra bytecode is only ROT_TWO, which is one of the
cheapest we have kicking around.

To which Guido said Ok, somebody go for it! (Also please refer to my 
pronouncement in the bug

--

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



[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Elvis Pranskevichus

New submission from Elvis Pranskevichus:

Consider the following:

import decimal

class MyDecimal(decimal.Decimal):
def __new__(cls, value):
return super().__new__(cls, value)

a = decimal.Decimal('1.0')
b = MyDecimal(a)
c = MyDecimal('1.0')

print(type(a), type(b), isinstance(b, MyDecimal), type(c), isinstance(c, 
MyDecimal))

Running the above in 3.3 produces:

class 'decimal.Decimal' class 'decimal.Decimal' False class 
'__main__.MyDecimal' True

Which shows that Decimal.__new__(cls, Decimal()) will always return its 
argument regardless of cls.

--
messages: 175121
nosy: Elvis.Pranskevichus, skrah
priority: normal
severity: normal
status: open
title: CDecimal disregards subclass passed into __new__ when value argument is 
an instance of Decimal
type: behavior
versions: Python 3.3, Python 3.4

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



[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

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



[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +yselivanov

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



[issue16422] Decimal constants should be the same for py c module versions

2012-11-07 Thread Stefan Krah

Stefan Krah added the comment:

Well, I suppose one could use a cascaded switch statement, starting with the
7th letter and then (in the case of HALF*) proceed with the 12th letter:

ROUND_CEILING
ROUND_FLOOR
ROUND_UP
ROUND_DOWN
ROUND_HALF_UP
ROUND_HALF_DOWN 
ROUND_HALF_EVEN
ROUND_05UP

That should be as fast as PyLong_AsLong().

--

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



[issue16432] Template strings documentation in Python 3 refers to % substitution in present tense

2012-11-07 Thread Andrew Gorcester

New submission from Andrew Gorcester:

Documentation here: 
http://docs.python.org/3/library/string.html#template-strings says Instead of 
the normal %-based substitutions, Templates support $-based substitutions...

I believe it is confusing to refer to %-based substitutions in a way that 
implies they still exist in Python 3.  It would be better to fix this to either 
refer to {} substitution or to remove the reference comparing it to normal 
string substitution altogether.

--
assignee: docs@python
components: Documentation
messages: 175123
nosy: andrewsg, docs@python
priority: normal
severity: normal
status: open
title: Template strings documentation in Python 3 refers to % substitution in 
present tense
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Václav, your patch passed on Windows.
Will commit it after double check. 
Thanks.

--
assignee:  - asvetlov

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



[issue16432] Template strings documentation in Python 3 refers to % substitution in present tense

2012-11-07 Thread Georg Brandl

Georg Brandl added the comment:

Who said % substitution doesn't exist anymore in Python 3?

That said, it's certainly not wrong to replace this with {} substitution.

--
nosy: +georg.brandl

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



[issue16432] Template strings documentation in Python 3 refers to % substitution in present tense

2012-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is not a bug.  %-based substitutions exist in Python 3.

http://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting

--
nosy: +serhiy.storchaka

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



[issue5950] Make zipimport work with zipfile containing comments

2012-11-07 Thread Dima Tisnek

Dima Tisnek added the comment:

also applies to 2.7 series

over a year passed since last comment, any progress on this?

I just ran into this issue myself.
zipfile module handles commented zip's fine, but zipimport doesn't.
I didn't expect a gotcha like this from Python!

--
nosy: +Dima.Tisnek
versions: +Python 2.7

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



[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1b6c972457e6 by Stefan Krah in branch '3.3':
Issue #16431: Use the type information when constructing a Decimal subtype
http://hg.python.org/cpython/rev/1b6c972457e6

--
nosy: +python-dev

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



[issue16311] Use _PyUnicodeWriter API in text decoders

2012-11-07 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I forgot my benchmark results.

decodebench.py result results on Linux 32 bits:
(Linux-3.2.0-32-generic-pae-i686-with-debian-wheezy-sid)

$ ./python bench-diff.py original writer
ascii 'A'*1   4109 (-3%)3974

latin1'A'*1   3851 (-5%)3644
latin1'\x80'*114832 (-3%)   14430

utf-8 'A'*1   3747 (-4%)3608
utf-8 '\x80'*1976 (-2%) 961
utf-8 '\u0100'*1  974 (-2%) 959
utf-8 '\u8000'*1  804 (-14%)694
utf-8 '\U0001'*1  666 (-5%) 635

utf-16le  'A'*1   4154 (-1%)4117
utf-16le  '\x80'*14055 (-2%)3988
utf-16le  '\u0100'*1  4047 (-2%)3974
utf-16le  '\u8000'*1  917 (-1%) 912
utf-16le  '\U0001'*1  872 (-0%) 870

utf-16be  'A'*1   3218 (-1%)3185
utf-16be  '\x80'*13163 (-2%)3114
utf-16be  '\u0100'*1  2591 (-1%)2556
utf-16be  '\u8000'*1  979 (-1%) 974
utf-16be  '\U0001'*1  928 (-0%) 925

utf-32le  'A'*1   1681 (+12%)   1885
utf-32le  '\x80'*11697 (+10%)   1865
utf-32le  '\u0100'*1  2224 (+1%)2254
utf-32le  '\u8000'*1  2224 (+2%)2269
utf-32le  '\U0001'*1  2234 (+1%)2260

utf-32be  'A'*1   1685 (+11%)   1868
utf-32be  '\x80'*11684 (+10%)   1860
utf-32be  '\u0100'*1  2223 (+1%)2253
utf-32be  '\u8000'*1   (+1%)2255
utf-32be  '\U0001'*1  2243 (+1%)2257

decodebench.py result results on Linux 64 bits:
(Linux-3.4.9-2.fc16.x86_64-x86_64-with-fedora-16-Verne)

ascii 'A'*1   10043 (+1%)   10144

latin1'A'*1   8351 (-1%)8258
latin1'\x80'*119184 (+2%)   19560

utf-8 'A'*1   8083 (+5%)8461
utf-8 '\x80'*1982 (+1%) 993
utf-8 '\u0100'*1  984 (+1%) 992
utf-8 '\u8000'*1  806 (+31%)1053
utf-8 '\U0001'*1  639 (+12%)718

utf-16le  'A'*1   5547 (-2%)5422
utf-16le  '\x80'*15205 (+1%)5271
utf-16le  '\u0100'*1  4900 (-4%)4695
utf-16le  '\u8000'*1  1062 (+9%)1154
utf-16le  '\U0001'*1  1040 (+4%)1078

utf-16be  'A'*1   5416 (-5%)5157
utf-16be  '\x80'*15077 (-1%)5011
utf-16be  '\u0100'*1  4261 (-1%)4218
utf-16be  '\u8000'*1  1146 (+0%)1147
utf-16be  '\U0001'*1  1125 (-1%)1119

utf-32le  'A'*1   1743 (+8%)1880
utf-32le  '\x80'*11751 (+5%)1842
utf-32le  '\u0100'*1  2114 (+29%)   2721
utf-32le  '\u8000'*1  2120 (+28%)   2718
utf-32le  '\U0001'*1  2065 (+30%)   2690

utf-32be  'A'*1   1761 (+6%)1860
utf-32be  '\x80'*11749 (+6%)1856
utf-32be  '\u0100'*1  2101 (+29%)   2715
utf-32be  '\u8000'*1  2083 (+30%)   2715
utf-32be  '\U0001'*1  2058 (+31%)   2689

Most significant changes:
 * -14% to decode '\u8000'*1 from UTF-8 on Linux 32 bits
 * +31% to decode '\u8000'*1 from UTF-8 on Linux 32 bits
 * +28% to +31% to decode UCS-2 and UCS-4 characters from UTF-8 on Linux 32 bits

@Serhiy Storchaka: If you feel able to tune _PyUnicodeWriter to
improve its performance, please open a new issue.

I consider the performance changes acceptable and I don't plan to work
on this topic.

--

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



[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7fcc58811e82 by Stefan Krah in branch '3.3':
Issue #16431: Also fix the opposite direction.
http://hg.python.org/cpython/rev/7fcc58811e82

--

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



[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Py_INCREF(v); return v; should be used only for immutable types, not for 
subclasses. in 3.2, the code below prints 3, None:

import decimal
class MyDecimal(decimal.Decimal):
x = None
def __new__(cls, value):
return super().__new__(cls, value)
return obj
a = MyDecimal(1.1)
a.x = 3
b = MyDecimal(a)
print(a.x, b.x)

--
nosy: +amaury.forgeotdarc

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



[issue16432] Template strings documentation in Python 3 refers to % substitution in present tense

2012-11-07 Thread Andrew Gorcester

Andrew Gorcester added the comment:

Sorry, my mistake -- I thought that %-based formatting had been deprecated and 
removed by now, because it wasn't documented in library/string.html .  However, 
I still think referring to %-based formatting as normal in Python 3 is 
confusing to readers as it is not the preferred system.

--

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



[issue16278] os.rename documentation slightly inaccurate

2012-11-07 Thread Todd Rovito

Todd Rovito added the comment:

Here is a draft suggestion for the documentation change, not all the formatting 
is worked out:

.. function:: rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)

   Rename the file or directory *src* to *dst*. If *src* exists as either
   a file or directory and *dst* does not exist the rename will occur with
   no error raised.  In some cases the rename function will behave
   differently across platforms which are noted below. In all cases
   if *src* does not exist :exc: 'OSError' will be raised.

   Unix
   If *dst* exists and is a file, it will be replaced silently if the user
   has permission and src is a file.  If *src* is a directory and *dst* is a
   file :exc: 'OSError' will be raised.  In the case where *src* is a
   directory and *dst* is a empty directory the rename will occur and the
   *src* directory name will overwrite the *dst* directory name.Yet a special
   case is noted where *src* is a directory and *dst* is a non-empty directory
   the rename will not occur and :exc: `OSError` will be raised.  

   Windows
   If *src* is a file and *dst* exists either as a file or directory :exc:
   'OSError` will be raised and the rename will not occur.  In the case where
   *src* is a directory, either empty or not empty, and *dst* exists as a
   file or not empty directory :exc: `OSError` will be raised.  If *src* is
   a directory, either empty or not empty, and *dst* is a empty directory
   then :exc: `FileExistsError` will be raised.


   If successful, the renaming will be an atomic operation (this is a POSIX
   requirement).
   
   This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to
   supply :ref:`paths relative to directory descriptors dir_fd`.

   If you want cross-platform overwriting of the destination, use
   :func:`replace`.

   Availability: Unix, Windows.

   .. versionadded:: 3.3
  The *src_dir_fd* and *dst_dir_fd* arguments.

--

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



[issue13349] Non-informative error message in index() and remove() functions

2012-11-07 Thread Sean Ochoa

Sean Ochoa added the comment:

From Taggnostr on #python-dev:  

1.) Use assertRaises+assertIn instead of assertRaisesRegex
2.) Add or change an existing test that you've already updated to use  elements 
with a repr longer than 100 chars.

--

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



[issue16388] Urllib screws up capitalization in User-Agent HTTP Header

2012-11-07 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Calvin. - I shall act upon old bug. The tricky nature of backwards 
compatibility sometimes let's it stale because we can not come t a good 
conclusion.

--
nosy: +orsenthil

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



[issue16392] import crashes on circular imports in ext modules

2012-11-07 Thread Stefan Behnel

Stefan Behnel added the comment:

Agreed. Since it doesn't really fit into any specific function documentation, I 
would place it right at the top. Something like this:


The following functions can be used by C code to call into Python's import 
machinery.

Note that Python 3 does not automatically register an extension module in 
sys.modules on creation (see module.html#initializing-c-modules). It is only 
added after running through the whole module init function. This means that a 
request to import the current module while its init function is still running 
(either directly or transitively by other modules) will try to reimport the 
module. If you cannot be sure that this will not happen, you have to register 
the newly created module yourself as follows, using the fully qualified module 
name::

PyObject *the_module = PyModule_Create(py_module_def);
if (the_module == NULL) { /* failure ! */ };

PyObject *sys_modules = PyImport_GetModuleDict();
if (sys_modules == NULL) { /* failure ! */ };

if (PyDict_SetItemString(modules, the.package.and.module, the_module)  
0) { /* failure ! */ };


Maybe it should add another comment that this is a major quirk in the runtime 
and say sorry for being stupid here - I hope you can do better. Requiring the 
user to know the FQMN at build time because the import machinery fails to set 
it automatically is just embarrissing.

Then, after the first sentence in the module.html#initializing-c-modules 
section, I'd add this:


Note that, starting with Python 3.0, the module creation functions no longer 
register the module in sys.modules. The import machinery will only do this 
after the module init function has run. If you need to run imports as part of 
your module init function and happen to know the fully qualified module name in 
your code, it is best to register the module yourself after creating it.


I wonder if the code example shouldn't go on the module page.

--

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



  1   2   >