[issue3720] segfault in for loop with evil iterator

2010-05-03 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
keywords: +26backport

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



[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2010-05-03 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
assignee:  - ronaldoussoren
components: +Macintosh

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



[issue8427] toplevel jumps to another location on the screen

2010-05-03 Thread Andrei Paraschivescu

Changes by Andrei Paraschivescu andre...@comcast.net:


--
type:  - behavior

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Matt Wartell

New submission from Matt Wartell matt.wartell...@gmail.com:

As the bz2.BZ2File object claims to be a file-like object it should conform to 
PEP 343 The 'with' statement by implementation of the __enter__ and __exit__ 
methods.


boring, substantiating detail follows:
$ uname -a
Linux tallguy 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 
i686 GNU/Linux
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
 with bz2.BZ2File('test.bz2') as infile:
... pass
... 
AttributeError: 'bz2.BZ2File' object has no attribute '__exit__'

 getattr(bz2.BZ2File, '__enter__')
AttributeError: type object 'bz2.BZ2File' has no attribute '__enter__'
 getattr(bz2.BZ2File, '__exit__')
AttributeError: type object 'bz2.BZ2File' has no attribute '__exit__'


$ dpkg -l python2.6
ii  python2.62.6.5-1ubuntu6 An interactive hig...
$ dpkg -L python2.6 | grep bz2.so
/usr/lib/python2.6/lib-dynload/bz2.so

--
components: Extension Modules
messages: 104817
nosy: Matt.Wartell
priority: normal
severity: normal
status: open
title: bz2.BZ2File should support with protocol per PEP 343
type: behavior
versions: Python 2.6

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



[issue8602] documentation of bz2 module mildly erroneous

2010-05-03 Thread Matt Wartell

New submission from Matt Wartell matt.wartell...@gmail.com:

This is related to http://bugs.python.org/issue8601 bz2.BZ2File should support 
with protocol per PEP 343

The documentation at http://docs.python.org/library/bz2.html states:

   This module provides a comprehensive interface for the bz2 compression 
library. It implements a complete file interface,... 

although bz2.BZ2File does not support the __enter__ and __exit__ methods so 
arguably doesn't implement the complete file interface. If issue8601 is 
declined then the documentation should probably note this exception.

--
assignee: d...@python
components: Documentation
messages: 104818
nosy: Matt.Wartell, d...@python
priority: normal
severity: normal
status: open
title: documentation of bz2 module mildly erroneous
type: behavior
versions: Python 2.6

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Matt Wartell

Matt Wartell matt.wartell...@gmail.com added the comment:

cross referenced with documentation issue http://bugs.python.org/issue8602 
documentation of bz2 module mildly erroneous

--

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



[issue5565] Strange behavior when I logout() with IMAP4_SSL

2010-05-03 Thread Philipp Tölke

Philipp Tölke toelke...@model.in.tum.de added the comment:

The TCP-issues from my post are all resolved. I now know how TCP works; the 
behaviour of python seems to be correct.

About the imap-behaviour:
m...@harga ~$ python
Python 2.5.5 (r255:77872, Apr 21 2010, 08:40:04) 
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
 import imaplib
 c = imaplib.IMAP4_SSL(post.in.tum.de)
 c.login(toelke, XXX)
('OK', ['LOGIN Ok.'])
 c.logout()
('BYE', ['Courier-IMAP server shutting down'])
 C-d
m...@harga ~$

At the time of the logout() the server closes his connection and sends a 
FIN-packet. If python is closed, it sends not a FIN-Packet but a RST-paket.

The problem I have with this is, that the Linux-Packetfilter-Firewall does 
not expect this RST-Packet either and in out configuration logs this as a 
connection in the wrong state which is generally a security-problem.

Our workaround for the last year has been

iptables -A OUTPUT  -p tcp --tcp-flags ACK,RST ACK,RST -d 131.159.22.43 -j DROP

Thanks for the help!

--

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



[issue5565] Strange behavior when I logout() with IMAP4_SSL

2010-05-03 Thread Philipp Tölke

Philipp Tölke toelke...@model.in.tum.de added the comment:

The TCP-issues from my post are all resolved. I now know how TCP works; the 
behaviour of python seems to be correct.

About the imap-behaviour:
m...@harga ~$ python
Python 2.5.5 (r255:77872, Apr 21 2010, 08:40:04) 
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
 import imaplib
 c = imaplib.IMAP4_SSL(post.in.tum.de)
 c.login(toelke, XXX)
('OK', ['LOGIN Ok.'])
 c.logout()
('BYE', ['Courier-IMAP server shutting down'])
 C-d
m...@harga ~$

At the time of the logout() the server closes his connection and sends a 
FIN-packet. If python is closed, it sends not a FIN-Packet but a RST-paket.

The problem I have with this is, that the Linux-Packetfilter-Firewall does 
not expect this RST-Packet either and in out configuration logs this as a 
connection in the wrong state which is generally a security-problem.

Our workaround for the last year has been

iptables -A OUTPUT  -p tcp --tcp-flags ACK,RST ACK,RST -d 131.159.22.43 -j DROP

Thanks for the help!

--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Trent Nelson

Trent Nelson tnel...@onresolve.com added the comment:

I introduced test_support.find_unused_port in r62234, as part of a general 
refactoring of client/server network-oriented tests.  The only reason I 
introduced this method at the time was because the SSL tests used to launch 
openssl in server mode, which required a port to be specified as part of the 
command line.

Pure Python tests shouldn't use this method, as noted in the docstring, they 
should use bind_port(), which takes platform socket-oddities into account.

I'm not sure if I agree that find_unused_port() should be removed though; it 
does serve a purpose in very rare corner cases.  Perhaps it should be renamed 
to _find_unused_port() to discourage accidental usage.

(I'd recommend reviewing r62234's commit log and change set for more info.)

--
nosy: +trent

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



[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-03 Thread Marc-Andre Lemburg

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

I agree with Martin regarding the os.environ changes. Victor, please
open a new ticket for this.

Martin: As you probably know, these issues are managed as micro-
mailing lists. Discussions on these lists often result in new
aspects which then drift off to new issues. That's normal business
and we are all well aware of this. Please stop yelling all about the
place and change your tone ! Thanks.

--

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



[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-03 Thread STINNER Victor

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

 Let's try: r80703

This one looks ok: the output order is kept and I didn't noticed anything 
special in the buildbot output.

Backported to 3.1 as r80711. Close the issue.

--
resolution:  - fixed
status: open - closed

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

As discussed in issue #8514, I propose a bytes version of os.envionb which 
would be synchronized with os.environ (which is possible thanks to 
surrogateescape error handler).

I also propose a os.getenvb()-bytes function.

I don't know yet if it's a good idea of not, but my patch accepts both bytes 
and str for os.environ(b).get() and os.getenv(b)().

antoine In posixmodule.c, (...) if memory allocation of the bytes
antoine object fails, we should error out.

I would require to change also the Windows version and the code specific to 
OS/2. Ok to do that, but after closing this issue ;-) I don't want to change to 
much things at the same time.

--
components: Interpreter Core, Library (Lib), Unicode
files: os_environb.patch
keywords: patch
messages: 104825
nosy: Arfrever, ezio.melotti, gregory.p.smith, haypo, lemburg, loewis, pitrou
priority: normal
severity: normal
status: open
title: Create a bytes version of os.environ and getenvb()
versions: Python 3.2
Added file: http://bugs.python.org/file17191/os_environb.patch

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



[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-03 Thread STINNER Victor

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

loewis I really, really, REALLY think that it is bad to mix issues.
loewis This makes patch review impossible.

I tried to, but it looks difficult :-) Anyway, I opened #8603.

 This specific issue is about introducing an fsdecode and fsencode 
 function; this is what the bug title says, and what the initial patch
 did.

I know, but the two topics (fs*code() and os.environb) are very close and 
related. My os.environb implementation uses fsencode()/fsdecode().

 FWIW, I'm +0 on adding these functions. MAL, please stop messing
 issue subjects. (...)

I think that we cannot decide correctly about fs*code() until we decided for 
os.environb.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread STINNER Victor

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

The patch creates also fsencode()/fsdecode() functions proposed in #8514: I can 
rename them to use protected name (eg. _encodeenv and _decodeenv) until we 
decided for these functions.

--

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



[issue8596] crypt blowfish 'ignores' salt

2010-05-03 Thread pvo

pvo user+pyt...@localhost.localdomain.org added the comment:

OpenBSD's crypt(3) mentions some bcrypt*() functions. One of this functions is 
char * bcrypt_gensalt(u_int8_t log_rounds). It produces salts like: 
$2a$04$7.zkQ.HPURlplcFTWgDL3u or $2a$04$l2SuIEWPqF4D3uMTABgBYO

Passing this salts to Pyton's crypt.crypt on FreeBSD works perfect.

Sorry for the noise.

--

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



[issue8596] crypt blowfish 'ignores' salt

2010-05-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Okay, thanks for the update!

Looks like the FreeBSD crypt manpage could use some work...

--

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

I'm seeing a similar (but not identical) failure on py3k / Windows 7 in 
test_marshal. Failure in the same code path in support.py:

==
ERROR: test_floats (__main__.FloatTestCase)
--
Traceback (most recent call last):
  File ../Lib/test/test_marshal.py, line 14, in helper
f = open(support.TESTFN, wb)
IOError: [Errno 13] Permission denied: '@test_5324_tmp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ../Lib/test/test_marshal.py, line 88, in test_floats
self.helper(f)
  File ../Lib/test/test_marshal.py, line 26, in helper
support.unlink(support.TESTFN)
  File C:\compile\py3k\lib\test\support.py, line 186, in unlink
os.unlink(filename)
WindowsError: [Error 5] Access is denied: '@test_5324_tmp'

--

--

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



[issue8586] test.support errors (py3k)

2010-05-03 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
title: test_imp.py test failures on Py3K Mac OS X - test.support errors (py3k)

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Tim Golden

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

This is basically issue 7743 which is a combination of:

* Using the same filename for all tests in one process
* Something (TSvn / Virus Checker) having a delete-share handle
* Not renaming the file before removing it in test.support.unlink

MvL suggested a change to the underlying unlink. I'm unconvinced
that this would solve the issue, but I haven't put together the
test cases needed to show this. For this current issue, I believe
that patching test.support.unlink to rename (to a guid-based
name in the same directory, say) before deleting would solve
all this.

It's fairly reproducible; there's a mini-test harness on
that other call which will throw up these errors often
enough to be useful.

--
nosy: +tim.golden
title: test.support errors (py3k) - test_imp.py test failures on Py3K Mac OS X

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-05-03 Thread July Tikhonov

July Tikhonov july.t...@gmail.com added the comment:

To Evan Klitzke (eklitzke):

I'm also interested in seeing this fixed. In the current behavior,
the following code doesn't work:

 start code
from functools import wraps

def magic(func):
   @wraps(func)
   def even_more_magic(*args):
   return func(*args)
   return even_more_magic

class Frob(object):
   @magic
   @classmethod
   def hello(cls):
   print '%r says hello' % (cls,)
 end code

This code _should not_ work.

[Unbound] classmethod object is not a method or a function, it is even not a 
callable; it is a descriptor (returning callable). So, it cannot be wrapped or 
decorated in such way.

If you want something like this to work, you probably should place @classmethod 
on the upper level (in other words, apply classmethod after all other 
decorators):

@classmethod
@magic
def hello(cls):
print '%r says hello' % (cls,)

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Olemis Lang

New submission from Olemis Lang olemis...@gmail.com:

Often I have the contents to be written in a file at a given path that
I know as well. I recently tried to find a function in stdlib to do
that and to my surprise this is what I found :

 - Such function exists
 - It's `distutils.file_util.write_file`

IMO the last place where people'd look for such a function is inside
`distutils` package. Besides I reviewed modules listed under `File and
directory access` category in `Library Reference` and found nothing
even similar.

The idea is to provide a a similar function in `shutils` module

--
assignee: tarek
components: Distutils
messages: 104833
nosy: olemis, tarek
priority: normal
severity: normal
status: open
title: Alias for distutils.file_util.write_file in e.g. shutils
type: feature request
versions: Python 2.7

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Antoine Pitrou

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

This sounds silly to me. You can write a file in two lines:

with open(foo, wb) as f:
f.write(contents)

If you want to do something more useful, you can add a function for atomic 
writing of a file.

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

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

Does the standard library really need something so trivial? I'd put it in your 
own program. And I'd make the one in distutils private (and fix it to use a 
with statement).

--
nosy: +eric.smith

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
stage:  - needs patch
versions: +Python 3.2 -Python 2.6

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

@Eric: remember that distutils is frozen, so it won't be removed. And 
historically Distutils code was meant to be 2.4 compatible (thus, no with)

@Antoine: Yes, that would be the idea (provide a robust pattern by using a 
temporary file, then rename it)

--
components: +Library (Lib) -Distutils

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Antoine Pitrou

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

 @Antoine: Yes, that would be the idea (provide a robust pattern by
 using a temporary file, then rename it)

Then perhaps it would be better as a context manager:

with shutil.atomic_write(foo, wb) as f:
f.write(mycontents)

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Marc-Andre Lemburg

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

A view comments on the patch:

+def __init__(self, data, encodekey, decodekey, encodevalue, decodevalue, 
putenv, unsetenv):

As general guideline: When adding new parameter, please add them to the
end of the parameter list and preferably with a default argument in order
to not break the API.

Doesn't matter much in this case, since _Environ is only used internally,
but it's still good practice.

--

+data = {}
+for key, value in environ.items():
+data[_keymap(key)] = fsencode(value)

Please put such init code into a function or make sure that the global
module space is not polluted with temporary variables such as data,
key, value.

--

+# bytes environ
+environb = _Environ(data, _keymap, fsencode, fsencode, fsencode, _putenv, 
_unsetenv)

This looks wrong even though it will work, but that's only a
side-effect of how fsencode is coded and that's not how the
stdlib should be coded (see below).

--

+def fsencode(value):
+
+unicode to file system
+
+if isinstance(value, bytes):
+return value
+else:
+return value.encode(sys.getfilesystemencoding(), 'surrogateescape')

The function should not accept bytes as input or at least
document this pass-through behavior, leaving the user to decide
whether that's wanted or not.

--

The patch is also missing code which keeps the two dictionaries in
sync. If os.environ changes, os.environb would have to change as
well.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread STINNER Victor

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

 The patch is also missing code which keeps the two dictionaries in
 sync. If os.environ changes, os.environb would have to change as
 well.

No, it doesn't :-) os.environ and os.environb are synchronized and there is a 
test for this! ;-)

