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

2010-09-07 Thread R. David Murray
R. David Murray 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 th

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

2010-09-07 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy nosy: +pitrou versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing

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

2010-09-07 Thread R. David Murray
R. David Murray added the comment: Note that issue 6074 may be relevant to your problem. -- nosy: +r.david.murray ___ Python tracker ___ _

[issue9788] atexit and execution order

2010-09-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : 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

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

2010-09-07 Thread desolat
Changes by desolat : -- nosy: +desolat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue9786] Native TLS support for pthreads

2010-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 ___

[issue9788] atexit and execution order

2010-09-07 Thread Skip Montanaro
Skip Montanaro 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 __

[issue9748] .inputrc magic-space breaks interactive mode

2010-09-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

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

2010-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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

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

2010-09-07 Thread R. David Murray
R. David Murray 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

[issue9788] atexit and execution order

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8772] sysconfig: _get_default_scheme can be made public?

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: I wonder if the scheme names could be made more consistent, removing the need for a function. -- ___ Python tracker ___ __

[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan
New submission from Nick Coghlan : 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 acc

[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan
Nick Coghlan 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. --

[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: See the context management patch at #9757. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue9788] atexit and execution order

2010-09-07 Thread Giampaolo Rodola'
Giampaolo Rodola' 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 _

[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan
Nick Coghlan 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

[issue919238] Recursive variable definition causes sysconfig infinite loop

2010-09-07 Thread Éric Araujo
Éric Araujo 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

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

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo stage: -> committed/rejected superseder: -> C++ compilation support for distutils ___ Python tracker ___ _

[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9789] Explicit buffer release for memoryview objects

2010-09-07 Thread Nick Coghlan
Changes by Nick Coghlan : -- superseder: -> Add context manager protocol to memoryviews ___ Python tracker ___ ___ Python-bugs-list ma

[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Nick Coghlan
Nick Coghlan 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 ar

[issue9786] Native TLS support for pthreads

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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 __

[issue9790] ntpath contains imports inside functions

2010-09-07 Thread Brian Curtin
New submission from Brian Curtin : 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 nos

[issue1222585] C++ compilation support for distutils

2010-09-07 Thread Éric Araujo
Éric Araujo 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 '” to give proper credit) --

[issue9787] Release the TLS lock during allocations

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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

[issue9788] atexit and execution order

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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

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

2010-09-07 Thread Éric Araujo
Éric Araujo 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:

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

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- stage: -> committed/rejected status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

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

2010-09-07 Thread Éric Araujo
Éric Araujo 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

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

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- versions: -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue3992] remove custom log module from distutils2

2010-09-07 Thread Éric Araujo
Éric Araujo 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

[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Sébastien Sablé
Sébastien Sablé 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 "confdef

[issue9788] atexit and execution order

2010-09-07 Thread Éric Araujo
Éric Araujo 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

[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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:

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

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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 ### un

[issue1053365] nntplib: add support for NNTP over SSL

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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 ___ Pytho

[issue8324] add a distutils test command

2010-09-07 Thread Éric Araujo
Éric Araujo 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 __

[issue1926] NNTPS support in nntplib

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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/lib

[issue8312] Add post/pre hooks for distutils commands

2010-09-07 Thread Éric Araujo
Éric Araujo 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

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

2010-09-07 Thread Terry J. Reedy
Terry J. Reedy 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 use

[issue9730] base64 docs refers to strings instead of bytes

2010-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I hope the trivial 2-byte fix does not get lost in the general issue. -- ___ Python tracker ___ ___

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

2010-09-07 Thread sorin
sorin 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

[issue7894] too aggressive dependency tracking in distutils

2010-09-07 Thread Éric Araujo
Éric Araujo 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

[issue8933] Invalid detection of metadata version

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +alexis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue5411] add xz compression support to distutils

2010-09-07 Thread Éric Araujo
Éric Araujo 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. -- _

[issue4673] Distutils should provide an uninstall command

2010-09-07 Thread Éric Araujo
Éric Araujo 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. -- nos

[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Guido van Rossum
Guido van Rossum 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 sh

[issue7894] too aggressive dependency tracking in distutils

2010-09-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue8680] Add a sandbox in Distutils2

2010-09-07 Thread Éric Araujo
Éric Araujo 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

[issue5243] Missing dependency in distutils build

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- components: +Distutils nosy: +eric.araujo versions: -Python 2.5, Python 2.6, Python 3.0, Python 3.3 ___ Python tracker ___ ___

[issue5243] Missing dependency in distutils build

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Adding back distutils1. This is a bug, not a feature. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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 acc

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

2010-09-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, this needs to stay closed. It has no chance. -- nosy: +rhettinger ___ Python tracker ___ _

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-09-07 Thread Terry J. Reedy
Terry J. Reedy 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

[issue9758] ioctl mutable buffer copying problem

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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: -> c

[issue3402] test_nis is hanging on Solaris

2010-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis versions: +Python 3.1, Python 3.2 -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list

[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Michael Haubenwallner
Michael Haubenwallner 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_FL

[issue9788] atexit and execution order

2010-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think the order should be defined. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue9788] atexit and execution order

2010-09-07 Thread Giampaolo Rodola'
Giampaolo Rodola' 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

[issue9791] nntplib.py lacks a test suite

2010-09-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : 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

[issue1926] NNTPS support in nntplib

2010-09-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Unfortunately nntplib lacks a test suite. I created #9791 to address this issue. -- ___ Python tracker ___ __

[issue9360] nntplib cleanup

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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

[issue9791] nntplib.py lacks a test suite

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, I just noticed there's some beginnings of a test file in #9360. -- ___ Python tracker ___

[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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_FLO

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Jon Anglin
Jon Anglin 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

[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Jon Anglin
Jon Anglin 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

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

2010-09-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

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

2010-09-07 Thread Dag Odenhall
New submission from Dag Odenhall : 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: Docu

[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Michael Haubenwallner
Michael Haubenwallner 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

[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Giampaolo Rodola'
Giampaolo Rodola' 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.setde

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 mul

[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file18788/createconn.patch ___ Python tracker ___ __

[issue4026] fcntl extension fails to build on AIX 6.1

2010-09-07 Thread Sébastien Sablé
Sébastien Sablé 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 ], [void* p = flock; flock(0, 0

[issue9509] argparse FileType raises ugly exception for missing file

2010-09-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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 __

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

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Committed r84601. Thanks for the patch and your perseverance! -- ___ Python tracker ___ ___ Py

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

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

2010-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue9792] create_connection() recasts timeout errors

2010-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2010-09-07 Thread Éric Araujo
Éric Araujo 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

[issue9757] Add context manager protocol to memoryviews

2010-09-07 Thread Nick Coghlan
Nick Coghlan 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

[issue9707] Reworked threading.local reference implementation

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r84607. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : 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.forgeot

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

2010-09-07 Thread Éric Araujo
Éric Araujo 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: o

[issue9794] socket.create_connection context manager

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou 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

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

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Pytho

[issue9795] nntplib.NNTP should support the context protocol

2010-09-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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 reque

[issue9795] nntplib.NNTP should support the context protocol

2010-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

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

2010-09-07 Thread R. David Murray
R. David Murray 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

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
Giampaolo Rodola' 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 ___

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- assignee: -> giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9795] nntplib.NNTP should support the context protocol

2010-09-07 Thread Giampaolo Rodola'
Giampaolo Rodola' 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

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

2010-09-07 Thread R. David Murray
R. David Murray 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 t

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

2010-09-07 Thread STINNER Victor
STINNER Victor 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 > we

[issue9632] Remove sys.setfilesystemencoding()

2010-09-07 Thread STINNER Victor
STINNER Victor 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 th

[issue9632] Remove sys.setfilesystemencoding()

2010-09-07 Thread STINNER Victor
STINNER Victor added the comment: "keep the C function" Hum, currently, Python3 only has a *private* function called _Py_SetFileSystemEncoding() which can only be called after _Py_InitializeEx() (because it relies on the codecs API). If you consider that there is a real use case, we should c

[issue9042] Gettext cache and classes

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Looks good. Another +1 from a core dev and I commit this. -- ___ Python tracker ___ ___ Python-bugs-lis

  1   2   >