[issue9787] Release the TLS lock during allocations

2010-09-07 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson krist...@ccpgames.com:

Holding the keymutex lock during malloc and free operations is not a good 
idea.  The reason is, that custom implementations of malloc and free, can use 
the TLS themselves.  This is, for example, true in embedded situations, where 
one wants to replace malloc with, e.g. appMalloc, (to monitor the memory useage 
of Python) and appMalloc itself uses python TLS to find the current python 
State.

This change makes the malloc and free calls outside the lock.  The change in 
PyThread_set_key_value, requiring an extra lock allocate, has no significant 
performance impact since this is a rare api.

--
components: Interpreter Core
files: tlspatch.patch
keywords: patch, patch
messages: 115743
nosy: krisvale
priority: normal
severity: normal
status: open
title: Release the TLS lock during allocations
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18782/tlspatch.patch

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Michael Haubenwallner

Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:

While I do agree this being an AIX bug, it is not a blocker here:
fcntl extension does not _depend_ on flock, it just does _prefer_ flock:
If not available, fcntl extension uses something else (fcntl IIRC), as it did 
(even without linking libbsd) before the AIX5.3-patch, which just added flock 
to the headers (the implementation in libbsd already has been there before the 
patch).
The problem after that AIX5.3-patch was that the compile-check found flock, and 
then fcntl extension failed to link due to missing libbsd.
So it's just for how to detect flock, where the most safe variant is both the 
compile- and link-check. When one of them fails, flock should not be flagged as 
available and the alternative gets used.

--

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



[issue9664] Make gzip module not require that underlying file object support seek

2010-09-07 Thread R. David Murray

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

Matt: if you want to learn the file format and propose a patch, I think it 
would be OK for gzip to duck-type the file object and only raise an error when 
a seek is explicitly requested.  After all, that's the way real file objects 
work.  A quick glance at the code, though, indicates this isn't a trivial 
refactoring.  I think it should be possible in theory since one can pipe a 
gzipped file into gunzip, and I don't think it buffers the whole file to unzip 
it...but I don't know for sure. Another issue is that if the patch 
substantially changes the memory/performance footprint it might get rejected on 
that basis.

If you (or anyone else) wants to work on a patch let me know and I'll reopen 
the issue.

--
nosy: +r.david.murray
type:  - behavior
versions:  -Python 3.3

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



[issue9759] GzipFile object should raise ValueError on .read() after .close()

2010-09-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
keywords: +easy
nosy: +pitrou
versions: +Python 3.2

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-07 Thread R. David Murray

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

Note that issue 6074 may be relevant to your problem.

--
nosy: +r.david.murray

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



[issue9788] atexit and execution order

2010-09-07 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

import atexit

@atexit.register
def goodbye1():
print(1)

@atexit.register
def goodbye2():
print(2)

The code above prints:

2
1

...that is, the last registered function is executed first.
Wouldn't the contrary be better?

--
components: Library (Lib)
messages: 115747
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: atexit and execution order
versions: Python 3.2

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-07 Thread desolat

Changes by desolat nuabara...@web.de:


--
nosy: +desolat

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



[issue9786] Native TLS support for pthreads

2010-09-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

The patch looks good.
Apart from PyGILState_Ensure(), are there other parts of the code that use 
these functions?

--
nosy: +amaury.forgeotdarc

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



[issue9788] atexit and execution order

2010-09-07 Thread Skip Montanaro

Skip Montanaro s...@pobox.com added the comment:

I'm sure you can craft cases where one order is preferable to
another, but I don't think you can make the case in general
that first in, first out is preferable to last in, first out,
or any other ordering of exit functions.

--
nosy: +skip.montanaro

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



[issue9748] .inputrc magic-space breaks interactive mode

2010-09-07 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
status: open - closed

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



[issue9784] _msi.c warnings under 64-bit Windows

2010-09-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

FNFCIREAD co are macros to help the definition of callback functions:
http://msdn.microsoft.com/en-us/library/ff797940.aspx

hf is defined as INT_PTR, but the value it receives is the result of 
FNFCIOPEN(), which fits in int.
It is safe to cast hf to an int if you want to disable the warning.

--
keywords: +easy
nosy: +amaury.forgeotdarc

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



[issue9763] Crashes upon run after syntax error encountered in OSX 10.5.8

2010-09-07 Thread R. David Murray

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

If this is a problem with the Apple supplied tk there isn't much we can do 
about it from the Python end.  We've had a number of other bugs like that...

--
nosy: +r.david.murray

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