I will see later for your other comments.

--

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Barry A. Warsaw

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

Surely not bug 7743 Additional potential string - float conversion issues.

--

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Tres Seaver

Tres Seaver tsea...@agendaless.com added the comment:

BZ2File objects already support the context manager protocol on the trunk, as 
of Antoine Pitrou's fix for http://bugs.python.org/issue3860

--
nosy: +tseaver

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



[issue839159] iterators broken for weak dicts

2010-05-03 Thread Tres Seaver

Tres Seaver tsea...@agendaless.com added the comment:

I can confirm that the patch applies with minimal fuzz to the
release26-maint branches and the trunk, and that the added tests fail
without the updated implementation in both cases.

Furthermore, Jim's original demo script emits it error with my stock 2.6.5
Python, but is silent with the patched trunk / 2.6 branch.

--
nosy: +tseaver

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@twistedmatrix.com added the comment:

 I'm not sure if I agree that find_unused_port() should be removed though; it 
 does serve a purpose in very rare corner cases.

It can serve a purpose in any number of cases.  My point is that it's *always* 
unreliable, though.  Any time you have any API that you want to test that 
requires a pre-allocated port number, you're going to have intermittent 
failures.  Such APIs are broken and should be fixed where possible and avoided 
otherwise.

--

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Indeed, and it was considered a feature request and thus is not appropriate for 
backport.  If you wish to see that decision changed I think you will need to 
appeal to python-dev.

