[issue6825] Minor documentation bug with os.path.split

2010-10-14 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, applied in r85453.

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

___
Python tracker 

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



[issue9093] Tools/README is out of date

2010-10-14 Thread Georg Brandl

Georg Brandl  added the comment:

This is indeed fixed already.

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

___
Python tracker 

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



[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> To me, this is more a matter of conceptual completeness 
> than one of practical utility ...

Nick, you don't seem to be truly sold on the need.
I'm -1 on adding this.  It's basically cruft.  If
it were published as an ASPN recipe, its uptake
would be nearly zero.

We need to focus on real problems in the standard 
library and provide solid solutions.  If weight
gets added to the standard lib, it needs to be
selective.

--

___
Python tracker 

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



[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-14 Thread Georg Brandl

Georg Brandl  added the comment:

Okay, applied as r85455.

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

___
Python tracker 

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-10-14 Thread Georg Brandl

Georg Brandl  added the comment:

Okay, committed as 85456.  I'll leave it to you how to proceed from here.

--

___
Python tracker 

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



[issue9964] Test failures with -OO

2010-10-14 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed pdb issue in r85457.

--

___
Python tracker 

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



[issue10095] Support undecodable filenames in the parser API

2010-10-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

We shouldn't need to reopen the file in the first place. If we already have a 
file handle, we can rewind it. Then the encoding of the file name becomes 
irrelevant.

I keep forgetting: what was the plan for deprecating the FILE* functions in the 
parser interface? If we need to continue to support them, we could read the 
whole contents of the file before parsing, and then use the memory-based 
parsing algorithm.

If parsing files can be fully based on the IO module, we shouldn't even need to 
rewind the file. Instead, the io module should support switching the encoding 
mid-stream (unless, say, we are in the middle of a multibyte character - since 
the parser always asks for complete lines, this should not happen).

--
nosy: +loewis

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-14 Thread Vlastimil Brom

Vlastimil Brom  added the comment:

I tried to give the 64-bit version a try, but I might have encountered a more 
general difficulties.
I tested this on Windows 7 Home Premium (Czech), the system is 64-bit (or I've 
hoped so sofar :-), according to System info: x64-based PC
I installed
Python 2.7 Windows X86-64 installer
from http://www.python.org/download/
which run ok, but the header in the python shell contains "win32"

Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.

Consequently, after copying the respecitive files from issue2636-20101009.zip
I get an import error:

>>> import regex
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python_64bit_27\lib\regex.py", line 253, in 
from _regex_core import *
  File "C:\Python_64bit_27\lib\_regex_core.py", line 53, in 
import _regex
ImportError: DLL load failed: %1 nenÝ platnß aplikace typu Win32.

>>> 

(The last part of the message is a in Czech with broken diacritics:
 %1 is not a valid Win32 type application.)

Is there something I can do in this case? I'd think, the installer would refuse 
to install a 64-bit software on a 32-bit OS or 32-bit architecture, or am I 
missing something obvious from the naming peculiarities x64, 64bit etc.?
That being said, I probably don't need to use 64-bit version of python, 
obviously, it isn't a wide unicode build mentioned earlier, hence
>>> len(u"\U00010333") # is still: 
2
>>>
And I currently don't have special memory requirements, which might be better 
addressed on a 64-bit system.

If there is something I can do to test regex in this environment, please, let 
me know;
On the same machine the 32-version is ok:
Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import regex
>>>

regards
   vbr

--

___
Python tracker 

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



[issue9964] Test failures with -OO

2010-10-14 Thread Georg Brandl

Georg Brandl  added the comment:

r85459 - test_dis
r85460 - test_import
r85461 - test_lib2to3 (bug was in fix_operator)
r85462 - test_xml_etree
r85464 - test_compileall
r85465 - test_cmd_line_script

That should be all of them.

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

___
Python tracker 

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



[issue9992] Command-line arguments are not correctly decoded if locale and fileystem encodings are different

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I think that we should accept that b'\xff' can be decoded as '\xff' and 
> that's all.

What do you plan to do to fix this failure?

==
FAIL: test_undecodable_env (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", 
line 892, in test_undecodable_env
self.assertEquals(stdout.decode('ascii'), ascii(value))
AssertionError: "'abc\\xff'" != "'abc\\udcff'"
- 'abc\xff'
?  ^
+ 'abc\udcff'
?  ^^^

http://www.python.org/dev/buildbot/builders/x86%20debian%20parallel%203.x/builds/502/steps/test/logs/stdio

--
assignee:  -> haypo

___
Python tracker 

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



[issue10098] intermittent failure in test_os

2010-10-14 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The Windows 7 buildbot sometimes shows a failure in test_os:

test test_os failed -- Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_os.py", 
line 1080, in test_CTRL_BREAK_EVENT
self._kill_with_event(signal.CTRL_BREAK_EVENT, "CTRL_BREAK_EVENT")
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_os.py", 
line 1058, in _kill_with_event
self.fail("subprocess did not stop on {}".format(name))
AssertionError: subprocess did not stop on CTRL_BREAK_EVENT

http://www.python.org/dev/buildbot/3.x.stable/builders/x86%20Windows7%203.x/builds/1755/steps/test/logs/stdio

--
components: Tests, Windows
messages: 118634
nosy: brian.curtin, db3l, pitrou, tim.golden
priority: normal
severity: normal
status: open
title: intermittent failure in test_os
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Martin v. Löwis wrote:
> 
> New submission from Martin v. Löwis :
> 
> Reportedly, platform.uname gives UnicodeError for non-ASCII computer names on 
> Windows, see http://www.pasteall.org/16215
> 
> I think it is incorrect that _node uses socket.gethostname on Windows. 
> uname() should return the local hostname (i.e. the one that the system itself 
> believes to have), independent of the network configuration or DNS.
> 
> Therefore, I think it should return the COMPUTERNAME environment variable, or 
> the result of the GetComputerName() API.

There are two issues here:

1. socket.gethostname() shouldn't raise an error on Windows, but
   return the Unicode host name

2. COMPUTERNAME returns an uppercase version of the host name (which we
   could lowercase to stay b/w compatible), however I'm not sure
   whether this is the same as the socket.gethostname() or the
   NETBIOS name and I'm also not sure whether this is always set.

   This link suggests that it's using the NetBIOS name:
   
http://www.scriptlogic.com/support/CustomScripts/environmentVariableReference.html

   The official Microsoft page is unclear about this:
   http://technet.microsoft.com/en-gb/library/bb490954.aspx

Could someone please check whether using the environment
variable COMPUTERNAME would work in the described case ?

What we could do is use the socket.gethostname() and fall back
to COMPUTERNAME in case of decoding problems.

Thanks,
-- 
Marc-Andre Lemburg
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/

--
nosy: +lemburg
title: platform.uname gives UnicodeError for non-ASCII computer names on 
Windows -> platform.uname gives UnicodeError for non-ASCII computernames on 
Windows

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Vlastil, what makes you think that issue2636-20101009.zip is a 64-bit version? 
I can only find 32-bit DLLs in it.

--

___
Python tracker 

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



[issue10099] socket.fromfd() documentation problem

2010-10-14 Thread Kálmán Gergely

New submission from Kálmán Gergely :

socket.fromfd()'s behaviour is somewhat counter-intutive and should contain a 
note to warn the user that it'll leave the original FD open. This is important 
if someone forgets to manually close the file descriptor as it might lead to FD 
leaks (and kernel memory leaks). This is especially the case when there is no 
python object associated with the FD, so no destruction will take place.

patch applies to this:
http://docs.python.org/py3k/archives/python-3.1.2-docs-html.tar.bz2

The only thing it does is that it adds a note section with the following 
message: "The original file descriptor will not be closed."

synapse

--
assignee: d...@python
components: Documentation
files: fromfd_doc.patch
keywords: patch
messages: 118637
nosy: d...@python, synapse
priority: normal
severity: normal
status: open
title: socket.fromfd() documentation problem
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file19230/fromfd_doc.patch

___
Python tracker 

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



[issue10099] socket.fromfd() documentation problem

2010-10-14 Thread Kálmán Gergely

Kálmán Gergely  added the comment:

Forgot to add that the changes should be applied to all versions if accepted.

synapse

--

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Marc-Andre Lemburg wrote:
> 2. COMPUTERNAME returns an uppercase version of the host name (which we
>could lowercase to stay b/w compatible), however I'm not sure
>whether this is the same as the socket.gethostname() or the
>NETBIOS name and I'm also not sure whether this is always set.
> 
>This link suggests that it's using the NetBIOS name:
>
> http://www.scriptlogic.com/support/CustomScripts/environmentVariableReference.html
> 
>The official Microsoft page is unclear about this:
>http://technet.microsoft.com/en-gb/library/bb490954.aspx

More evidence that the NetBIOS name is used:

http://msdn.microsoft.com/en-us/library/aa368009(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms724295(v=VS.85).aspx

One problem with this approach is that changes to the NetBIOS name
are not seen by those APIs and variables, e.g. if the machine
get's an update via DHCP. The other is that NetBIOS itself is
being phased out in favor of DNS names - which socket.gethostname()
returns, so we'd be replacing a new technology with an old one.

http://blogs.technet.com/b/networking/archive/2008/12/16/netbios-browsing-and-windows-server-2008-x64-server-core.aspx

BTW: Why doesn't socket.gethostname() use GetComputerNameEx()
which does support Unicode ?

See http://msdn.microsoft.com/en-us/library/ms724301(v=VS.85).aspx

--

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-14 Thread Vlastimil Brom

Vlastimil Brom  added the comment:

Well, it seemed to me too,
I happened to read the last post from Matthew, msg118243, in the sense that he 
made some updates which need testing on a 64 bit system (I am unsure, whether 
hardware architecture, OS type, python build or something else was meant); but 
it must have been somehow separated as a new directory in the 
issue2636-20101009.zip which is not the case.

More generaly, I was somhow confused about the "win32" in the shell header in 
the mentioned install.
vbr

--

___
Python tracker 

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



[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

There is a slight issue with warnings, and that's the filtering by 
module/location. Since these warnings will occur in destructors, they can 
appear at any point without being related to the code being executed. The 
"default" filtering method (print the first occurrence of matching warnings for 
each location where the warning is issued) then is not appropriate; therefore I 
suggest a separate warning category (ResourceWarning?) for which people can 
enable different rules.

--

___
Python tracker 

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



[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Does this work also for sockets?

--

___
Python tracker 

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



[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Does this work also for sockets?

Not with the current implementation. I guess this could be added, but then I 
would have to make the warning method ("_dealloc_warn") public on IO classes.

--

___
Python tracker 

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



[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is an updated patch using warnings (RuntimeWarning for now) and also 
warning about unclosed sockets.

--
Added file: http://bugs.python.org/file19231/deallocwarn2.patch

___
Python tracker 

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



[issue9992] Command-line arguments are not correctly decoded if locale and fileystem encodings are different

2010-10-14 Thread STINNER Victor

STINNER Victor  added the comment:

With r85466+r85467, the test_undecodable_env (of test_subprocess) uses C locale 
to get ASCII locale encoding (for the first test, on unicode environment 
variables). It should have the same effect than env['PYTHONFSENCODING'] = 
'ascii': get ASCII as the filesystem encoding.

--

___
Python tracker 

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



[issue10100] fromfd is now available on all platforms

2010-10-14 Thread Daniel Stutzbach

New submission from Daniel Stutzbach :

fromfd is marked as Availability: Unix, but in Python 3 it is also available on 
Windows:

C:\>c:\python31\python.exe
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.fromfd


The following lines can also be removed from testFromFd:

if not hasattr(socket, "fromfd"):
return # On Windows, this doesn't exist

--
assignee: d...@python
components: Documentation
messages: 118646
nosy: d...@python, stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: fromfd is now available on all platforms
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue10099] socket.fromfd() documentation problem

2010-10-14 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
nosy: +stutzbach

___
Python tracker 

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



[issue9992] Command-line arguments are not correctly decoded if locale and fileystem encodings are different

2010-10-14 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, the issue is not complelty fixed ;-)

12:55 < py-bb> build #504 of x86 debian parallel 3.x is complete: Success 
[build successful]  Build details are at 
   
http://www.python.org/dev/buildbot/all/builders/x86%20debian%20parallel%203.x/builds/504

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

___
Python tracker 

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



[issue9992] Command-line arguments are not correctly decoded if locale and fileystem encodings are different

2010-10-14 Thread STINNER Victor

STINNER Victor  added the comment:

I tried... "the issue is *now* complelty fixed"

--

___
Python tracker 

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



[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Fixed in r85471.

--
nosy: +pitrou
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 2.6

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

I've been in touch with the copyright holders of pyOpenSSL and they all were 
positive about contributing the code to the PSF under a contributor agreement.

The idea would then be to add the crypto routines to pyOpenSSL and have that 
added to the stdlib as say openssl package.

So how should we go about this ? Open a new ticket ?

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I've been in touch with the copyright holders of pyOpenSSL and they
> all were positive about contributing the code to the PSF under a
> contributor agreement.
> So how should we go about this ? Open a new ticket ?

I would like to see public discussion about this, especially in the
light of the ssl module improvements in Python 3.2. It is not obvious
that duplicate APIs in the stdlib are a good idea, especially when they
are not compatible with each other. It also means that the current
pyOpenSSL maintainer (Jean-Paul) should agree to do maintenance directly
in the stdlib rather than in a separate repo.

> The idea would then be to add the crypto routines to pyOpenSSL and
> have that added to the stdlib as say openssl package.

This sounds a bit ridiculous. Why not add the crypto routines directly
to the stdlib?

--

___
Python tracker 

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



[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Thanks for the comments and feedback.
Fixed this in revision 85475.

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

___
Python tracker 

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



[issue10095] Support undecodable filenames in the parser API

2010-10-14 Thread STINNER Victor

STINNER Victor  added the comment:

> We shouldn't need to reopen the file in the first place. 
> If we already have a file handle, we can rewind it.
> Then the encoding of the file name becomes irrelevant.

Oh yes, great idea. r85476 implements this solution (use lseek(0) on 
fileno(tok->fp)). The code path exists but only if filename was NULL. But I 
don't think that it worked because there was no call to lseek(0).

The commit fixes this issue (LANG= ./python -c "import inspect). I have other 
issues with "LANG= ./python Lib/test/regrtest.py -v test_pydoc test_traceback" 
but I think that it is a new (different) issue.

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

___
Python tracker 

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



[issue2775] Implement PEP 3108

2010-10-14 Thread Retro

Retro  added the comment:

Can you send my patch and comment to python-dev? Because I don't know how to. I 
don't know where is python-dev and what exactly you mean by this.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Antoine Pitrou wrote:
> 
> Antoine Pitrou  added the comment:
> 
>> I've been in touch with the copyright holders of pyOpenSSL and they
>> all were positive about contributing the code to the PSF under a
>> contributor agreement.
>> So how should we go about this ? Open a new ticket ?
> 
> I would like to see public discussion about this, especially in the
> light of the ssl module improvements in Python 3.2. It is not obvious
> that duplicate APIs in the stdlib are a good idea, especially when they
> are not compatible with each other. It also means that the current
> pyOpenSSL maintainer (Jean-Paul) should agree to do maintenance directly
> in the stdlib rather than in a separate repo.
> 
>> The idea would then be to add the crypto routines to pyOpenSSL and
>> have that added to the stdlib as say openssl package.
> 
> This sounds a bit ridiculous. Why not add the crypto routines directly
> to the stdlib?

To make those routines available to a broader audience and to
get more user feedback.

I don't think we can add pyOpenSSL to Python 3.2, so it's better
to use the available time to hash out the details outside the
stdlib. Once it's in the stdlib, changing APIs is very difficult.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> > This sounds a bit ridiculous. Why not add the crypto routines directly
> > to the stdlib?
> 
> To make those routines available to a broader audience and to
> get more user feedback.

Sure. But it can be any standalone package, not necessarily pyOpenSSL.
Then, if we want to add them to the stdlib, we don't have to pull in the
whole pyOpenSSL package.

> I don't think we can add pyOpenSSL to Python 3.2,

Right, it's too late.

> so it's better
> to use the available time to hash out the details outside the
> stdlib. Once it's in the stdlib, changing APIs is very difficult.

Then I think the discussion about API and process should move to
python-ideas.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Antoine Pitrou wrote:
> 
> Antoine Pitrou  added the comment:
> 
>>> This sounds a bit ridiculous. Why not add the crypto routines directly
>>> to the stdlib?
>>
>> To make those routines available to a broader audience and to
>> get more user feedback.
> 
> Sure. But it can be any standalone package, not necessarily pyOpenSSL.
> Then, if we want to add them to the stdlib, we don't have to pull in the
> whole pyOpenSSL package.

pyOpenSSL has the advantage of already providing all the other
bits and pieces needed to interface and build against OpenSSL,
so it's a good ecosystem for such a development.

Besides there are already patches available which do add the
ciphers and hashs to pyOpenSSL, so the development could be
sped up by using those as references.

>> I don't think we can add pyOpenSSL to Python 3.2,
> 
> Right, it's too late.
> 
>> so it's better
>> to use the available time to hash out the details outside the
>> stdlib. Once it's in the stdlib, changing APIs is very difficult.
> 
> Then I think the discussion about API and process should move to
> python-ideas.

The APIs should probably be discussed on the Python crypto or
pyOpenSSL list and the discussion about its integration into the
stdlib on either the python-dev or the stdlib list.

https://lists.sourceforge.net/lists/listinfo/pyopenssl-list
http://mail.python.org/mailman/listinfo/python-crypto
http://mail.python.org/mailman/listinfo/python-dev
http://mail.python.org/mailman/listinfo/stdlib-sig

python-ideas is not really meant for such discussions.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The APIs should probably be discussed on the Python crypto or
> pyOpenSSL list and the discussion about its integration into the
> stdlib on either the python-dev or the stdlib list.

If the target goal is stdlib inclusion, the APIs should be discussed on
python-ideas too.

> python-ideas is not really meant for such discussions.

Yes, it is.

--

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Retro

New submission from Retro :

>>> round(1.255, 2)
1.25

A bug in Python interpreter?


Shold have been:

>>> round(1.255, 2)
1.26

In mathematics, the .5 part is always rounded up, so in the example the .255 
should be rounded to .26 so please fix this bug.

--
components: Library (Lib)
messages: 118659
nosy: Retro
priority: normal
severity: normal
status: open
title: a bug in built-in function round() ?
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue10065] future_builtins' docstring lacks some functions

2010-10-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed in revision 85479.

--
nosy: +orsenthil
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Skip Montanaro

Skip Montanaro  added the comment:

No, just a result of the finite machine representation of
floats:

>>> repr(1.255)
'1.2549'

so the machine representation of 1.255 is actually less
than that value and round() is doing the right thing.

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue10102] mktime adding an hour in April (naive struct)?

2010-10-14 Thread Kevin Barnhart

New submission from Kevin Barnhart :

Just starting to dabble in the world of time and datetime objects.  I was 
converting an array of datetime objects to an array of floats via mktime to do 
some data analysis.  I have ran into an issue where mktime seems to be adding 
an hour on April 6, 2003.  Attached is an example script which I used to create 
the below output:

Python version:  (2, 6, 5, 'final', 0)
Epoch:  time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, 
tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=0)
First datetime:  2003-04-06 02:58:17
Second datetime:  2003-04-06 03:13:17
Is first datetime prior to second?:  True
First datetime, time struct: time.struct_time(tm_year=2003, tm_mon=4, 
tm_mday=6, tm_hour=2, tm_min=58, tm_sec=17, tm_wday=6, tm_yday=96, tm_isdst=-1)
Second datetime, time struct: time.struct_time(tm_year=2003, tm_mon=4, 
tm_mday=6, tm_hour=3, tm_min=13, tm_sec=17, tm_wday=6, tm_yday=96, tm_isdst=-1)
Is first time struct prior to second?:  True
First timestamp generated by mktime:  1049623097.0
Second timestamp generated by mktime:  1049620397.0
Is first timestamp less than second timestamp?:  False
First recovered datetime:  2003-04-06 03:58:17
Second recovered datetime:  2003-04-06 03:13:17
Is first recovered prior to second recovered?:  False
Is first recovered datetime same as original?:  False
Is second recovered datetime same as original?:  True

--
files: mktimeissue.py
messages: 118662
nosy: barnburnr
priority: normal
severity: normal
status: open
title: mktime adding an hour in April (naive struct)?
type: behavior
Added file: http://bugs.python.org/file19232/mktimeissue.py

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-10-14 Thread geremy condra

geremy condra  added the comment:

> Besides there are already patches available which do add the
> ciphers and hashs to pyOpenSSL, so the development could be
> sped up by using those as references.

I don't think that's the case. I admit that development on this has
been very slow (curse you, Real Life!) but it is nearing a release,
and I doubt that this would save any time even if I didn't have to
rewrite half of the keyphrene code.

Geremy Condra

--

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-10-14 Thread Alexander Ljungberg

Changes by Alexander Ljungberg :


--
nosy: +aljungberg

___
Python tracker 

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



[issue10086] test_sysconfig failure with site-packages

2010-10-14 Thread Hallvard B Furuseth

Hallvard B Furuseth  added the comment:

It's with 'purelib' because my prefix "/site" matches "/site-packages".
This fixes it for me, but maybe you should also assert that
global_path.startswith(os.path.join(base, "")).

--- Lib/test/test_sysconfig.py~ 2010-09-20
+++ Lib/test/test_sysconfig.py  2010-10-14
@@ -278 +278 @@ class TestSysConfig(unittest.TestCase):
-self.assertEquals(user_path, global_path.replace(base, user))
+self.assertEquals(user_path, global_path.replace(base, user, 1))

--

___
Python tracker 

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



[issue10103] use the SOABI for GNU/kfreeBSD and the GNU Hurd

2010-10-14 Thread Matthias Klose

New submission from Matthias Klose :

use the SOABI for GNU/kfreeBSD and the GNU Hurd

afaik, the only distribution for GNU/kfreeBSD and the GNU Hurd currently is 
Debian, and Debian already has this turned on for Linux too.

--
assignee: doko
components: Build
files: soabi.diff
keywords: needs review, patch
messages: 118665
nosy: doko
priority: normal
severity: normal
status: open
title: use the SOABI for GNU/kfreeBSD and the GNU Hurd
versions: Python 3.2
Added file: http://bugs.python.org/file19233/soabi.diff

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Retro

Retro  added the comment:

Gee, thanks for the insight. I didn't thought about the fact that binary 
floating point is so imprecise and can cause the round() to "error" in some 
situations.

In this case, the representation and the actual value are (way) off. How can 
that be? There are just 3 decimal numbers (.255) and Python at parsing the 
float is already off at the third decimal number. I'll never trust round() 
again. Well, actually I trust round() to do its job well -- it's the binary 
floating point I'm affraid of!

We must implement the decimal API to the core of Python in order to have 
precision.

--

___
Python tracker 

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



[issue10103] use the SOABI for GNU/kfreeBSD and the GNU Hurd

2010-10-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Looks good to me.

--
nosy: +barry
resolution:  -> accepted

___
Python tracker 

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



[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch committed in r85480, thanks!

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

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

This may not be a Python bug.

The failure is consistent on all Ubuntu 10.10 machines I've tried, including 
both i386 and x86_64 platforms.  I've gone back many svn revisions and even 
pulled down earlier alpha tarballs and the failure is consistent.

This does *not* fail on the one Ubuntu 10.04 x86_64 VM I've tried.  Will try on 
Debian squeeze next.

--

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I have seen this in very inconsistent manner.

--
nosy: +orsenthil

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Senthil, can you provide any additional information on where/when you've seen 
this?  AFAICT, test_urllib.py is the only test it shows up, but it's totally 
consistent.  What OS/platforms have you seen this happen on?  Same test or 
different one?

--

___
Python tracker 

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



[issue10103] use the SOABI for GNU/kfreeBSD and the GNU Hurd

2010-10-14 Thread Matthias Klose

Matthias Klose  added the comment:

checked in, r85481

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

___
Python tracker 

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



[issue10102] mktime adding an hour in April (naive struct)?

2010-10-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

It looks like you have just discovered the joys of daylight saving time.  The 
problem with your example is that datetime(2003,4,6,2,58,17) is not a valid 
time in your timezone (most likely you are in the US).  In the US, prior to 
2007, the clocks moved 1 hour ahead at 2AM on the first Sunday in April. An 
thus 1:59 AM was followed by 3:00 AM and 2:58:17 never occurred.

See the following link for detailed discussion of these issues:

http://docs.python.org/dev/py3k/library/datetime.html#tzinfo-objects

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

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-14 Thread Matthew Barnett

Matthew Barnett  added the comment:

I am not able to build or test a 64-bit version. The update was to the source 
files to ensure that if it is compiled for 64 bits then the string positions 
will also be 64-bit.

This change was prompted by a poster who tried to use the re module of a 64-bit 
Python build on a 30GB memmapped file but found that the string positions were 
still limited to 32 bits.

It looked like a 64-bit build of the regex module would have the same 
limitation.

--

___
Python tracker 

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



[issue9527] Add aware local time support to datetime module

2010-10-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Would anyone like to review this? The Rietveld link works (thanks Martin!) and 
I would like to get some feedback on the python version before I invest effort 
into coding this in C.

--

___
Python tracker 

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



[issue10098] intermittent failure in test_os

2010-10-14 Thread Brian Curtin

Brian Curtin  added the comment:

I've noticed this a few times since r85315. It raises a dialog box saying "The 
application was unable to start correctly" for some reason.

--
nosy: +ocean-city

___
Python tracker 

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



[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is following r85480 (issue #7523). It seems the Debian unstable system on 
one of the buildbots has SOCK_NONBLOCK and SOCK_CLOEXEC, but doesn't support 
creating sockets using these flags:

==
ERROR: testInitNonBlocking (test.test_socket.NonBlockingTCPTests)
--
Traceback (most recent call last):
  File 
"/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_socket.py", 
line 914, in testInitNonBlocking
socket.SOCK_NONBLOCK)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/socket.py", line 
94, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 22] Invalid argument

==
ERROR: test_SOCK_CLOEXEC (test.test_socket.CloexecConstantTest)
--
Traceback (most recent call last):
  File 
"/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_socket.py", 
line 1834, in test_SOCK_CLOEXEC
socket.SOCK_STREAM | socket.SOCK_CLOEXEC)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/socket.py", line 
94, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 22] Invalid argument

==
ERROR: test_SOCK_NONBLOCK (test.test_socket.NonblockConstantTest)
--
Traceback (most recent call last):
  File 
"/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_socket.py", 
line 1854, in test_SOCK_NONBLOCK
socket.SOCK_STREAM | socket.SOCK_NONBLOCK)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/socket.py", line 
94, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 22] Invalid argument

(full log at 
http://www.python.org/dev/buildbot/3.x/builders/alpha%20Debian%203.x/builds/258/steps/test/logs/stdio)

--
components: Tests
keywords: buildbot
messages: 118677
nosy: doko, lekma, nvetoshkin, pitrou
priority: normal
severity: normal
status: open
title: test_socket failures on Debian unstable
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Éric Araujo

Éric Araujo  added the comment:

Maybe something like http://docs.python.org/library/decimal ?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue10105] Strings failing to print

2010-10-14 Thread RLS0812

New submission from RLS0812 :

Attempting to print a string fails in 3.1.2, throwing up an "invalid syntax" 
 I included a screen shot with the same codes ran in 2.7 and 3.1.2 .

--
components: None
files: 3_1_2_bug.jpg
messages: 118679
nosy: RLS0812
priority: normal
severity: normal
status: open
title: Strings failing to print
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file19234/3_1_2_bug.jpg

___
Python tracker 

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



[issue10094] test_urllib.py fails with RuntimeError on Ubuntu 10.10

2010-10-14 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
title: test_urllib.py fails in py3k r85440 with RuntimeError -> test_urllib.py 
fails with RuntimeError on Ubuntu 10.10

___
Python tracker 

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



[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

What about kernel version? As far as I know 2.6.27 is minimum requirement.

--

___
Python tracker 

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



[issue10105] Strings failing to print

2010-10-14 Thread Éric Araujo

Éric Araujo  added the comment:

print is a function now.  See for example 
http://docs.python.org/py3k/whatsnew/3.0

In the future, please copy input and output in your message if it's a few line, 
else attache a plain text file.  Text beats images.  Thank you!

--
nosy: +eric.araujo
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-14 Thread Vlastimil Brom

Vlastimil Brom  added the comment:

Sorry for the noise,
it seems, I can go back to the 32-bit python for now then...
vbr

--

___
Python tracker 

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



[issue7537] test_format fails with -j combined with -v

2010-10-14 Thread Florent Xicluna

Florent Xicluna  added the comment:

Unable to reproduce, here. It seems fixed.

--
nosy: +haypo
resolution:  -> works for me
status: open -> pending

___
Python tracker 

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



[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

Here's the patch from debian's issue 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529920
Patch URL: 
https://patches.ubuntu.com/by-release/extracted/ubuntu/n/neon27/0.28.4-2/01_runtime_detect_sock_cloexec.dpatch

--

___
Python tracker 

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



[issue10106] missing packages

2010-10-14 Thread S S

New submission from S S :

when trying to install beutifulsoup package on windows xp x86 with python 2.6.6 
getting the following error

C:\Python26>python C:\temp\BeautifulSoup-3.0.8.1\setup.py install
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "C:\temp\BeautifulSoup-3.0.8.1\setup.py", line 1, in 
from distutils.core import setup
ImportError: No module named distutils.core


installing the same package with python 2.7 gives a different error about site 
module missing. 

these errors i am getting with any packages  installs actually.

--
components: Installation
messages: 118685
nosy: S.S
priority: normal
severity: normal
status: open
title: missing packages
type: compile error
versions: Python 2.6

___
Python tracker 

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



[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks for the research. Given that it only happens on Debian unstable, and it 
only happens if you explicitly use SOCK_{CLOEXEC,NONBLOCK}, I would vote for 
not adding a workaround until some supported OS also exhibits the issue.

--

___
Python tracker 

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



[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

Agree.
Already written code won't suffer, new code should be ready to use new linux 
kernel.

--

___
Python tracker 

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



[issue2775] Implement PEP 3108

2010-10-14 Thread Brett Cannon

Brett Cannon  added the comment:

No. Best I can do is suggest you perform an internet search on the term as it 
makes it obvious what python-dev is.

--

___
Python tracker 

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



[issue10106] missing packages

2010-10-14 Thread Brett Cannon

Brett Cannon  added the comment:

Double-check your install. Errors like this typically means that your Python 
executable is not able to read the standard library files. Either that or 
something got moved and so the files are not where Python expects them to be.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue10102] mktime adding an hour in April (naive struct)?

2010-10-14 Thread Kevin Barnhart

Kevin Barnhart  added the comment:

Wow.  Should have caught that.  Thanks for the response.

Kevin

--

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> There are two issues here:

There are two issues, but not here :-)

> 1. socket.gethostname() shouldn't raise an error on Windows, but
>return the Unicode host name

This is issue 9377, please keep that out of this issue.

> Could someone please check whether using the environment
> variable COMPUTERNAME would work in the described case ?

No - I didn't personally encounter the problem.

> What we could do is use the socket.gethostname() and fall back
> to COMPUTERNAME in case of decoding problems.

I think using socket.gethostname() is conceptually wrong: the
what uname returns is *not* the name the machine has in DNS,
but what is configured in the kernel.

--

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Skip Montanaro

Skip Montanaro  added the comment:

Retro> I didn't thought about the fact that binary floating point is so
Retro> imprecise and can cause the round() to "error" in some
Retro> situations.

Details on the limitations of floating point arithmetic are here:

http://docs.python.org/tutorial/floatingpoint.html

Skip

--

___
Python tracker 

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



[issue9183] Intern UTC timezone

2010-10-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in r85485.

--
status: open -> closed

___
Python tracker 

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



[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-10-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

As a further note: I think socket.gethostname() is a special case, since this 
is just about a local setting (i.e. not related to DNS). We should then assume 
that it is encoded in the locale encoding (in particular, that it is encoded in 
mbcs on Windows).

--

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> More evidence that the NetBIOS name is used:
> 
> http://msdn.microsoft.com/en-us/library/aa368009(VS.85).aspx
> http://msdn.microsoft.com/en-us/library/ms724295(v=VS.85).aspx
> 
> One problem with this approach is that changes to the NetBIOS name
> are not seen by those APIs and variables, e.g. if the machine
> get's an update via DHCP. The other is that NetBIOS itself is
> being phased out in favor of DNS names - which socket.gethostname()
> returns, so we'd be replacing a new technology with an old one.

I think you misunderstand. It's not that this API returns the NetBIOS
name, but that NetBIOS really uses the same name that people understand
as their "computer name".

It's incorrect to use DNS names when implementing platform.uname():
on POSIX, uname() *also* does not return the DNS name. If you want
some API to return the DNS name of the computer, you need a different
function (e.g. socket.getfqdn()).

> BTW: Why doesn't socket.gethostname() use GetComputerNameEx()
> which does support Unicode ?

gethostname was specified by Berkeley Unix (4.2BSD specifically).
Microsoft can't just change the signature of the function.

If you are asking whether Python's socket.gethostname calls
gethostname: because this is the whole point of this function.
It would be very confusing if the function didn't call the
same-named platform API.

--

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I had seen with test_urllib, but it was inconsistent for me. Sometimes
make distclean and run had worked fine.

This was on Ubuntu 10.04, Intel 64 bit.

It is surprising, if it is seen consistently on Ubuntu 10.10 ( I have
not upgraded to this yet, so have not tried).

--
title: test_urllib.py fails with RuntimeError on Ubuntu 10.10 -> test_urllib.py 
fails in py3k r85440 with RuntimeError

___
Python tracker 

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



[issue10107] Quitting IDLE on Mac doesn't save unsaved code

2010-10-14 Thread Bruce Sherwood

New submission from Bruce Sherwood :

It has just been discovered that at least since Python 2.6 on the Mac, quitting 
IDLE does not prompt to save unsaved code, which is then lost. The recently 
submitted diff for bringing Guilherme Polo's Google Summer of Code improvements 
into IDLE on Python 3 (ID 10079) does not fix the problem.

--
components: IDLE
messages: 118697
nosy: Bruce.Sherwood
priority: normal
severity: normal
status: open
title: Quitting IDLE on Mac doesn't save unsaved code
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue8900] IDLE crashes if Preference set to At Startup -> Open Edit Window

2010-10-14 Thread Bruce Sherwood

Bruce Sherwood  added the comment:

Putting print statements in that part of the world shows that the reason why 
the list.remove fails is that while a ColorDelegator.toggle_colorize_event 
object is in the list, it has a different memory address than the 
ColorDelegator.toggle_colorize_event object to be removed. I've seen this NOT 
fail occasionally (the memory addresses were the same, so the list.remove 
succeeded), all of which would seem to imply that something has moved in memory.

I'll mention that when the failure occurs, the list always has just one object, 
a ColorDelegator.toggle_colorize_event object.

--
nosy: +Bruce.Sherwood

___
Python tracker 

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



[issue10106] missing packages

2010-10-14 Thread S S

S S  added the comment:

Brett,
the installation did not had any issues.
its running on windows xp, i am administrator of the machine so no permission 
issues. 

nothing got moved either as it fresh install

--

___
Python tracker 

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



[issue4086] support %z format in time.strftime and _strptime?

2010-10-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Closing as a duplicate of (closed) issue 6641.

time.strftime appears to support %z on the platforms that support it in C 
strftime:


>>> time.strftime("%z", time.localtime())
'-0400'

--
dependencies:  -No obvious and correct way to get the time zone offset
resolution:  -> duplicate
superseder:  -> datetime.strptime doesn't support %z format ?

___
Python tracker 

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



[issue10106] missing packages

2010-10-14 Thread Brett Cannon

Brett Cannon  added the comment:

I'm now a Windows user, so there might be a better way to solve this, but...

Run ``python -v`` and see what it says about why 'site' was not imported. You 
can also verify that site.py is readable by Python by checking that its 
directory location is listed in sys.path and that you can read the file from 
the prompt.

Beyond that I am out of my element as it is probably a Windows-specific issue.

--

___
Python tracker 

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



[issue10106] missing packages

2010-10-14 Thread Brett Cannon

Changes by Brett Cannon :


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

___
Python tracker 

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



[issue10106] missing packages

2010-10-14 Thread Brett Cannon

Brett Cannon  added the comment:

I'm not a Windows user, so there might be a better way to solve this, but...

Run ``python -v`` and see what it says about why 'site' was not imported. You 
can also verify that site.py is readable by Python by checking that its 
directory location is listed in sys.path and that you can read the file from 
the prompt.

Beyond that I am out of my element as it is probably a Windows-specific issue.

--

___
Python tracker 

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



[issue10101] a bug in built-in function round() ?

2010-10-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Please note that the error is not in the third decimal position, but only in 
the 16th (i.e. the difference between the intended value and the actual value 
is smaller than 0.0001).

--
nosy: +loewis

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

The problem occurs on Ubuntu 10.10 because there's a new environment variable 
called $UBUNTU_MENUPROXY in the default user environment.  This is why it 
suddenly showed up in Python 3.1 and why it does not occur on other OS (even 
Ubuntu 10.04).

ProxyTests.setUp() conditional is too naive.  Will attach patch, commit and 
backport.

--
Added file: http://bugs.python.org/file19235/10094.txt

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
versions: +Python 3.1

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Ned Deily

Ned Deily  added the comment:

>It's incorrect to use DNS names when implementing platform.uname():
>on POSIX, uname() *also* does not return the DNS name. If you want
>some API to return the DNS name of the computer, you need a different
>function (e.g. socket.getfqdn()).

Even more importantly, the computer may have (and these days, usually has) more 
than one network interface and/or multiple IP addresses bound to a single 
interface.  Each IP address usually has a unique DNS name, but not necessarily. 
 In general, there can be no one-to-one mapping of platform name to DNS name.

--
nosy: +ned.deily

___
Python tracker 

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



[issue9013] Implement tzinfo.dst() method in timezone

2010-10-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

After thinking some more about this issue, I am going to withdraw this 
proposal.  If we want to support storing dst flag in datetime instances, it 
should be stored in the datetime object itself, not in tzinfo. 

See

http://mail.python.org/pipermail/python-dev/2010-August/102842.html

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Martin v. Löwis wrote:
> 
> Martin v. Löwis  added the comment:
> 
>> More evidence that the NetBIOS name is used:
>>
>> http://msdn.microsoft.com/en-us/library/aa368009(VS.85).aspx
>> http://msdn.microsoft.com/en-us/library/ms724295(v=VS.85).aspx
>>
>> One problem with this approach is that changes to the NetBIOS name
>> are not seen by those APIs and variables, e.g. if the machine
>> get's an update via DHCP. The other is that NetBIOS itself is
>> being phased out in favor of DNS names - which socket.gethostname()
>> returns, so we'd be replacing a new technology with an old one.
> 
> I think you misunderstand. It's not that this API returns the NetBIOS
> name, but that NetBIOS really uses the same name that people understand
> as their "computer name".
> 
> It's incorrect to use DNS names when implementing platform.uname():
> on POSIX, uname() *also* does not return the DNS name. If you want
> some API to return the DNS name of the computer, you need a different
> function (e.g. socket.getfqdn()).

If think you are misunderstanding. The DNS name of a machine *is*
it's node name.

>From the gethostname man page:

   Glibc Notes
   The  GNU  C library implements gethostname() as a library function that 
calls
   uname(2) and copies up to len bytes from the  returned  nodename  field  
into
   name.

>> BTW: Why doesn't socket.gethostname() use GetComputerNameEx()
>> which does support Unicode ?
> 
> gethostname was specified by Berkeley Unix (4.2BSD specifically).
> Microsoft can't just change the signature of the function.
> 
> If you are asking whether Python's socket.gethostname calls
> gethostname: because this is the whole point of this function.
> It would be very confusing if the function didn't call the
> same-named platform API.

The MS API returns the DNS name as Unicode, so you don't into
those encoding in the first place.

I'll close this report as won't fix, since it's not platform.uname()
that needs to be fixed, but socket.gethostname() and that's issue
9377.

I'll copy the URLs to that issue.

--

___
Python tracker 

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



[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows

2010-10-14 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg :


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

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


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

___
Python tracker 

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



[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-10-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Regarding fixing the issue at hand on Windows, I think Python should use the 
corresponding win32 API for getting the hostname: GetComputerNameEx().

It supports Unicode, so the encoding issue doesn't arise.

See  http://msdn.microsoft.com/en-us/library/ms724301(v=VS.85).aspx for details.

This also solves the platform.uname() issue mentioned here, since the uname() 
emulation for Windows relies on socket.gethostname() to determine the node name.

FWIW: Glib C does the reverse...

   The  GNU  C library implements gethostname() as a library function that 
calls
   uname(2) and copies up to len bytes from the  returned  nodename  field  
into
   name.

--

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Er, this patch is horrible. You should fix the generic bug, not workaround it 
on your particular environment. The test still fails with NO_PROXY:

$ NO_PROXY=1 ./python -m test.regrtest test_urllib
[1/1] test_urllib
Warning -- os.environ was modified by test_urllib
test test_urllib failed -- Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/test_urllib.py", line 121, in setUp
for k in os.environ.keys():
  File "/home/antoine/py3k/__svn__/Lib/_abcoll.py", line 410, in __iter__
for key in self._mapping:
  File "/home/antoine/py3k/__svn__/Lib/os.py", line 441, in __iter__
for key in self._data:
RuntimeError: dictionary changed size during iteration

--
assignee:  -> barry
nosy: +pitrou
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Fixed in r85489, please backport.

--
versions:  -Python 3.2

___
Python tracker 

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



[issue8293] HTTPSConnection.close() does not immediately close the connection.

2010-10-14 Thread Tiago Teresa Teodosio

Tiago Teresa Teodosio  added the comment:

I can make the connection really get closed by running the garbage collector. 
It seems that the SSL socket has some kind of lazy close.

import gc
gc.collect()

--
nosy: +TTT

___
Python tracker 

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



[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch adding ResourceWarning, adding new tests, and fixing failures 
in existing tests.
Feedback welcome.

--
Added file: http://bugs.python.org/file19236/deallocwarn3.patch

___
Python tracker 

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



[issue6098] xml.dom.minidom incorrectly claims DOM Level 3 conformance

2010-10-14 Thread karl

karl  added the comment:

The source of 3.1/lib/python3.1/xml/dom/__init__.py is correct 

===
minidom -- A simple implementation of the Level 1 DOM with namespace
   support added (based on the Level 2 specification) and other
   minor Level 2 functionality.
===

Even the level 2  implementation is partial. Some of the Level 3 implementation 
are based on a 9 April 2002 Working Draft. Comments like these ones are into 
the code.

# Node interfaces from Level 3 (WD 9 April 2002)

To note that there will be a need for a big code change in xml.dom to implement 
in the future webdomcore. Maybe a xml.dom.webdomcore would be welcome. 
http://www.w3.org/TR/domcore/

The request is valid.

--
nosy: +karlcow

___
Python tracker 

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



[issue815646] thread unsafe file objects cause crash

2010-10-14 Thread Paul Bolle

Paul Bolle  added the comment:

0) I ran into some (small) problems with the documentation added by revision 
62195. It seems more efficient to reuse this issue to report these. Feel free 
to ask me to open another issue if that's not appreciated.

1) A small patch that addresses two problems with the current (ie, 2.7) 
documentation should be attached:
- link three occurrences of "GIL" to the GIL entry in the glossary; and
- add some example code to clarify the usage of PyFile_IncUseCount() 
andPyFile_DecUseCount().

2) That patch also adds a link to the "Thread State and the Global Interpreter 
Lock" section to the GIL entry in the Documentation index. That is a separate 
problem. But fixing that minor problem could also be of help to people (like 
me) that need to better understand the GIL aspects of those two functions.

--
nosy: +pebolle
Added file: http://bugs.python.org/file19237/python-2.7-Doc-gil.patch

___
Python tracker 

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



  1   2   >