[issue9788] atexit and execution order

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue8772] sysconfig: _get_default_scheme can be made public?

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I wonder if the scheme names could be made more consistent, removing the need 
for a function.

--

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



[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

memoryview objects currently offer no way to explicitly release the underlying 
buffer.

This may cause problems for mutable objects that are locked while PEP 3118 
buffer references remain unreleased (e.g. in 3.2, io.BytesIO supports 
getbuffer() for direct access to the underlying memory, but disallows resizing 
until the associated memoryview goes away).

This isn't too bad in CPython due to explicit refcounting, but may be an issue 
when using other implementations since the time between release of the last 
reference and actual garbage collection is indeterminate. For example, the new 
test_getbuffer in the BytesIOMixin class in the test suite relies on del buf 
promptly releasing the underlying PEP 3118 buffer, which may not be the case on 
other implementations.

So there are two separate questions here:
1. Whether or not to add an explicit release() method to memoryview objects 
(this would be sufficient to address the problem)
2. Whether or not to add direct context management support to memoryview 
objects (this isn't really necessary, since a short context manager can do the 
same thing, but may be a nice convenience)

Nosy list members added based on relevant python-dev discussion where GvR 
previously nixed part 2 of the idea. At the time, I hadn't really separated the 
two questions properly in my mind, but I suspect the failing to do something 
about the first one will prove problematic in the long run (or even the short 
run, as the test suite issue suggests).

--
messages: 115753
nosy: gvanrossum, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: Explicit buffer release for memoryview objects
type: feature request
versions: Python 3.2

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



[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

The test suite actually does force a GC collection cycle, so the test may be 
more portable than I first thought, but the need to do that suggests an 
explicit buffer release API may be a more appropriate solution.

--

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



[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Antoine Pitrou

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

See the context management patch at #9757.

--

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



[issue9788] atexit and execution order

2010-09-07 Thread Giampaolo Rodola'

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

I think it's not a matter of preferable but most expected and I see FIFO as 
the most expected behavior in this case.

--

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



[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Thanks for that link. Compared to what either of us managed in the original 
thread, I think my first post here better articulates why the ability to 
explicitly release the buffer is important - not because of general memory 
usage, but because the object owning the buffer (e.g. a BytesIO instance) may 
behave differently while the buffer reference exists.

It wasn't until I saw the actual getbuffer() patch on python-checkins that this 
rationale actually clicked for me.

--

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



[issue919238] Recursive variable definition causes sysconfig infinite loop

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thank you for the patch. Review:

1) Why not raise an exception? A recursive variable definition is an error. 
Tarek, is this behavior change OK?

2) Does this apply to the new top-level sysconfig module and/or 
distutils.sysconfig?

3) I’d use a more specific name for the test method: test_bogus_variable 
instead of test_parse_makefile. I would also add a test for SELF=$(SELF) 
(currently there is only a test for cyclic definition, not recursive).

4) os.unlink(makefile) is not guaranteed to run, for example if the test is 
stopped or crashes. Put self.addCleanup(os.unlink, makefile) after the mkstemp 
call instead.

5) I didn’t know there was no “if __name__ == '__main__'” block in this test 
file, nice catch. There is no need for the intermediate test_main function, 
though: unittest.main() should be enough.

6) Minor style issues: You can use textwrap.dedent to keep the file contents in 
the os.write call indented; s/you're/your/; no need to del fd; put spaces 
around operators (here == and =); don’t add tree blank lines. See PEP 8 for 
more info.

--
assignee:  - tarek
nosy: +eric.araujo

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



[issue9031] distutils uses invalid -Wstrict-prototypes flag when compiling C++ extension module

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo
stage:  - committed/rejected
superseder:  - C++ compilation support for distutils

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