--
nosy: +r.david.murray
resolution:  - out of date
stage: needs patch - committed/rejected
status: open - closed
versions: +Python 2.6 -Python 3.2

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

I've applied the logging patch and checked into trunk (r80712).

--

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



[issue5565] Strange behavior when I logout() with IMAP4_SSL

2010-05-03 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

FWIW on my cisco firewalls the logs contain a lot of 'deny, no connection' 
messages for RST packets, probably coming from similar scenarios.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue1682942] ConfigParser support for alt delimiters

2010-05-03 Thread Tres Seaver

Tres Seaver tsea...@agendaless.com added the comment:

I'm afraid the patch no longer applies cleanly to the trunk, although
at least updating the docs should be easier now that they are converted
to ReStructuredText.

The tests in the patch for the new feature seem sensible.

--
nosy: +tseaver

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



[issue8581] Logging handlers do not handle double-closing very well

2010-05-03 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Fix checked into release26-maint (r80713).

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

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



[issue8600] test_gdb failures

2010-05-03 Thread Dave Malcolm

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

Is the message about threads emitted every time you run python under gdb? Does 
gdb work?  If so we should simply filter out the error message.

I'm attaching a patch which strips out that error message from stderr (assuming 
that I reformatted it for line-lengths correctly).

Does this fix things?

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file17192/ignore-stderr-thread-noise.txt

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



