[issue18468] re.group() should never return a bytearray

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with an implementation and tests. Feel free to add a documentation changes if needed. -- stage: needs patch -> patch review ___ Python tracker __

[issue18667] missing HAVE_FCHOWNAT

2013-08-06 Thread salinger
Changes by salinger : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mai

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 80e9cb6163b4 by Serhiy Storchaka in branch 'default': Issue #14323: Expanded the number of digits in the coefficients for the http://hg.python.org/cpython/rev/80e9cb6163b4 -- nosy: +python-dev ___ Python

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch can be a little simplified (the "else" keyword is redundant), but in general it LGTM. Let's push. -- ___ Python tracker ___ ___

[issue16968] Fix test discovery for test_concurrent_futures.py

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as I understand threads reaping needed only when ThreadPoolExecutor is used and children reaping needed only when ProcessPoolExecutor is used. Why not use them only in tests which needs them? class ThreadPoolMixin(ExecutorMixin): executor_type = f

[issue18430] gzip, bz2, lzma: peek advances file position of existing file object

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue18528] Possible fd leak in socketmodule

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let's push. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It should be a classmethod. >>> import itertools >>> class C(itertools.chain): pass ... >>> type(C.from_iterable(['ab', 'cd'])) The patch LGTM. -- assignee: docs@python -> serhiy.storchaka stage: -> commit review _

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue14507] Segfault with deeply nested starmap calls

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue11126] Wave.py does not always write proper length in header

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Ethan Furman
Ethan Furman added the comment: Hopefully the final patch. :) -- Added file: http://bugs.python.org/file31172/issue18264.stoneleaf.04.patch ___ Python tracker ___ __

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is not JSON issue. If you need escaping of some domain-specific characters, do it youself. I.e. json.dump(...).replace('\u2028', r'\u2028').replace('\u2029', r'\u2029').replace(' invalid status: open -> pending _

[issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self')

2013-08-06 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-b

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Ethan Furman
Ethan Furman added the comment: Forgot to back out core dump tests before creating previous patch. This one even passes the tests. :/ -- Added file: http://bugs.python.org/file31173/issue18264.stoneleaf.05.patch ___ Python tracker

[issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API

2013-08-06 Thread Mark Dickinson
Mark Dickinson added the comment: #15966 is related. I suggest closing this issue as "won't fix", too. -- nosy: +mark.dickinson ___ Python tracker ___ __

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM now. Make sure to run the test(s) in refleak mode and let's wait for a couple of days before committing, in case someone else has comments. -- ___ Python tracker _

[issue1772673] Replacing char* with const char*

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue18668] Properly document setting m_size in PyModuleDef

2013-08-06 Thread Eli Bendersky
New submission from Eli Bendersky: docs.python.org/dev/c-api/module.html Currently doesn't say much about m_size, except that setting it to -1 means "no memory needed". m_size == -1 has a much more important use that is not documented: it signals the import machinery that the module should not

[issue18668] Properly document setting m_size in PyModuleDef

2013-08-06 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self')

2013-08-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: wont fix -> duplicate superseder: -> **kwargs unnecessarily restricted in concurrent.futures 'submit' API ___ Python tracker ___

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Ethan Furman
Ethan Furman added the comment: I'll plan on committing no sooner than Friday unless somebody else has comments/corrections. Thanks, Eli. -- ___ Python tracker ___

[issue18662] re.escape should not escape the hyphen

2013-08-06 Thread James Laver
James Laver added the comment: I looked up quotemeta with perldoc and you're right, it will quote the hyphen. Given that python's regex engine correctly deals with unnecessarily quoted characters, I suppose this is fine. -- resolution: -> wont fix status: open -> closed _

[issue18532] hashlib.HASH objects should officially expose the hash name

2013-08-06 Thread Christian Heimes
Christian Heimes added the comment: I added some tests in 5fbf23e947d8 and found a bug in the _sha1 module, too. -- status: open -> closed ___ Python tracker ___

[issue18606] Add statistics module to standard library

2013-08-06 Thread Oscar Benjamin
Changes by Oscar Benjamin : -- nosy: +oscarbenjamin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 719ee60fc5e2 by Serhiy Storchaka in branch '2.7': Issue #15866: The xmlcharrefreplace error handler no more produces two XML http://hg.python.org/cpython/rev/719ee60fc5e2 -- nosy: +python-dev ___ Python t

[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5859a3ec5b7e by Christian Heimes in branch '3.3': Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc() fails. http://hg.python.org/cpython/rev/5859a3ec5b7e New changeset 6dbc4d6ff31e by Christian Heimes in branch 'default': Issue

[issue18668] Properly document setting m_size in PyModuleDef

2013-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: Here's a documentation patch generated for 3.3 -- keywords: +patch Added file: http://bugs.python.org/file31174/issue18668.doc.1.patch ___ Python tracker ___

[issue18668] Properly document setting m_size in PyModuleDef

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me, thanks. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails

2013-08-06 Thread Christian Heimes
Christian Heimes added the comment: Serhiy: Thanks for the review Kristján: Yes, it's enough to check for incr > INT_MAX. The buffer size is incremented to a value of <= (2*n)+2 in each round. The start value is 100. The loop is terminated once the buffer size reaches INT_MAX-2. -- re

[issue16038] ftplib: unlimited readline() from connection

2013-08-06 Thread Christian Heimes
Christian Heimes added the comment: The patches are languishing in the bug tracker for a while... Benjamin: I like to apply them to 3.3 and default before the next release of 3.3. Do you want to have the fixes in 2.7, too? -- ___ Python tracker

[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2013-08-06 Thread productivememberofsociety666
New submission from productivememberofsociety666: According to docs.python.org/2/library/curses.html#chgat (or any other version), curses.chgat() is not supposed to move the cursor at all. This is true if you don't give it x,y coordinates, but if you do, the cursor does in fact move to those c

[issue18647] re.error: nothing to repeat

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Originally the catch condition was (lo == 0). It was changed in changeset 41c42b1bd582. > Offhand, do you have an example that displays bad behavior in 2.7? I'm > curious because I didn't find one after half an hour of trying. re.match('(?:.?.?)*y', 'x'*20

[issue16741] `int()`, `float()`, etc think python strings are null-terminated

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Ethan Furman
Ethan Furman added the comment: > Eli Bendersky added the comment: > > Make sure to run the test(s) in refleak mode . . . How extensive should testing be? I plan on always running the refleak mode tests (now that I know how ;) . Should I also run non-refleak tests? Should I run tests with a p

[issue18416] Move to absolute file paths for module.__file__

2013-08-06 Thread Brett Cannon
Brett Cannon added the comment: I actually meant FileFinder but PathFinder is a good point. In FileFinder you need to change ``self.path = path or '.'`` to use the cwd. -- ___ Python tracker __

[issue18670] Using read_mime_types function from mimetypes module gives resource warning

2013-08-06 Thread Vajrasky Kok
New submission from Vajrasky Kok: [sky@localhost cpython]$ cat /tmp/a.txt x-application/mimea mimea application/mimeb mimeb [sky@localhost cpython]$ cat /tmp/a.py import warnings warnings.simplefilter('default') import mimetypes mimetypes.read_mime_types('/tmp/a.txt') [sky@localhost cpython]$ py

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: IMHO it's very much dependent on the change. When making C code changes, I usually run the relevant tests with refleaks, and then run the whole test suite; all of this --with-pydebug. Personally I've not encountered cases where non-debug builds failed where deb

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: > I plan on always running the refleak mode tests (now that I know how ;) FWIW `make patchcheck` should remind you about that. -- stage: -> patch review type: -> enhancement ___ Python tracker

[issue18662] re.escape should not escape the hyphen

2013-08-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue18671] enhance formatting in logging package

2013-08-06 Thread M. Dietrich
New submission from M. Dietrich: in logging/__init__.py line 328 there is a simple line: msg = msg % self.args if that line fails this failure will be logged, not the line itself. i suggest to change the line to something like: try: msg = msg % self.args except TypeError: msg = '

[issue18416] Move to absolute file paths for module.__file__

2013-08-06 Thread Madison May
Madison May added the comment: A few days ago I tried the change: ``self.path = path or _os.cwd()``, but the problem didn't seem to resolve itself. ``./python -c "import blah; print(blah.__file__)`` still returned a relative path on my system. The tie between FileFinder and the __file__ attr

[issue18672] Fix format specifiers for debug output in _sre.c

2013-08-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: When the VERBOSE macro name is defined in _sre.c the TRACE macro prints regex processing trace. It use the %d format specifier for Py_ssize_t values. This can crash on 64-bit. Proposed patch fixes format strings. -- components: Regular Expressions

[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2013-08-06 Thread Igor Skochinsky
Igor Skochinsky added the comment: Just had this issue when using networkx (which imports uuid). One keyword that would help visibility is R6034 (the runtime error number). A couple of reports related to this: https://projects.blender.org/tracker/index.php?func=detail&aid=27666 http://forums.b

[issue18662] re.escape should not escape the hyphen

2013-08-06 Thread Matthew Barnett
Matthew Barnett added the comment: I can think of a real disadvantage with the current behaviour: it messes up Unicode graphemes. For example: >>> print('हिन्दी') हिन्दी >>> print(re.escape('हिन्दी')) \ह\ि\न\्\द\ी Of course, that's only a problem if you need to print it out or write it to a

[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2013-08-06 Thread productivememberofsociety666
Changes by productivememberofsociety666 : Removed file: http://bugs.python.org/file31175/chgat-bug.py ___ Python tracker ___ ___ Python-bugs-

[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2013-08-06 Thread productivememberofsociety666
Changes by productivememberofsociety666 : Added file: http://bugs.python.org/file31178/chgat-bug.py ___ Python tracker ___ ___ Python-bugs-li

[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: 0xed is the start byte of a 3 bytes sequence (i.e. a BMP char), and it should be followed by two continuation bytes. For some reason the traceback you pasted is missing the last part, that might provide some insight. It could be one of these: >>> b'\xed'.decode

[issue18443] Misc/Readme still documents TextMate

2013-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: docs@python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18443] Misc/Readme still documents TextMate

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c74755e8f04 by Ezio Melotti in branch 'default': #18443: remove the TextMate entry now that the bundle has been removed and fix ordering. Patch by Févry Thibault. http://hg.python.org/cpython/rev/5c74755e8f04 -- nosy: +python-dev ___

[issue18671] enhance formatting in logging package

2013-08-06 Thread R. David Murray
Changes by R. David Murray : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2013-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue18647] re.error: nothing to repeat

2013-08-06 Thread Tim Peters
Tim Peters added the comment: Serhiy, yup, that regexp is slow, but it does finish - so the engine is doing something to avoid _unbounded_ repetitive matching of an empty string. Change it to (?:.?.+)*y and the group can no longer match an empty string, but it's still slow (although about 3x

[issue18673] Add and use O_TMPFILE for Linux 3.11

2013-08-06 Thread Christian Heimes
New submission from Christian Heimes: Linux 3.11 gets a new flag for open(): Quote from http://lwn.net/Articles/557314/ --- The new O_TMPFILE option to the open() and openat() system calls allows filesystems to optimize the creation of temporary files — files which need not be visible in the f

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a simplified patch tackling only the PEP 3121 compliance. Eli, I think this would be good to go. -- Added file: http://bugs.python.org/file31179/etree_3121.patch ___ Python tracker

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Antoine Pitrou
New submission from Antoine Pitrou: modules_by_index is a near-eternal store for extension modules. It is only collected at the end of interpreter shutdown, which is much too late for regular garbage collection. This patch proposes instead to store weak references in modules_by_index, so that

[issue18621] site.py keeps too much stuff alive when it patches builtins

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8584f63e570e by Antoine Pitrou in branch 'default': Issue #18621: Prevent the site module's patched builtins from keeping too many references alive for too long. http://hg.python.org/cpython/rev/8584f63e570e -- nosy: +python-dev __

[issue18621] site.py keeps too much stuff alive when it patches builtins

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I went ahead and committed this, so that the effect of other improvements in the area stand out better. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue18666] Unused variable in test_frame.py

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34e1ecb8edd2 by Antoine Pitrou in branch 'default': Issue #18666: improve test_frame a bit. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/34e1ecb8edd2 -- nosy: +python-dev ___ Python tracker

[issue18666] Unused variable in test_frame.py

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Good idea, thank you! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue18665] Typos in frame object related code

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89ce323357db by Antoine Pitrou in branch 'default': Issue #18665: fix typos. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/89ce323357db -- nosy: +python-dev ___ Python tracker

[issue18665] Typos in frame object related code

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you :) -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.3 ___ Python tracker

[issue8713] multiprocessing needs option to eschew fork() under Linux

2013-08-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file31181/d9fe9757ba0c.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18671] enhance formatting in logging package

2013-08-06 Thread Vinay Sajip
Vinay Sajip added the comment: In recent versions of Python, information *is* printed which allows pinpointing the source of the formatting error. Consider the following script, logex.py: import logging logger = logging.getLogger(__name__) def test(): logger.debug('The result is ', 'abc')

[issue18528] Possible fd leak in socketmodule

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't understand why we would call accept() more than once. Because of EINTR? -- ___ Python tracker ___ ___

[issue18673] Add and use O_TMPFILE for Linux 3.11

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > - use O_TEMPFILE in tempfile module when it's supported by the current > kernel I assume this would only be done in TemporaryFile()? -- components: -Extension Modules keywords: +easy nosy: +pitrou ___ Python trac

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: On the one hand, supporting JSONP is a valid request for the json module. On the other hand, according to Wikipedia, "There have been some criticisms raised about JSONP. Cross-origin resource sharing (CORS) is a more recent method of getting data from a server

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-06 Thread Eli Bendersky
Eli Bendersky added the comment: Bless you Antoine, I've been just planning to do this myself to tackle the re-importing troubles I was having in tests the other day :-) I'll take a look at this soon, promise! -- ___ Python tracker

[issue18659] test_precision in test_format.py is not executed and has unused variable

2013-08-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Brett Cannon
Brett Cannon added the comment: Won't that change to PyState_FindModule() break code? And is it part of the stable ABI? -- ___ Python tracker ___ ___

[issue18667] missing HAVE_FCHOWNAT

2013-08-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Theoretically, people *should* already incref the result from PyState_FindModule. On the other hand, the object currently wouldn't be lost unless something else calls PyState_RemoveModule(), which is hardly every used AFAICT. The only saving grace is that PyS

[issue18667] missing HAVE_FCHOWNAT

2013-08-06 Thread Larry Hastings
Larry Hastings added the comment: Yup, that's a bug. My fault too. I think it should go in to the next 3.3 as well. I worry that this may be a similar situation to fchmodat--see the comment in Lib/os.py--but for now let's be brave and add HAVE_FCHOWNAT to have_functions as salinger suggests

[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Byte 0, not byte 1, is the start byte, and it should be F0, as in output below. However, I now see "invalid continuation byte'. In 2.7.5, # -*- coding: utf-8 -*- s = b'𐒢' # output same if uncomment following lines #s = u'𐒢'.encode('utf-8') # '𐒢' pasted in from

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Brett Cannon
Brett Cannon added the comment: Sounds like it needs to be changed with a notice in What's New. -- ___ Python tracker ___ ___ Python-b

[issue18416] Move to absolute file paths for module.__file__

2013-08-06 Thread Nick Coghlan
Nick Coghlan added the comment: Make sure to run "make" to rebuild the frozen module - editing importlib._bootstrap.py involves a C style "edit, build, test" cycle rather than the typical Python "edit, test" cycle. -- ___ Python tracker

[issue16853] add a Selector to the select module

2013-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, the timeouts are a bad idea anyway. I've filed http://code.google.com/p/tulip/issues/detail?id=49 to remind us to do something about this. I'll review your tulip patch next. -- ___ Python tracker

[issue18671] enhance formatting in logging package

2013-08-06 Thread M. Dietrich
M. Dietrich added the comment: yes, seeing the erranous line where the wrong formatstring comes from is nice but sometimes (for myself: often) i need to know what actually was tried to be logged. this information is lost in both cases. this is especially sad if you have long-running processes

[issue18416] Move to absolute file paths for module.__file__

2013-08-06 Thread Madison May
Madison May added the comment: Thanks for the heads up, Nick. I've worked with _bootstrap.py before, so I'm familiar with the cycle. -- ___ Python tracker ___ _

[issue16853] add a Selector to the select module

2013-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: Actually there is a misunderstanding underlying you Tulip patch. Tulip needs to support Python 3.3 as well as Python 3.4, so it needs to do a little dance trying to import BaseSelector (or some other key class) from select and if that fails fall back to its

[issue16853] add a Selector to the select module

2013-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, replying to some direct questions in the bug: > I also made the following changes: > - BaseSelector is an abstract base class (so one could imagine user code > implementing its own selector on top of it) Fine (though I had to work around this for some

[issue18671] enhance formatting in logging package

2013-08-06 Thread Vinay Sajip
Vinay Sajip added the comment: The location of the error isn't lost - that's the important thing. If it's that important that you never lose the parameters of a logging call, then you could just double check the formatting for errors, or use a specialised message object, as described in the do

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Nick Coghlan
Nick Coghlan added the comment: It seems to me that the more appropriate change here would be to redefine PyState_FindModule as return a *new* ref rather than a borrowed ref and have it do the Py_INCREF before returning. Code using it would then need to add an appropriate Py_DECREF. A referenc

[issue18416] Move to absolute file paths for module.__file__

2013-08-06 Thread Nick Coghlan
Nick Coghlan added the comment: Figured it was worth mentioning, since I've been caught by forgetting that myself :) I suspect you're right that it's just a case of '.' passing the truth test, even though it still results in a relative path. -- ___ P