[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan

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


--
resolution:  - duplicate
status: open - closed

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



[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan

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


--
superseder:  - Add context manager protocol to memoryviews

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



[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I closed 9789 as a duplicate of this. Bringing the details from that issue over 
here:

memoryview objects currently offer no way to explicitly release the underlying 
buffer.

This may cause problems for mutable objects that are locked while PEP 3118 
buffer references remain unreleased (e.g. in 3.2, io.BytesIO supports 
getbuffer() for direct access to the underlying memory, but disallows resizing 
until the associated memoryview goes away).

This isn't too bad in CPython due to explicit refcounting, but may be an issue 
when using other implementations since the time between release of the last 
reference and actual garbage collection is indeterminate. For example, the new 
test_getbuffer in the BytesIOMixin class in the test suite can't rely on del 
buf promptly releasing the underlying PEP 3118 buffer, so it is forced to also 
invoke a full GC collection cycle in order to be portable to other 
implementations.

So there are two separate questions here:
1. Whether or not to add an explicit release() method to memoryview objects 
(this would be sufficient to address the problem)
2. Whether or not to add direct context management support to memoryview 
objects (this isn't really necessary, since a short context manager can do the 
same thing, but may be a nice convenience)

Guido was -0 on the idea of supporting the context management protocol, but the 
rationale presented to him at the time was lacking the key concept of 
behavioural changes in the object owning the buffer based on whether or not 
there were any outstanding buffer references.

--
nosy: +ncoghlan

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



[issue9786] Native TLS support for pthreads

2010-09-07 Thread Antoine Pitrou

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

Just tried to apply the patch:
- test_capi now freezes in auto-thread-state
- test_threading now freezes in test_finalize_runnning_thread

--
nosy: +pitrou

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



[issue9790] ntpath contains imports inside functions

2010-09-07 Thread Brian Curtin

New submission from Brian Curtin cur...@acm.org:

As pointed out by Nick Coghlan on python-dev, ntpath.samefile and 
ntpath.sameopenfile are vulnerable to deadlock because they contain imports.

--
assignee: brian.curtin
components: Extension Modules, Windows
files: review_email.txt
messages: 115761
nosy: brian.curtin
priority: normal
severity: normal
stage: needs patch
status: open
title: ntpath contains imports inside functions
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18783/review_email.txt

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



[issue1222585] C++ compilation support for distutils

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Arfrever’s patch looks good. There is no tests for detect_language now; should 
the patch be blocked by that?

(Note: Remember to use “hg import --user 'Arfrever Frehtes Taifersar Arahesis 
preferred email'” to give proper credit)

--

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



[issue9787] Release the TLS lock during allocations

2010-09-07 Thread Antoine Pitrou

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

You have a bug in PyThread_delete_key_value() (to_free = NULL?).
Also, you should move the /* NB This does *not* free p-value! */ comments at 
the right places.

--
nosy: +pitrou

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



[issue9788] atexit and execution order

2010-09-07 Thread Antoine Pitrou

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

LIFO looks preferable if you want your setup/teardown code to be properly 
nested (that is, if I set up A before B, I want B to be torn down before A).

--
nosy: +pitrou

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



[issue9270] distutils.util.getplatform and sysconfig.getplatform differ

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for the report. I just checked 2.7 and 3.2 (by monkey-patching os.uname 
to return something with a space and calling the two get_platform) and this is 
fixed (both use an underscore), probably thanks to the freeze and revert of 
distutils.

--
nosy: +eric.araujo
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.2

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



[issue9250] sys.modules changes size during iteration in regrtest module

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage:  - committed/rejected
status: pending - closed

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



[issue1299] distutils.sysconfig is not cross-platform compatible

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Is this still relevant for the new sysconfig module? Tests would be a valuable 
addition.

--
components: +Library (Lib) -Build, Distutils
nosy: +eric.araujo
type: compile error - behavior
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue1299] distutils.sysconfig is not cross-platform compatible

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
versions:  -Python 3.1

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



[issue3992] remove custom log module from distutils2

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Status update:

- site does not depend on distutils anymore in 2.7 and 3.2, now that 
distutils.sysconfig has been move to sysconfig.

- distutils is frozen, so it won’t get a refactor.

- Tarek is nearly done removing log in distutils2. Command.warn can also just 
use logging.warn to make things consistent.

--
components: +Distutils2 -Distutils
title: removed custom log from distutils - remove custom log module from 
distutils2
versions: +Python 2.5, Python 2.6, Python 3.2

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Here is a new test for flock. HAVE_FLOCK is defined if we can link a C 
application calling flock, or if flock is defined in libbsd.
FLOCK_NEEDS_LIBBSD is also defined in the second case.

AC_MSG_CHECKING(for flock)
have_flock=no
AC_TRY_LINK([
#include confdefs.h 
#include sys/file.h
], [void* p = flock; flock(0, 0)],
  [AC_CHECK_LIB(bsd,flock, [
AC_DEFINE(FLOCK_NEEDS_LIBBSD, 1, Define if flock needs to be linked with 
bsd library.)
have_flock=yes
])],
  [have_flock=yes]
)
if test $have_flock = yes ; then
  AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
fi
AC_MSG_RESULT($have_flock)

I think that this new test would also cover your case with a broken AIX libbsd? 
[I haven't actually tried to compile it yet, if the behavior is OK I will test 
it in both autoconf formats and provide some new patches tomorrow]

--

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



[issue9788] atexit and execution order

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

It seems to me that atexit is simple by design: It registers callables that do 
one thing, period. If you have dependencies in your cleanup code, you should 
write a function doing the Right Thing™ and register that. This keeps the 
implementation simple, otherwise we’d have to debate LIFO vs. FIFO, adding an 
argument to register vs. exposing the list of callables, etc.

If you agree, I could make a patch to make the docs more explicit about 
atexit’s simplicity and lack of guarantee about run order.

--

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Antoine Pitrou

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

I've just merged Sébastien's patches in r84584 (3.x), r84585 (2.7) and r84586 
(3.1). If you'd like to improve the fixes (as per your latest message), please 
say so, otherwise I'll close the issue.

(and thanks for your contributions!)

--
resolution:  - fixed
status: open - pending
versions:  -Python 2.6, Python 3.3

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



[issue9410] Add Unladen Swallow's optimizations to Python 3's pickle.

2010-09-07 Thread Antoine Pitrou

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

For the record, here are the unladen swallow benchmark results against stock 
py3k:

### pickle ###
Min: 1.644222 - 0.812691: 2.0232x faster
Avg: 1.652311 - 0.814994: 2.0274x faster
Significant (t=297.660908)
Stddev: 0.00594 - 0.00207: 2.8732x smaller

### unpickle ###
Min: 2.802217 - 0.751013: 3.7312x faster
Avg: 2.807074 - 0.752646: 3.7296x faster
Significant (t=980.311525)
Stddev: 0.00446 - 0.00145: 3.0831x smaller

### pickle_dict ###
Min: 0.744259 - 0.543992: 1.3681x faster
Avg: 0.747806 - 0.545883: 1.3699x faster
Significant (t=114.070170)
Stddev: 0.00266 - 0.00293: 1.1014x larger

### pickle_list ###
Min: 2.058899 - 1.212566: 1.6980x faster
Avg: 2.066486 - 1.216711: 1.6984x faster
Significant (t=269.964154)
Stddev: 0.00534 - 0.00459: 1.1635x smaller

### unpickle_list ###
Min: 1.458531 - 0.313154: 4.6576x faster
Avg: 1.464023 - 0.319126: 4.5876x faster
Significant (t=425.745063)
Stddev: 0.00476 - 0.00367: 1.2976x smaller

--

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



[issue1053365] nntplib: add support for NNTP over SSL

2010-09-07 Thread Antoine Pitrou

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

The patch in #1926 is more modern and up-to-date, closing as duplicate.

--
nosy: +pitrou
resolution:  - duplicate
stage: unit test needed - 
status: open - closed
superseder:  - NNTPS support in nntplib

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



[issue8324] add a distutils test command

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Implemented by Konrad and merged into the main repo.

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

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



[issue1926] NNTPS support in nntplib

2010-09-07 Thread Antoine Pitrou

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

The patch might need a little reworking to make it work under 3.x, although 
probably not much.
It should also, IMHO, take an instance of the new SSLContext class (*) as a 
parameter, rather than the keyfile and certfile args.

(*) http://docs.python.org/dev/library/ssl.html#ssl-contexts

--
assignee: janssen - 
nosy: +giampaolo.rodola
stage: unit test needed - patch review
versions:  -Python 2.7

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



[issue8312] Add post/pre hooks for distutils commands

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Hooks implemented for any command by Konrad and merged into the main repo.

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

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



[issue9664] Make gzip module not require that underlying file object support seek

2010-09-07 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

It is possible that only a fixed-size buffer is needed. If so, use of an 
alternate read mechanism could be conditioned on the underlying file(like) 
object not having seek.

It is also possible to direct a stream to a temporary file, but I think having 
the user do so explicitly is better so there are no surprises and so that the 
user has file reference for any further work.

Or their could be a context manager class for creating temp files from streams 
(or urls specifically) and deleting when done. One could then write

with TempStreamFile(urlopen('xxx') as f:
  for line in Gzipfile(fileobj=f):

--

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-07 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I hope the trivial 2-byte fix does not get lost in the general issue.

--

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



[issue9080] Provide list prepend method (even though it's not efficient)

2010-09-07 Thread sorin

sorin sorin.sbar...@gmail.com added the comment:

+1 for adding it because it will make the code easier to read/understand.
Bad performance could be documented and it's related about internal 
representation.

--
nosy: +sorin

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



[issue7894] too aggressive dependency tracking in distutils

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I understand this is not a bug but a nicety/performance issue, so I’m 
reassigning to distutils2.

--
components:  -Distutils
nosy: +eric.araujo
versions: +Python 2.5, Python 2.6, Python 3.1

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



[issue8933] Invalid detection of metadata version

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +alexis

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



[issue5411] add xz compression support to distutils

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

FTR, the distutils2 repo is http://bitbucket.org/tarek/distutils2. 
distutils2.tests.support contains helper to create temp directories and run 
commands; see docstrings and example uses in the tests for more info.

--

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



[issue4673] Distutils should provide an uninstall command

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Status update: Josip implemented PEP 376 to provide the installation database 
and Alexis is working on distutils2.install_tools to provide an uninstall 
function. User-level tools like pip can reuse this code to provide an uninstall 
functionality.

--
nosy: +alexis, eric.araujo

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



[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Given this explanation, of course I am +1 on an explicit release() method.  But 
I'm still skeptical that a context manager adds much (not sure if that counts 
as -0 or +0 :-).

I suppose after release() is called all accesses through the memoryview object 
should be invalid, right?  Is this not covered by PEP 3118 at all?

--
nosy: +gvanrossum

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



[issue7894] too aggressive dependency tracking in distutils

2010-09-07 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy:  -terry.reedy

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



[issue8680] Add a sandbox in Distutils2

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I talked a bit about that with haypo. A strong sandbox would have to intercept 
a number of C and Python calls to catch everything. The sandbox module in 
setuptools/distribute does that in 250 lines. I’m not sure it catches C code 
run from extension modules being built, but we could test that with haypo’s 
pysandbox.

--
nosy: +haypo

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



[issue5243] Missing dependency in distutils build

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
components: +Distutils
nosy: +eric.araujo
versions:  -Python 2.5, Python 2.6, Python 3.0, Python 3.3

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



[issue5243] Missing dependency in distutils build

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Adding back distutils1. This is a bug, not a feature.

--

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



[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Antoine Pitrou

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

 Given this explanation, of course I am +1 on an explicit release()
 method.  But I'm still skeptical that a context manager adds much (not
 sure if that counts as -0 or +0 :-).

Ok, release() is probably enough.

 I suppose after release() is called all accesses through the
 memoryview object should be invalid, right?

Indeed. The patch tests for that (it uses with to release the
memoryview, but it wouldn't be hard to change it for a release()
method).

 Is this not covered by PEP 3118 at all?

The PEP says “this memory view object holds on to the memory of base
[i.e. the object the buffer was acquired from] until it is deleted”.
Apparently issues pertaining to delayed garbage collection weren't
raised at the time.

--

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



[issue9080] Provide list prepend method (even though it's not efficient)

2010-09-07 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Sorry, this needs to stay closed.
It has no chance.

--
nosy: +rhettinger

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-09-07 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The patch changes the internal function that constructs the dict mapping b 
items to indexes to read as follows:
  create b2j mapping
  if isjunk function, move junk items to junk set
  if autojunk, move popular items to popular set

I helped write and test the 2.7 patch and verify that default behavior remains 
unchanged. I believe it is ready to commit.

3.1 and 3.2 patches will follow.

--
stage: unit test needed - commit review

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



[issue9758] ioctl mutable buffer copying problem

2010-09-07 Thread Antoine Pitrou

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

Actually, writing a test ended up quite easy (by re-using an existing test in 
test_ioctl and simply enlarging its buffer). I've committed an updated patch in 
r84589 (3.x), r84590 (3.1) and r84591 (2.7).
Thank you!

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 2.7, Python 3.1

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



[issue3402] test_nis is hanging on Solaris

2010-09-07 Thread Antoine Pitrou

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


--
nosy: +loewis
versions: +Python 3.1, Python 3.2 -Python 3.0

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Michael Haubenwallner

Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:

Sorry to be pedantic - but it looks like (don't have a build environment at 
hand at the moment) it will fail to build as 64bit on the not-so-up-to-date AIX 
with missing 64bit flock implementation:
There, the compile-check will succeed and define HAVE_FLOCK, but the link-check 
will fail - which really should reset have_flock to 'no'.
IMO, HAVE_FLOCK should be defined when _both_ checks succeed only, not upon the 
compile-check only as it is done now.
Thank you!

--
status: pending - open

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



[issue9788] atexit and execution order

2010-09-07 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

I don't think the order should be defined.

--
nosy: +benjamin.peterson

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



[issue9788] atexit and execution order

2010-09-07 Thread Giampaolo Rodola'

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

Ok, I'll shut up then. =)

 If you agree, I could make a patch to make the docs more explicit about 
 atexit’s simplicity and lack of guarantee about run order.

Sure, go ahead.

--

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



[issue9791] nntplib.py lacks a test suite

2010-09-07 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

A very simple test suite which tests at least basic features and methods should 
be written.
test_ftplib.py and test_smtplib.py can be taken as an example.
Assigning this to me as a reminder.

--
assignee: giampaolo.rodola
components: Tests
messages: 115792
nosy: giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: nntplib.py lacks a test suite
versions: Python 3.2

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



[issue1926] NNTPS support in nntplib

2010-09-07 Thread Giampaolo Rodola'

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

Unfortunately nntplib lacks a test suite.
I created #9791 to address this issue.

--

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



[issue9360] nntplib cleanup

2010-09-07 Thread Antoine Pitrou

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

Note that according to RFC 3977, “The character set for all NNTP commands is 
UTF-8”.

But it also says this about multi-line data blocks:

   Note that texts using an encoding (such as UTF-16 or UTF-32) that may
   contain the octets NUL, LF, or CR other than a CRLF pair cannot be
   reliably conveyed in the above format (that is, they violate the MUST
   requirement above).  However, except when stated otherwise, this
   specification does not require the content to be UTF-8, and therefore
   (subject to that same requirement) it MAY include octets above and
   below 128 mixed arbitrarily.

IMO, it should decode/encode by default using utf-8 (with the surrogateescape 
error handler for easy round-tripping with non-compliant servers), except for 
raw articles (bodies / envelopes) where bytes should be returned.

--
nosy: +pitrou

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



[issue9791] nntplib.py lacks a test suite

2010-09-07 Thread Antoine Pitrou

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

Actually, I just noticed there's some beginnings of a test file in #9360.

--

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Antoine Pitrou

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

 Sorry to be pedantic - but it looks like (don't have a build
 environment at hand at the moment) it will fail to build as 64bit on
 the not-so-up-to-date AIX with missing 64bit flock implementation:
 There, the compile-check will succeed and define HAVE_FLOCK, but the
 link-check will fail - which really should reset have_flock to 'no'.
 IMO, HAVE_FLOCK should be defined when _both_ checks succeed only, not
 upon the compile-check only as it is done now.

It might be better indeed. Patches against the current SVN branches are
welcome (I don't have an AIX system to test them on, and besides I'm not
an autoconf expert).

--

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



[issue6394] getppid support in os module on Windows

2010-09-07 Thread Jon Anglin

Jon Anglin jang...@fortresgrand.com added the comment:

Here is a unit test for os.getppid on Windows.  The test_os.diff file is the 
diff of the Lib/test/test.os.py file from the py3k svn branch.

--
Added file: http://bugs.python.org/file18784/test_os.diff

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



[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou

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

When you call socket.create_connection() and it fails because it hits the 
socket timeout, the socket.timeout error is recast as a generic socket.error, 
which makes analyzing the failure more difficult (also, it means the errno 
attribute is lost for other types of errors):

 socket.setdefaulttimeout(0.01)
 s = socket.socket()
 s.connect((www.yahoo.fr, 80))
Traceback (most recent call last):
  File stdin, line 1, in module
socket.timeout: timed out
 socket.create_connection((www.yahoo.fr, 80))
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/__svn__/Lib/socket.py, line 319, in 
create_connection
raise err
socket.error: timed out

--
components: Library (Lib)
messages: 115798
nosy: exarkun, facundobatista, giampaolo.rodola, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: create_connection() recasts timeout errors
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

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



[issue6394] getppid support in os module on Windows

2010-09-07 Thread Jon Anglin

Jon Anglin jang...@fortresgrand.com added the comment:

I have uploaded a new diff file (from the py3k svn trunk) that has all of the 
changes in Doc/library/os.rst, Modules/posixmodule.c, and Lib/test/test_os.py.  
It is called 6394.diff. Let me know if I can do anything else to make this 
happen.

--
Added file: http://bugs.python.org/file18785/6394.diff

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



[issue9779] argparse.ArgumentParser not support unicode in print help

2010-09-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +bethard

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



[issue9793] Typo fix in What's New for 3.2: dynmaic - dynamic

2010-09-07 Thread Dag Odenhall

New submission from Dag Odenhall dag.odenh...@gmail.com:

Spotted a typo reading the What's New for 3.2a2 and thought I should give 
contributing a fix a try. Please excuse me if I failed to follow some 
procedure; this is my first contribution to the core source tree.

--
assignee: d...@python
components: Documentation
files: dynmaic.patch
keywords: patch
messages: 115800
nosy: dag.odenhall, d...@python
priority: normal
severity: normal
status: open
title: Typo fix in What's New for 3.2: dynmaic - dynamic
versions: Python 3.2
Added file: http://bugs.python.org/file18786/dynmaic.patch

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Michael Haubenwallner

Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:

Using this patch based on current py3k branch I've been able now to build the 
fcntl module for 32bit aix5.3 (with flock) and 64bit aix5.3 (without flock), 
both using an old gcc-3.3.6, as well as for 64bit linux.
If necessary, I should be able to create a similar patch for the other branches 
tomorrow.

--
Added file: http://bugs.python.org/file18787/flock-check-py3k.patch

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



[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Giampaolo Rodola'

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

On Ubuntu 10.04:

giampa...@ubuntu:~/svn/python-3.2$ ./python 
Python 3.2a1+ (py3k:84457, Sep  3 2010, 20:18:38) 
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
 import socket
 import socket
 socket.setdefaulttimeout(0.01)
 s = socket.socket()
 s.connect((www.yahoo.fr, 80))
Traceback (most recent call last):
  File stdin, line 1, in module
socket.timeout: timed out


--

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



[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I'm currently working on it.  I'll certainly commit it shortly with a few 
changes:
- no need to say that a function fails with WindowsError, at least in the 
docstring.
- return error sooner to reduce indentation.
- in tests, use subprocess instead of multiprocessing.
- other minor formatting nits.

--

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



[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou

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

Here is a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file18788/createconn.patch

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

I inverted the actions in the test I proposed in msg115768 (quick note from 
home, should have tested at work before posting). It should be:

AC_MSG_CHECKING(for flock)
have_flock=no
AC_TRY_LINK([
#include confdefs.h 
#include sys/file.h
], [void* p = flock; flock(0, 0)],
  [have_flock=yes],
  [AC_CHECK_LIB(bsd,flock, [
AC_DEFINE(FLOCK_NEEDS_LIBBSD, 1, Define if flock needs to be linked with 
bsd library.)
have_flock=yes
])]
)
if test $have_flock = yes ; then
  AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
fi
AC_MSG_RESULT($have_flock)

Mickael, does that new test works for you? I am not sure I follow your 
explanation: there is no more 'compile-check' (AC_TRY_COMPILE) in the new test 
I provided; just a 'link-check' (AC_TRY_LINK - which tests that compilation and 
link did work).
HAVE_FLOCK is undefined by default.
If the link-check succeeds, then HAVE_FLOCK is defined.
If it fails, then we try to look for flock in libbsd; if that test works, then 
HAVE_FLOCK is defined as well as FLOCK_NEEDS_LIBBSD.

In the case of broken AIX 64 bits, the link-check will fail (no flock in 
default C libraries); then the test to find flock in libbsd will also fail (no 
64 bits objets in libbsd). So HAVE_FLOCK will be undefined, which is what you 
expect.

m4/autoconf is quite unintuitive so I may have made a mistake, or it may be 
easily misunderstood. But I intend my test to define HAVE_FLOCK only if 
compilation _and_ linking works, like you expect.

--

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



[issue9509] argparse FileType raises ugly exception for missing file

2010-09-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +bethard

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



[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou

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

Patch committed in r84598. Needs backporting to 3.1 and 2.7.

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

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



[issue8574] transient_internet() (test_support): use socket.setdefaulttimeout() and test_robotparser failure

2010-09-07 Thread Antoine Pitrou

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

Improved again and committed in r84597 and r84599. Needs backporting.

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

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



[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Committed r84601. Thanks for the patch and your perseverance!

--

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



[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


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

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



[issue8574] transient_internet() (test_support): use socket.setdefaulttimeout() and test_robotparser failure

2010-09-07 Thread Antoine Pitrou

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


--
status: pending - closed

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



[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou

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


--
status: pending - closed

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



[issue9793] Typo fix in What's New for 3.2: dynmaic - dynamic

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Fixed in r84602, thanks.

Note that for such small things, you don’t have to make a patch, it’s actually 
faster to just open the file at the right line and fix it than download and 
apply a patch. You can also send an email to d...@python.org instead of opening 
a bug, whatever is easier for you.

--
nosy: +eric.araujo

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



[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

 Is this not covered by PEP 3118 at all?

 The PEP says “this memory view object holds on to the memory of base
 [i.e. the object the buffer was acquired from] until it is deleted”.
 Apparently issues pertaining to delayed garbage collection weren't
 raised at the time.

As with a few(!) other things in relation to this PEP, the primary
consumers were most interested in the C API side of things, so we
collectively missed relevant details on the Python side.

+1 on adding release() (obviously), and +1 on direct support for
context management (it seems very analogous to file.close to me, so
direct support makes more sense than leaving it out).

--

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



[issue9707] Reworked threading.local reference implementation

2010-09-07 Thread Antoine Pitrou

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

Committed in r84607.

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

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



[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

Patch in attachment adds a context manager to socket.socket class so that  
socket.create_connection() can be used with with statement.

--
components: Library (Lib)
files: socket_ctx_mgr.patch
keywords: patch
messages: 115812
nosy: amaury.forgeotdarc, giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: socket.create_connection context manager
versions: Python 3.2
Added file: http://bugs.python.org/file18789/socket_ctx_mgr.patch

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



[issue1718574] build_clib --build-clib/--build-temp option bugs

2010-09-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

The bug has been present since the addition of those options in 2000. It is now 
fixed in py3k (r84608), 3.1 (r84609), 2.7 (r84610) and distutils2 
(374a277616d8). Thanks!

--
resolution: accepted - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.1, Python 3.2

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



[issue9794] socket.create_connection context manager

2010-09-07 Thread Antoine Pitrou

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

You don't need to use socketserver. Take a look at how the other tests in 
test_socket are written. Inheriting from ThreadedTCPSocketTest should be easy.

--

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



[issue9793] Typo fix in What's New for 3.2: dynmaic - dynamic

2010-09-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


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

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



[issue9795] nntplib.NNTP should support the context protocol

2010-09-07 Thread Antoine Pitrou

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

As the title says. __exit__() simply has to call self.quit(), AFAICT.

--
components: Library (Lib)
messages: 115815
nosy: pitrou
priority: normal
severity: normal
status: open
title: nntplib.NNTP should support the context protocol
type: feature request
versions: Python 3.2

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



[issue9795] nntplib.NNTP should support the context protocol

2010-09-07 Thread Antoine Pitrou

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


--
nosy: +giampaolo.rodola

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



[issue8518] small typo in http://docs.python.org/howto/doanddont.html

2010-09-07 Thread R. David Murray

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

I've included my take on this in my proposed patch for issue 9608.

--
stage:  - committed/rejected
superseder:  - Re-phrase best way of using exceptions in doanddont.rst
type:  - behavior

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



[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'

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

It wasn't easy but here it is. =)
I'll submit a patch which updates the doc tomorrow.

--
Added file: http://bugs.python.org/file18790/socket_ctx_mgr.patch

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



[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'

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


--
assignee:  - giampaolo.rodola

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



[issue9795] nntplib.NNTP should support the context protocol

2010-09-07 Thread Giampaolo Rodola'

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

Assigning this to me.
Hopefully this should go into the plan of adding a context manager to all 
network libs (ftplib, smptlib, imaplib, etc..) in time for Python 3.2.

--
assignee:  - giampaolo.rodola

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



[issue9608] Re-phrase best way of using exceptions in doanddont.rst

2010-09-07 Thread R. David Murray

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

Here is a more extensive rewrite that I think makes things clearer and (I hope) 
makes the text read better.  I also updated the preceding section per the 
confusion expressed in issue 8518.

Note that this patch is somewhat Python3 specific, since it assumes that all 
non-BaseException exceptions inherit from Exception.  If someone wants to 
backport it to 2.7 a paragraph or footnote should be added about that problem.

Opinions welcome.

--
nosy: +r.david.murray
Added file: http://bugs.python.org/file18791/doanddont-except.patch

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



[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-09-07 Thread STINNER Victor

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

 PyUnicode_FromFormat(%s, text) expects a utf-8 buffer.

Really? I don't see how *s++ = *f; (where s is Py_UNICODE* and f is char*) 
can decode utf-8. It looks more like ISO-8859-1.

 Very recently (r84472, r84485), some C files of CPython source code
 were converted to utf-8

Python source code (C and Python) is written in ASCII except maybe some headers 
or some tests written in Python with #coding:xxx header (or without the header, 
but in utf-8, for Python3). I don't think that a C file calls PyErr_Format() or 
PyUnicode_FromFormat(V)() with a non-ascii format string.

--

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



[issue9632] Remove sys.setfilesystemencoding()

2010-09-07 Thread STINNER Victor

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

About embedded Python interpreters or py2exe-style applications: do you mean 
that the application calls a C function to set the encoding before starting the 
interpreter? Or you mean the Python function, sys.setfilesystemencoding()?

I would like to remove the Python function just because it doesn't work (it 
doesn't reencode filenames from all Python objects). But we might keep the C 
function if you really want to :-)

--

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



  1   2   >