[issue8593] Improve c-api/arg.rst

2010-05-03 Thread Antoine Pitrou

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

I've applied Eric's and Brian's suggestions and committed the patch to r80714 
(py3k) and r80715 (3.1). Thank you!

--
resolution:  - fixed
status: open - closed

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



[issue8600] test_gdb failures

2010-05-03 Thread Antoine Pitrou

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

The patch wasn't exactly good. Here is a working patch. Applying it reveals a 
couple of different failures, but I will open a separate issue.

--
Added file: http://bugs.python.org/file17193/ignore-stderr-thread-noise2.txt

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Dan Buch

Changes by Dan Buch daniel.b...@gmail.com:


--
nosy: +meatballhat

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



[issue8605] gdb API issues

2010-05-03 Thread Antoine Pitrou

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

I now get the following failures in test_gdb:

==
FAIL: test_pyup_command (test.test_gdb.StackNavigationTests)
Verify that the py-up command works
--
Traceback (most recent call last):
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 599, in 
test_pyup_command
$''')
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 163, in 
assertMultilineMatches
msg='%r did not match %r' % (actual, pattern))
AssertionError: 'Breakpoint 1 at 0x4508a0: file Objects/object.c, line 
330.\n\nBreakpoint 1, PyObject_Print (op=42, fp=0x77535780, flags=1) at 
Objects/object.c:330\n330\t\treturn internal_print(op, fp, flags, 0);\n#7 
(unable to read python frame information)\n' did not match '^.*\n#[0-9]+ Frame 
0x[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \\(a=1, b=2, c=3\\)\n
baz\\(a, b, c\\)\n$'

==
FAIL: test_up_at_top (test.test_gdb.StackNavigationTests)
Verify handling of py-up at the top of the stack
--
Traceback (most recent call last):
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 613, in 
test_up_at_top
cmds_after_breakpoint=['py-up'] * 4)
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 129, in 
get_stack_trace
self.assertEquals(err, '')
AssertionError: 'Error occurred in Python command.\nError occurred in Python 
command.\n' != ''

==
FAIL: test_up_then_down (test.test_gdb.StackNavigationTests)
Verify py-up followed by py-down
--
Traceback (most recent call last):
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 628, in 
test_up_then_down
$''')
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 163, in 
assertMultilineMatches
msg='%r did not match %r' % (actual, pattern))
AssertionError: 'Breakpoint 1 at 0x4508a0: file Objects/object.c, line 
330.\n\nBreakpoint 1, PyObject_Print (op=42, fp=0x77535780, flags=1) at 
Objects/object.c:330\n330\t\treturn internal_print(op, fp, flags, 0);\n#7 
(unable to read python frame information)\n#3 Frame 0x805700, for file 
/home/antoine/cpython/__svn__/Lib/test/gdb_sample.py, line 10, in baz (args=(1, 
2, 3))\nprint(42)\n' did not match '^.*\n#[0-9]+ Frame 0x[0-9a-f]+, for 
file .*gdb_sample.py, line 7, in bar \\(a=1, b=2, c=3\\)\nbaz\\(a, b, 
c\\)\n#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 10, in baz 
\\(args=\\(1, 2, 3\\)\\)\nprint\\(42\\)\n$'

==
FAIL: test_basic_command (test.test_gdb.PyBtTests)
Verify that the py-bt command works
--
Traceback (most recent call last):
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 634, in 
test_basic_command
cmds_after_breakpoint=['py-bt'])
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 129, in 
get_stack_trace
self.assertEquals(err, '')
AssertionError: 'Error occurred in Python command.\n' != ''

==
FAIL: test_print_after_up (test.test_gdb.PyPrintTests)
--
Traceback (most recent call last):
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 658, in 
test_print_after_up
r.*\nlocal 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*)
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 163, in 
assertMultilineMatches
msg='%r did not match %r' % (actual, pattern))
AssertionError: 'Breakpoint 1 at 0x4508a0: file Objects/object.c, line 
330.\n\nBreakpoint 1, PyObject_Print (op=42, fp=0x77535780, flags=1) at 
Objects/object.c:330\n330\t\treturn internal_print(op, fp, flags, 0);\n#7 
(unable to read python frame information)\nUnable to read information on python 
frame\nUnable to read information on python frame\nUnable to read information 
on python frame\n' did not match .*\\nlocal 'c' = 3\\nlocal 'b' = 2\\nlocal 
'a' = 1\\n.*

==
FAIL: test_locals_after_up (test.test_gdb.PyLocalsTests)
--
Traceback (most recent call last):
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 684, in 
test_locals_after_up
r.*\na = 1\nb = 2\nc = 3\n.*)
  File /home/antoine/cpython/__svn__/Lib/test/test_gdb.py, line 163, in 
assertMultilineMatches
msg='%r did not match %r' % (actual, pattern))
AssertionError: 'Breakpoint 1 at 0x4508a0: file Objects/object.c, line 

[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Tim Golden

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

Sorry, typing too fast:

   http://bugs.python.org/issue7443 - test.support.unlink issue on Windows 
platform

at least insofar as the issue applies to Windows. I imagine that the
OS X thingis completely different.

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Well, a context manager sounds overkill since we just want to write some 
content in a file (and nothing else during that context). 

I think a simple call is straightforward:

  shutil.atomic_write(foo, contents, mode=wb)

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Notice that contents could be replaced here by an iterator, that would return 
data to send to write()

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Antoine Pitrou

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

 Well, a context manager sounds overkill since we just want to write
 some content in a file (and nothing else during that context). 

Using a context manager, though, is the recommended idiom to write
files. I think there's a value in remaining consistent. We don't want to
end up like PHP which has dozens of different idioms of doing similar
things.

--

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Matt Wartell

Matt Wartell matt.wartell...@gmail.com added the comment:

Sorry for the dup, and thanks for the patch. 

My patch for Module/bz2module.c was almost done - I learned a lot in the 
process, but foremost to check better for dups, first ;)

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

