[issue16245] Update html.entities.html5 dictionary and parseentities.py
Ezio Melotti added the comment: I run Tools/scripts/parse_html5_entities.py and it says that The current dictionary is updated.. We should check this again, and eventually close the issue, when 3.4 is released. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16245 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18665] Typos in frame object related code
Vajrasky Kok added the comment: Okay, attached the patch to fix the typo. -- keywords: +patch Added file: http://bugs.python.org/file31171/fix_typo_frame_object.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18562] Regex howto: revision pass
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Regular Expressions nosy: +mrabarnett type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18667] missing HAVE_FCHOWNAT
New submission from Petr.Salinger: During test on kfreebsd: test_chown_dir_fd (test.test_posix.PosixTester) ... skipped 'test needs dir_fd support in os.chown()' But all *AT syscalls are supported. It looks like posixmodule.c misses propagation of that fact. --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -12004,6 +12004,10 @@ HAVE_FCHOWN, #endif +#ifdef HAVE_FCHOWNAT +HAVE_FCHOWNAT, +#endif + #ifdef HAVE_FEXECVE HAVE_FEXECVE, #endif -- components: Extension Modules messages: 194529 nosy: Petr.Salinger priority: normal severity: normal status: open title: missing HAVE_FCHOWNAT versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18468] re.group() should never return a bytearray
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 rep...@bugs.python.org http://bugs.python.org/issue18468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18667] missing HAVE_FCHOWNAT
Changes by salinger petr.salin...@seznam.cz: -- nosy: +doko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14323] Normalize math precision in RGB/YIQ conversion
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 tracker rep...@bugs.python.org http://bugs.python.org/issue14323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14323] Normalize math precision in RGB/YIQ conversion
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails
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 rep...@bugs.python.org http://bugs.python.org/issue18368 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16968] Fix test discovery for test_concurrent_futures.py
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 = futures.ThreadPoolExecutor def run(self, result): key = test.support.threading_setup() try: return super().run(result) finally: test.support.threading_cleanup(*key) class ProcessPoolMixin(ExecutorMixin): executor_type = futures.ProcessPoolExecutor def run(self, result): try: return super().run(result) finally: test.support.reap_children() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16968 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18430] gzip, bz2, lzma: peek advances file position of existing file object
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18528] Possible fd leak in socketmodule
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15301] os.chown: OverflowError: Python int too large to convert to C long
Serhiy Storchaka added the comment: Let's push. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18301] In itertools.chain.from_iterable() there is no cls argument
Serhiy Storchaka added the comment: It should be a classmethod. import itertools class C(itertools.chain): pass ... type(C.from_iterable(['ab', 'cd'])) class '__main__.C' The patch LGTM. -- assignee: docs@python - serhiy.storchaka stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18301] In itertools.chain.from_iterable() there is no cls argument
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: serhiy.storchaka - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14507] Segfault with deeply nested starmap calls
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11126] Wave.py does not always write proper length in header
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11126 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
Ethan Furman added the comment: Hopefully the final patch. :) -- Added file: http://bugs.python.org/file31172/issue18264.stoneleaf.04.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18290] json encoder does not support JSONP/JavaScript safe escaping
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('/', r'\u003c\u002f') -- resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self')
Mark Dickinson added the comment: Closing this. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
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 rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API
Mark Dickinson added the comment: #15966 is related. I suggest closing this issue as won't fix, too. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
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 rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1772673] Replacing char* with const char*
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1772673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18668] Properly document setting m_size in PyModuleDef
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 be ever re-initialized. This has to be documented explicitly. -- assignee: eli.bendersky components: Documentation, Extension Modules messages: 194542 nosy: eli.bendersky, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Properly document setting m_size in PyModuleDef type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18668] Properly document setting m_size in PyModuleDef
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self')
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: wont fix - duplicate superseder: - **kwargs unnecessarily restricted in concurrent.futures 'submit' API ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
Ethan Furman added the comment: I'll plan on committing no sooner than Friday unless somebody else has comments/corrections. Thanks, Eli. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18662] re.escape should not escape the hyphen
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18532] hashlib.HASH objects should officially expose the hash name
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 rep...@bugs.python.org http://bugs.python.org/issue18532 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18606] Add statistics module to standard library
Changes by Oscar Benjamin oscar.j.benja...@gmail.com: -- nosy: +oscarbenjamin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18606 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs
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 tracker rep...@bugs.python.org http://bugs.python.org/issue15866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails
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 #18368: PyOS_StdioReadline() no longer leaks memory when realloc() fails. http://hg.python.org/cpython/rev/6dbc4d6ff31e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18368 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18668] Properly document setting m_size in PyModuleDef
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 rep...@bugs.python.org http://bugs.python.org/issue18668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18668] Properly document setting m_size in PyModuleDef
Antoine Pitrou added the comment: Looks good to me, thanks. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails
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. -- resolution: - fixed stage: patch review - committed/rejected status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18368 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16038] ftplib: unlimited readline() from connection
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 rep...@bugs.python.org http://bugs.python.org/issue16038 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18669] curses.chgat() moves cursor, documentation says it shouldn't
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 coordinates, since it then uses C curses's mvchgat() internally and doesn't correct the position afterwards. See included file for demonstration: Expected output is: one two Actual output is: two Fix the documentation or fix the code :-) -- assignee: docs@python components: Documentation, Extension Modules files: chgat-bug.py messages: 194552 nosy: docs@python, productivememberofsociety666 priority: normal severity: normal status: open title: curses.chgat() moves cursor, documentation says it shouldn't type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file31175/chgat-bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18647] re.error: nothing to repeat
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) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16741] `int()`, `float()`, etc think python strings are null-terminated
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
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 python built without --with-pydebug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18416] Move to absolute file paths for module.__file__
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 rep...@bugs.python.org http://bugs.python.org/issue18416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18670] Using read_mime_types function from mimetypes module gives resource warning
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]$ python3 /tmp/a.py /tmp/a.py:7: ResourceWarning: unclosed file _io.TextIOWrapper name='/tmp/a.txt' mode='r' encoding='UTF-8' mimetypes.read_mime_types('/tmp/a.txt') Attached the patch to fix the resource warning problem. -- components: Library (Lib) files: fix_resource_warning_read_mime_types.patch keywords: patch messages: 194557 nosy: vajrasky priority: normal severity: normal status: open title: Using read_mime_types function from mimetypes module gives resource warning type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file31176/fix_resource_warning_read_mime_types.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
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 debug suceeded for CPython, but for very significant changes I may do some extra runs in the release mode as well (or try to test it on a specific OS). It's very important to watch the bots after committing, because they run a wide variety of configurations you'll be hard pressed to reproduce on your own - so they exercise the change pretty well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18264] enum.IntEnum is not compatible with JSON serialisation
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 rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18662] re.escape should not escape the hyphen
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18671] enhance formatting in logging package
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 = 'logging formatting error with %s %% %s' % ( msg, self.args, ) to be able to pinpoint the actual wrong formatting string (the stack trace doesnt help here). -- components: Extension Modules messages: 194559 nosy: mdt priority: normal severity: normal status: open title: enhance formatting in logging package type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18416] Move to absolute file paths for module.__file__
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__ attribute isn't yet obvious to me. I'm traveling for the next few days but I'll probably give it a second look when I get some free time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18672] Fix format specifiers for debug output in _sre.c
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 files: re_trace_format.patch keywords: patch messages: 194561 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix format specifiers for debug output in _sre.c type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31177/re_trace_format.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system
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=detailaid=27666 http://forums.boxee.tv/showthread.php?t=15425 The proper solution is to fix ctypes, but in the meantime we can at least fix uuid. The error seems to be triggered by this snippet: # The uuid_generate_* routines are provided by libuuid on at least # Linux and FreeBSD, and provided by libc on Mac OS X. for libname in ['uuid', 'c']: try: lib = ctypes.CDLL(ctypes.util.find_library(libname)) except: continue if hasattr(lib, 'uuid_generate_random'): _uuid_generate_random = lib.uuid_generate_random if hasattr(lib, 'uuid_generate_time'): _uuid_generate_time = lib.uuid_generate_time Since this code is useless on Windows, protecting it in if os.name not in ['nt', 'ce'] does the trick. BTW, instead of going all way with activation context etc., a simpler solution would be to add to ctypes something like this in CDLL.__init__: if os.name in ['nt', 'ce'] and name == util.find_msvcrt(): # TODO: handle the extension self._handle = windll.kernel32.GetModuleHandleA(self._name) i.e. use the already present runtime DLL instead of trying to load it again. -- nosy: +Igor.Skochinsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17213 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18662] re.escape should not escape the hyphen
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 file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18669] curses.chgat() moves cursor, documentation says it shouldn't
Changes by productivememberofsociety666 productivememberofsociety...@sol.fr.am: Removed file: http://bugs.python.org/file31175/chgat-bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18669] curses.chgat() moves cursor, documentation says it shouldn't
Changes by productivememberofsociety666 productivememberofsociety...@sol.fr.am: Added file: http://bugs.python.org/file31178/chgat-bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3
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('utf-8') # not enough continuation bytes UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: unexpected end of data b'\xed\x7f'.decode('utf-8') # not a valid continuation byte UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18443] Misc/Readme still documents TextMate
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 rep...@bugs.python.org http://bugs.python.org/issue18443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18443] Misc/Readme still documents TextMate
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18671] enhance formatting in logging package
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18383] test_warnings modifies warnings.filters when running with -W default
Ezio Melotti added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18647] re.error: nothing to repeat
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 faster, it's still exponential in the length of the string it fails to match). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18673] Add and use O_TMPFILE for Linux 3.11
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 filesystem. When O_TMPFILE is present, the provided pathname is only used to locate the containing directory (and thus the filesystem where the temporary file should be). So, among other things, programs using O_TMPFILE should have fewer concerns about vulnerabilities resulting from symbolic link attacks. --- Tasks: - add O_TEMPFILE to posixmodule.c - use O_TEMPFILE in tempfile module when it's supported by the current kernel -- components: Extension Modules, Library (Lib) messages: 194569 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Add and use O_TMPFILE for Linux 3.11 type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15651] PEP 3121, 384 refactoring applied to elementtree module
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 rep...@bugs.python.org http://bugs.python.org/issue15651 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18674] Store weak references in modules_by_index
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 extension modules can be collected in a normal way when they are removed from sys.modules. The only gotcha is that PyState_FindModule returns a borrowed reference. With this change, it becomes really important to incref the returned reference as soon as possible. -- components: Interpreter Core files: wr_module_state.patch keywords: patch messages: 194571 nosy: brett.cannon, eric.snow, loewis, ncoghlan, pitrou, sbt priority: normal severity: normal stage: patch review status: open title: Store weak references in modules_by_index type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file31180/wr_module_state.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18621] site.py keeps too much stuff alive when it patches builtins
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18621] site.py keeps too much stuff alive when it patches builtins
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 rep...@bugs.python.org http://bugs.python.org/issue18621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18666] Unused variable in test_frame.py
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 rep...@bugs.python.org http://bugs.python.org/issue18666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18666] Unused variable in test_frame.py
Antoine Pitrou added the comment: Good idea, thank you! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18665] Typos in frame object related code
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 rep...@bugs.python.org http://bugs.python.org/issue18665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18665] Typos in frame object related code
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 rep...@bugs.python.org http://bugs.python.org/issue18665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8713] multiprocessing needs option to eschew fork() under Linux
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file31181/d9fe9757ba0c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18671] enhance formatting in logging package
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') def main(): test() if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) main() When this is run with Python 2.7: $ python logex.py Traceback (most recent call last): File /usr/lib/python2.7/logging/__init__.py, line 842, in emit msg = self.format(record) File /usr/lib/python2.7/logging/__init__.py, line 719, in format return fmt.format(record) File /usr/lib/python2.7/logging/__init__.py, line 464, in format record.message = record.getMessage() File /usr/lib/python2.7/logging/__init__.py, line 328, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Logged from file logex.py, line 6 With Python 3.2: $ python3.2 logex.py Traceback (most recent call last): File /usr/lib/python3.2/logging/__init__.py, line 937, in emit msg = self.format(record) File /usr/lib/python3.2/logging/__init__.py, line 812, in format return fmt.format(record) File /usr/lib/python3.2/logging/__init__.py, line 551, in format record.message = record.getMessage() File /usr/lib/python3.2/logging/__init__.py, line 319, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Logged from file logex.py, line 6 As you can see, the filename and line number are identified, so you can see precisely where the formatting error is. -- components: +Library (Lib) -Extension Modules resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18528] Possible fd leak in socketmodule
Antoine Pitrou added the comment: I don't understand why we would call accept() more than once. Because of EINTR? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18673] Add and use O_TMPFILE for Linux 3.11
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 tracker rep...@bugs.python.org http://bugs.python.org/issue18673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18290] json encoder does not support JSONP/JavaScript safe escaping
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 in a different domain, which addresses some of those criticisms. Therefore, supporting JSONP might not really be worth it. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15651] PEP 3121, 384 refactoring applied to elementtree module
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 rep...@bugs.python.org http://bugs.python.org/issue15651 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18659] test_precision in test_format.py is not executed and has unused variable
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18674] Store weak references in modules_by_index
Brett Cannon added the comment: Won't that change to PyState_FindModule() break code? And is it part of the stable ABI? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18667] missing HAVE_FCHOWNAT
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18674] Store weak references in modules_by_index
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 PyState_FindModule() is py3-specific, and only used for extension modules which have a positive m_size (probably not many of them yet). (I think this issue teaches us that borrowed ref-returning APIs are a bad idea) Unfortunately, without this change, we also make it difficult or impossible to reclaim extension modules using the GC. At least I cannot think of another way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18667] missing HAVE_FCHOWNAT
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. -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3
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 1st post #s = u'\U000104a2'.encode('utf-8') print(len(s)) for c in s: print(ord(c), hex(ord(c))) 4 (240, '0xf0') (144, '0x90') (146, '0x92') (162, '0xa2') I have no idea how the second pasted byte becomes ED in 3.x. Attempting to open the file in 3.x results in a broken* 'Untitled' edit window and the following error message in the console. _tkinter.TclError: character U+104a2 is above the range (U+-U+) allowed by Tcl * Attempting to close the window either immediately or after entering text results in AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' I have to close the initial python process to get rid of it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18674] Store weak references in modules_by_index
Brett Cannon added the comment: Sounds like it needs to be changed with a notice in What's New. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18416] Move to absolute file paths for module.__file__
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 rep...@bugs.python.org http://bugs.python.org/issue18416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
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 rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18671] enhance formatting in logging package
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 that encounter an error after a long time and that error is logged but the logging itself fails due to formatting issues. i suggest to log whatever is avaiable in the suggested way to at least see this valuable information. the additional information where it comes from for further fixing is apreaciated as well. btw: the stackstrace of the logging internals could be left out in my oppinion, it just pollutes the output with no means to the programer. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18416] Move to absolute file paths for module.__file__
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 rep...@bugs.python.org http://bugs.python.org/issue18416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
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 own selectors.py. Since you aren't changing the BaseSelector API at all this is trivial and I can take care of it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
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 tulip tests). - SelectorKey is a named tuple: I think that's better than a class, because SelectorKeys can be returned to the user (register(), get_info(), etc), and we don't want him to mess with them. Also, we get a nice repr() for free Fine. - since SelectorKey is immutable, I added a get_keys() method, which returns all the keys registered. Since it's a dict values, the user can't mess with it Fine. (I missed this in the code review.) This get_keys() method superseedes the registered_count() method, which can be simply replaced with len(selector.get_keys()). We could probably remove it? It also sort of superseedes the get_info() method: I don't remember, why was it needed? registered_count() is only used internally so you can kill it. get_info() is important for Tulip, please keep it. Would it be possible to get it into 3.4? I think so, if Antoine agrees. The next alpha would be at your service. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18671] enhance formatting in logging package
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 documentation, which allows you control over the formatting: http://docs.python.org/2/howto/logging.html#using-arbitrary-objects-as-messages -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18674] Store weak references in modules_by_index
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 reference leak is generally a less dangerous bug than an early free. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18674 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18416] Move to absolute file paths for module.__file__
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com