This idiom makes sense when you want to do some things with an open file, and 
replaces the usual try..finally idiom.

That's not what we want to do here. We want to write data in a file in a single 
step, in an atomic manner. 

Giving the ability to the developers to work in a context manager means that 
you potentially give them the ability to break this atomicity.

So I don't think the context manager idiom prevails, and should be avoided : 
shutil.atomic_write is asked to write a file, given some data, and don't return 
until it's done.

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@twistedmatrix.com added the comment:

Considering that it's extremely difficult to implement this correctly and in a 
cross-platform way, I think it makes sense as a stdlib addition (though I'd add 
it as a method of a `path` type rather than to the shell utilities module ;).

--
nosy: +exarkun

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-05-03 Thread Bruce Frederiksen

Bruce Frederiksen dangy...@gmail.com added the comment:

I have also hit this error.  I went to report it but found it already entered 
(good news), but not resolved from nearly a year ago (bad news).

The error masked another bug that I had in my program and it took me quite 
awhile to figure out what the real problem was.

I use *generator arguments quite a lot, so was surprised to see the error.  So 
I, for one, can say that if you disable *generator arguments, you will break 
existing code.

If anybody cares, I have verified that this error also appears in Python2.5 and 
Python2.4 and am attempting to add python2.5 to the Versions list.  (And yes, 
*generators were allowed in Python2.4!)

Is this headed for resolution?  Progress on it seems to have stalled nearly a 
year ago.  Can I vote to revive this?

--
nosy: +dangyogi
versions: +Python 2.5

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I agree that with the addition of the new requirement that it be an atomic 
write, it should be in a library.

I'd also do it as a context manager, since that's the more general case. 
distutils2 can either call the context manager version, or have a trivial 
function that calls the context manager.

--

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Antoine Pitrou

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

 Giving the ability to the developers to work in a context manager
 means that you potentially give them the ability to break this
 atomicity.

AFAICT this doesn't make sense. The writing isn't atomic, the renaming
is.

--

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



[issue665761] reduce() masks exception

2010-05-03 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
keywords: +needs review
stage: unit test needed - patch review

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-05-03 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
keywords: +needs review
stage:  - patch review

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



[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

2010-05-03 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

@Antoine, @Eric: After some more thoughts a contextlib makes more sense.

I also have a use case for an atomic copytree() but I guess that can be an 
option in copytree()

--

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



[issue8604] Adding an atomic FS write API

2010-05-03 Thread Tarek Ziadé

Changes by Tarek Ziadé ziade.ta...@gmail.com:


--
title: Alias for distutils.file_util.write_file in e.g. shutils - Adding an 
atomic FS write API

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



[issue8390] tarfile: use surrogates for undecode fields

2010-05-03 Thread Lars Gustäbel

Lars Gustäbel l...@gustaebel.de added the comment:

Yes, I will soon have ;-) Please give me a few days...

--

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



[issue8600] test_gdb failures

2010-05-03 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue8605] gdb API issues

2010-05-03 Thread STINNER Victor

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

See #8482 for the Unable to read information on python frame issue.

--
nosy: +haypo

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



[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-03 Thread Martin v . Löwis

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

 I think that we cannot decide correctly about fs*code() until we decided for 
 os.environb.

Why is that? In msg104063, you claim that you want to create these
functions to deal with file names (not environment variables), in
msg104064, you claim that #8513 (which is about the program name in
subprocess) would benefit from these functions. Do these use cases
become invalid if os.environb becomes available?

--

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



[issue8390] tarfile: use surrogates for undecode fields

2010-05-03 Thread STINNER Victor

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

A better fix is maybe to store fields as bytes, but it would break the 
compatibility and unicode is pratical in Python3.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

Can somebody please explain what problem is being solved with this patch?

--

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



[issue8390] tarfile: use surrogates for undecode fields

2010-05-03 Thread Martin v . Löwis

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

I think it is helpful to read the pax specification here:

http://www.opengroup.org/onlinepubs/009695399/utilities/pax.html

pax defines (IIUC) that all strings in a pax-compliant tar file are UTF-8 
encoded. For the invalid option, they offer the alternatives bypass, rename, 
UTF-8, and write. It may be useful to provide the same options, in some form.

--

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



[issue8390] tarfile: use surrogates for undecode fields

2010-05-03 Thread STINNER Victor

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

My patch changes test_uname_unicode() of test_tarfile for the GNU and ustar 
formats (but not PAX). In GNU and ustar formats, the fields can be encoded in 
any encoding, and may contain invalid byte sequences.

--

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



[issue8606] OSF is not supported anymore

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

New submission from Jesús Cea Avión j...@jcea.es:

OSF* platform seems to be pretty dead. We are moving it to unsupported state, 
as documented in PEP11.

The first phase is Python 3.2: Configure will fail win OSF* platforms. This 
configuration failure will be trvivially reversible.

If nobody stands up to take care of OSF*, support will be removed in Python 3.3.

Discussion:

http://mail.python.org/pipermail/python-dev/2010-April/099718.html

http://mail.python.org/pipermail/python-dev/2010-May/099899.html

--
assignee: jcea
messages: 104875
nosy: jcea
priority: normal
severity: normal
stage: committed/rejected
status: open
title: OSF  is not supported anymore
versions: Python 3.2, Python 3.3

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



[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-03 Thread Martin v . Löwis

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

STINNER Victor wrote:
 STINNER Victor victor.stin...@haypocalc.com added the comment:
 
 Why is that? In msg104063, you claim that you want to create these
 functions to deal with file names (not environment variables)
 
 Yes, but my os_path_fs_encode_decode-3.patch uses it in getenv() which 
 is maybe a bad idea: os.environb may avoid this.

IIUC, that usage is an equivalent transformation, i.e. the code doesn't
change its behavior. It is mere refactorization.

So *if* these functions are accepted, this change is a good idea
regardless of the os.environb introduction (unless I'm missing
something, and there is indeed a behavior change).

 in msg104064, you claim that #8513 (which is about the program name in
 subprocess) would benefit from these functions. Do these use cases
 become invalid if os.environb becomes available?
 
 #8513 is also related to environment variables: subprocess._execute_child() 
 calls os.get_exec_path() which search the PATH environment variable.
 It would be nice to support bytes environment variable in the env
 argument of Popen constructor (bytes key and/or value).

I still fail to see why this would make this issue block on the
os.environb introduction. Whether this gets introduced or not, the
program name issue remains, no?

--

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



[issue8606] OSF is not supported anymore

2010-05-03 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
nosy: +loewis

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Marc-Andre Lemburg

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

Martin v. Löwis wrote:
 
 Martin v. Löwis mar...@v.loewis.de added the comment:
 
 Can somebody please explain what problem is being solved with this patch?

The way os.environ is currently set up on Unix breaks applications
using the environment to pass data to helper applications.

Please see the discussion on http://bugs.python.org/issue8514
for details.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 Please see the discussion on http://bugs.python.org/issue8514
 for details.

I can't see any report of actual breakage in that report, only claims of
potential breakage (with no supporting examples)

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread STINNER Victor

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

An issue was opened 2 years ago: It was brought up in a discussion of sending 
non-ASCii data to a CGI-WSGI script where the data would be transferred via 
os.environ. = #4006 (closed as wont fix).

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 An issue was opened 2 years ago: It was brought up in a discussion
 of sending non-ASCii data to a CGI-WSGI script where the data would
 be transferred via os.environ. = #4006 (closed as wont fix).

Fortunately, that issue could now be reconsidered as fixed; the
example in the report (msg74118) now works correctly - thanks to PEP
383. So I still fail to see the problem.

--

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Barry A. Warsaw

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

I cannot reproduce this on my 10.6.3 machine either running the full test 
suite, or running:

./python.exe Lib/test/test_imp.py
./python.exe -m unittest test.test_imp

--
resolution:  - works for me

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Hmm... happens reliably for me.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 Set your CODESET to ASCII and watch the surrogate escaping
 begin... seriously, Martin, if you've ever worked with CGI
 or WSGI or FastCGI or SCGI or any of the many other protocols
 that use the OS environment for passing data between processes,
 it doesn't take much imagination to come up with examples
 that fail left and right.
 
 Here's one (RFC 3875, sections 4.1.7 and 4.1.5):
 
 LANG = 'en_US.utf8'
 CONTENT_TYPE = 'application/x-www-form-urlencoded'
 QUERY_STRING = 'type=examplename=Löwis'
 PATH_INFO = '/home/löwis/bin/mycgi.py'

I still don't see a *failure* here. AFAICT, it all works correctly.
In particular, I fail to see the advantage of using bytes over using
escaped strings, in terms of correctness. I'm even skeptical that there
is an advantage in terms of usability (and if there is, I'd like to see
a demonstration of that, as well).

--

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Barry A. Warsaw

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

How odd.  I'm on r80727 in py3k.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 Here's one (RFC 3875, sections 4.1.7 and 4.1.5):
 
 LANG = 'en_US.utf8'
 CONTENT_TYPE = 'application/x-www-form-urlencoded'
 QUERY_STRING = 'type=examplename=Löwis'
 PATH_INFO = '/home/löwis/bin/mycgi.py'
 
 (HTML uses Latin-1 as default encoding and so do many of the
  protocols invented for it !)

BTW, I think you are misinterpreting the RFC. It doesn't actually say
that QUERY_STRING is Latin-1 encoded, but instead, it says

the details of the parsing, reserved characters and support for non
US-ASCII characters depends on the context

Latin-1 is only given as a possible example. Apache passes the URL from
the HTTP request unescaped; browsers will likely CGI-escape it. So most
likely, it will be

QUERY_STRING = 'type=examplename=L%F6wis'
or
QUERY_STRING = 'type=examplename=L%C3%B6wis'

IMO, applications are much better off to consider QUERY_STRING as a
character string.

--

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



[issue8606] OSF is not supported anymore

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

Jesús Cea Avión j...@jcea.es added the comment:

I am unsupporting OSF* systems. If that is too much to deprecate, change it to 
deprecate only OSF1.

Commit at r80728.

--
resolution:  - accepted
status: open - closed
type:  - feature request

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Marc-Andre Lemburg

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

Martin v. Löwis wrote:
 
 Martin v. Löwis mar...@v.loewis.de added the comment:
 
 Set your CODESET to ASCII and watch the surrogate escaping
 begin... seriously, Martin, if you've ever worked with CGI
 or WSGI or FastCGI or SCGI or any of the many other protocols
 that use the OS environment for passing data between processes,
 it doesn't take much imagination to come up with examples
 that fail left and right.

 Here's one (RFC 3875, sections 4.1.7 and 4.1.5):

 LANG = 'en_US.utf8'
 CONTENT_TYPE = 'application/x-www-form-urlencoded'
 QUERY_STRING = 'type=examplename=Löwis'
 PATH_INFO = '/home/löwis/bin/mycgi.py'
 
 I still don't see a *failure* here. AFAICT, it all works correctly.

Your name will end up being partially escaped as surrogate:

'L\udcf6wis'

Further processing will fail, since the application would
correctly assume that the data is Latin-1 only (see the RFC):

Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'latin-1' codec can't encode character '\udcf6' in position 
1: ordinal not in
range(256)

 In particular, I fail to see the advantage of using bytes over using
 escaped strings, in terms of correctness. I'm even skeptical that there
 is an advantage in terms of usability (and if there is, I'd like to see
 a demonstration of that, as well).

The use of the 'surrogateescape' error handler modifies the
encoding used for the decoding of the bytes data and does this
implicitly.

This works fine as long as the data is only used *as reference* to
some entity (e.g. as in a file name) and manipulation of that
data is limited to concatenation and slicing. Things that you do
with file names and paths.

It doesn't work if an application tries to work *with* the data,
e.g. tries to convert it, parse it, decode it, etc. The reason is
that information included by the use of the 'surrogateescape'
error handler is lost along the way and this then causes data
corruption.

--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Giampaolo Rodola'

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

 Any time you have any API that you want to test that requires a 
 pre-allocated port number, you're going to have intermittent failures.  
 Such APIs are broken and should be fixed where possible and avoided 
 otherwise.

You mean that socket.create_connection(), httplib (issue 3972) and ftplib 
should or should have used a different API to implement their source_address 
option?

--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Giampaolo Rodola'

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


--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Giampaolo Rodola'

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

 Any time you have any API that you want to test that requires a 
 pre-allocated port number, you're going to have intermittent failures.  
 Such APIs are broken and should be fixed where possible and avoided 
 otherwise.

You mean that socket.create_connection(), httplib (issue 3972) and ftplib 
(issue 8594) should have used a different API to implement their 
source_address option?

--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Antoine Pitrou

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

 You mean that socket.create_connection(), httplib (issue 3972) and
 ftplib (issue 8594) should have used a different API to implement
 their source_address option?

  source_address=(192.168.0.2, 0))
 s.getsockname()
('192.168.0.2', 40496)

--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Antoine Pitrou

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

Roundup ate my code. I meant:

 s = socket.create_connection((python.org, 80), 
 source_address=(192.168.0.2, 0))
 s.getsockname()
('192.168.0.2', 40496)

--

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



[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-03 Thread Antoine Pitrou

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


--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 Your name will end up being partially escaped as surrogate:
 
 'L\udcf6wis'
 
 Further processing will fail

That depends on the further processing, no?

 Traceback (most recent call last):
   File stdin, line 1, in module
 UnicodeEncodeError: 'latin-1' codec can't encode character '\udcf6' in 
 position 1: ordinal not in
 range(256)

Where did you get this error from?

 It doesn't work if an application tries to work *with* the data,
 e.g. tries to convert it

Converting it to what?

 parse it

Parsing will work fine.

 decode it

It's a string. You shouldn't decode it.

 The reason is
 that information included by the use of the 'surrogateescape'
 error handler is lost along the way and this then causes data
 corruption.

And how would that not happen if it was bytes? The problems you describe
were one of the primary motivations to switch to Unicode: it's *byte*
strings that have these problems.

--

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



[issue8604] Adding an atomic FS write API

2010-05-03 Thread Giampaolo Rodola'

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


--
nosy: +giampaolo.rodola

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread STINNER Victor

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

 Can somebody please explain what problem is being solved with this patch?

The problem is that we don't have reliable algorithm to get the encoding of 
each environment variable. We cannot ensure that all variables are encoded 
correctly.

Using os.getenvb(), you can decode the string using the right encoding (which 
may be different for each variable).

Marc proposed os.getenv(key, encoding=...) but I don't like this solution: you 
have to split correctly all unicode things and all bytes things. You should 
have the choice to keep environment unchanged, as byte strings, and manipulate 
only byte strings, or to use the classic API (unicode only, os.getenv, 
os.environ(), ).

os.environb and os.getenvb() will be required to applications in real world 
application supporting all applications and misconfigured environments. Python3 
shouldn't try to fix misconfigured systems but leave this problem to the 
developer.

--

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



[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-03 Thread STINNER Victor

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

 IIUC, that usage is an equivalent transformation, i.e. the code doesn't
 change its behavior. It is mere refactorization.

I changed os.getenv() to accept byte string key (in a previous commit), but I 
don't like this hack. If we have os.environb, os.getenv() shouldn't support 
bytes anymore (but use str only, as before).

--

I worked a little more on fsencode()/os.environb, trying to fix all issues. 
fsdecode() is no more needed if we have os.environb, and fsencode() can be 
simplified to:

  def fsencode(value):
 return value.encode(sys.getfilesystemencoding(), 'surrogateescape')

fsdecode() leads to mojibake.

--

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-03 Thread Nir Aides

Changes by Nir Aides n...@winpdb.org:


Added file: http://bugs.python.org/file17194/nir-ccbench-xp32.log

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-03 Thread Nir Aides

Changes by Nir Aides n...@winpdb.org:


Removed file: http://bugs.python.org/file16967/bfs.patch

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 Using os.getenvb(), you can decode the string using the right
 encoding (which may be different for each variable).

Ok. If that's the motivation, the documentation should make that
clear (there isn't any documentation in the patch, anyway). I'm
worried that people start processing the bytes as-is (i.e. without
decoding them), and then start complaining that this and that library
doesn't support bytes. Then they start complaining that you can't
mix bytes and Unicode...

I also worry that people won't get it right any better than Python:
when they find that it doesn't work, they ask what to do, and people
will tell them decode with iso-8859-1 (say). Then they do that,
and end up in moji-bake the next day.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Marc-Andre Lemburg

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

Martin v. Löwis wrote:
 
 Martin v. Löwis mar...@v.loewis.de added the comment:
 
 Here's one (RFC 3875, sections 4.1.7 and 4.1.5):

 LANG = 'en_US.utf8'
 CONTENT_TYPE = 'application/x-www-form-urlencoded'
 QUERY_STRING = 'type=examplename=Löwis'
 PATH_INFO = '/home/löwis/bin/mycgi.py'

 (HTML uses Latin-1 as default encoding and so do many of the
  protocols invented for it !)
 
 BTW, I think you are misinterpreting the RFC. It doesn't actually say
 that QUERY_STRING is Latin-1 encoded, but instead, it says
 
 the details of the parsing, reserved characters and support for non
 US-ASCII characters depends on the context

Please read on:


   For example, form submission from an HTML
   document [18] uses application/x-www-form-urlencoded encoding, in
   which the characters +,  and = are reserved, and the ISO
   8859-1 encoding may be used for non US-ASCII characters.


I could have also given you an example using 'multipart/form-data'
in which each part uses a different encoding or even sends binary
data by means of 'Content-Transfer-Encoding: binary'

These are not made up examples, they do occur in the real world for
which we are coding.

 Latin-1 is only given as a possible example. Apache passes the URL from
 the HTTP request unescaped; browsers will likely CGI-escape it. So most
 likely, it will be
 
 QUERY_STRING = 'type=examplename=L%F6wis'
 or
 QUERY_STRING = 'type=examplename=L%C3%B6wis'

 IMO, applications are much better off to consider QUERY_STRING as a
 character string.

Believe me, I've been working with HTML, forms, web apps, etc.
for almost 20 years now. In the real world, your application has
to cope with any kind of data in QUERY_STRING.

And this is just one example of how the OS environment can
be used, e.g. to provide the user meta-data, license data,
company names.

Even if these all use UTF-8, a user might still want to stick
to ASCII as her CODESET and then all her Python application would
start to fail at first sight of a French accent or German
Umlaut.

PEP 383 is nice for file names and paths, but it's unfortunately
not going to save the world...

--

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-03 Thread Nir Aides

Nir Aides n...@winpdb.org added the comment:

I updated bfs.patch with improvements on Windows XP. 

The update disables priority boosts associated with the scheduler condition on 
Windows for CPU bound threads.

Here is a link to ccbench results:
http://bugs.python.org/file17194/nir-ccbench-xp32.log

Summary:

Windows XP 32bit q9400 2.6GHz Release build (no PG optimizations).
Test runs in background, ccbench modified to run both bz2 and sha1.

bfs.patch - seems to behave.

gilinter2.patch
single core: high latency, low IO bandwidth.

dabeaz_gil.patch 
single core: low IO bandwidth.
4 cores: throughput threads starvation (balance), some latency, low IO 
bandwidth.

--
Added file: http://bugs.python.org/file17195/bfs.patch

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread STINNER Victor

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

 I also worry that people won't get it right any better than Python (...)

Developers coming from Python2 will continue to use os.getenv() and will not 
worry about encoding, and maybe not notice that the result is now unicode (and 
not more a byte string).

I think that a developer will only switch to os.getenvb() if he/she has 
troubles with the encodings.

--

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-03 Thread Martin v . Löwis

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

 I think that a developer will only switch to os.getenvb() if he/she
 has troubles with the encodings.

That's indeed a positive feature of this proposed change.

--

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



[issue8557] subprocess PATH semantics and portability

2010-05-03 Thread Dave Abrahams

Changes by Dave Abrahams d...@boostpro.com:


Removed file: http://bugs.python.org/file17142/probe.py

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



[issue8557] subprocess PATH semantics and portability

2010-05-03 Thread Dave Abrahams

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

Not to appear impatient, but...bump.
It's a fairly tidy answer, I think :-)

--

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



[issue3620] test_smtplib is flaky

2010-05-03 Thread Giampaolo Rodola'

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

Adding this:

def handle_error(self):
raise

...to SimSMTPChannel class would help to provide a clearer error message to 
understand where exactly EBADF comes from, altough I think this was an old 
asyncore bug which have already been fixed.
Is this still reproducible on Python 3.2?

--

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



[issue8557] subprocess PATH semantics and portability

2010-05-03 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Sorry for my Windows ignorance, but if CreateProcess ignores the PATH, how does 
updating the PATH fix the problem?

--

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



[issue8607] OSX: duplicate -arch flags in CFLAGS breaks sysconfig

2010-05-03 Thread Robin Dunn

New submission from Robin Dunn ro...@alldunn.com:

In Python 2.7b1, building on OSX 10.6 with this configure command:

export CC=gcc-4.0
export CXX=g++-4.0
export MACOSX_DEPLOYMENT_TARGET=10.4
../configure \
--with-universal-archs=32-bit \
--enable-universalsdk=/Developer/SDKs/MacOSX10.4u.sdk \
--enable-framework 


Results in these lines in Makefile:

BASECFLAGS= -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  
-fno-common -dynamic
CFLAGS= $(BASECFLAGS) -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk  $(OPT) $(EXTRA_CFLAGS)


Then later on in the build the sysconfig module uses the -arch flags in CFLAGS 
but is not able to find a match because of the extra set of values, and the 
build fails with this exception:

Traceback (most recent call last):
  File ./../Lib/site.py, line 542, in module
main()
  File ./../Lib/site.py, line 521, in main
addbuilddir()
  File ./../Lib/site.py, line 118, in addbuilddir
s = build/lib.%s-%.3s % (get_platform(), sys.version)
  File /projects/Python-2.7b1/Lib/sysconfig.py, line 646, in get_platform
Don't know machine value for archs=%r%(archs,))
ValueError: Don't know machine value for archs=('i386', 'i386', 'ppc', 'ppc')
make: *** [sharedmods] Error 1

--
components: Build
messages: 104905
nosy: robind
priority: normal
severity: normal
status: open
title: OSX: duplicate -arch flags in CFLAGS breaks sysconfig
type: compile error
versions: Python 2.7

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



  1   2   >