[issue22537] Failure building 2.7 docs on Windows
Georg Brandl added the comment: you now do need You always did :) However, it should not be a problem to make the extensions 2.x and 3.x compatible in both branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22536] subprocess should include filename in FileNotFoundError exception
Changes by Ned Deily n...@acm.org: -- assignee: ronaldoussoren - components: +Library (Lib) -Interpreter Core, Macintosh nosy: +gregory.p.smith title: Missing filename in FileNotFoundError - subprocess should include filename in FileNotFoundError exception versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22537] Failure building 2.7 docs on Windows
Roundup Robot added the comment: New changeset fd2530294d50 by Georg Brandl in branch '2.7': Closes #22537: Make sphinx extensions compatible with Python 2 or 3, like in the 3.x branches https://hg.python.org/cpython/rev/fd2530294d50 -- nosy: +python-dev resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19342] Improve grp module docstrings
Georg Brandl added the comment: LGTM. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19342 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19342] Improve grp module docstrings
Roundup Robot added the comment: New changeset e2b757baaef1 by Georg Brandl in branch '3.4': Closes #19342: improve docstrings in grp module. https://hg.python.org/cpython/rev/e2b757baaef1 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19342 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19342] Improve grp module docstrings
Roundup Robot added the comment: New changeset de0ca868d44f by Georg Brandl in branch '2.7': Closes #19342: improve docstrings in grp module. https://hg.python.org/cpython/rev/de0ca868d44f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19342 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22528] Missing hint to source code
Roundup Robot added the comment: New changeset b51742cb1685 by Georg Brandl in branch '3.4': closes #22528: add source links to symtable and compileall https://hg.python.org/cpython/rev/b51742cb1685 New changeset 5144c7d0ef29 by Georg Brandl in branch '2.7': closes #22528: add source links to symtable and compileall https://hg.python.org/cpython/rev/5144c7d0ef29 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22528 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14573] json iterencode can not handle general iterators
Alfred Morgan added the comment: Need a patch? Here you go. https://github.com/Zectbumo/cpython/compare/master How to use it: encoder = JSONEncoder(stream=True) This will iterencode() iterators as lists and file objects as strings and stream them when constructed with stream=True. -- nosy: +Zectbumo versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14573 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: Above I included a first attempt however I don't think my code is good and I couldn't figure out the case for negative integers. There's some discussion above about its inclusion. I like your x.bits suggestion actually, assuming x.bits returns an IntBitsView object without copying x in any way. That would suggest that we could do len(x.bits) and probably depreciate x.bit_length(). Any consensus on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14304] Implement utf-8-bmp codec
Terry J. Reedy added the comment: Pending doing some experiments with current and patched code, and reading the rpc code, I believe I would like to see the patch applied. I don't care about whether the patch defines a 'codec' or what its name would be. What i do want is for the Idle Shell to display unicode strings produced by python code as faithfully as possible, without raising an exception, given the limitations of tk and the selected font. -- nosy: +terry.reedy stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14304 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14326] IDLE - allow shell to support different locales
Terry J. Reedy added the comment: I do not understand this issue. Locales (the title) and codecs (the message) are different things. A Tk Text widget, with Idle's wrapper, is essentially a BMP terminal. That is one thing that makes Idle's Shell better than Window's command prompt. An ascii codec would add to tk's limitations, not work around them. #14304 does what I think is needed. Pending some clarification of the proposal and benefits, I think this should be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14326 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20076] Add UTF-8 locale aliases
Roundup Robot added the comment: New changeset 840af1a073f7 by Serhiy Storchaka in branch '2.7': Issue #20076: Remove just added the sr_rs.utf8@latn alias because it is https://hg.python.org/cpython/rev/840af1a073f7 New changeset ed92f06cdd8b by Serhiy Storchaka in branch '3.4': Issue #20076: Remove just added the sr_rs.utf8@latn alias because it is https://hg.python.org/cpython/rev/ed92f06cdd8b New changeset aa169e6d2e15 by Serhiy Storchaka in branch 'default': Issue #20076: Apply optimization in makelocalealias.py repeatedly. https://hg.python.org/cpython/rev/aa169e6d2e15 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20076 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Nick Coghlan added the comment: Right, I had a specific concern related to the way the C level code works. On closer inspection, it turned out all the Python level code execution is complete by the time we reach the point I was worried about. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
STINNER Victor added the comment: I don't like the idea of the array-view int.bits[a:b]: it's harder to implement and the proposed behaviour is different than a list. Example: x=list(abcdef) x[2] 'c' x[2:4] ['c', 'd'] x[2:4] returns a subset of the list, so a new list. It doesn't return cd. I would expect int.bits[a:b] to return a list of integers in range 0..1. I prefer int.bits(bit, nbits=1), because it's more obvious that it returns an integer (and not a list) for nbits 1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Changes by STINNER Victor victor.stin...@gmail.com: -- Removed message: http://bugs.python.org/msg228173 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
STINNER Victor added the comment: I don't know where at of bits_at() comes from. It's rarely used in Python: Lib/asynchat.py:def find_prefix_at_end(haystack, needle): Lib/asyncio/test_utils.py:def call_at(self, when, callback, *args): Lib/asyncio/base_events.py:def call_at(self, when, callback, *args): Lib/asyncio/events.py:def call_at(self, when, callback, *args): Lib/ctypes/__init__.py:def string_at(ptr, size=-1): Lib/ctypes/__init__.py:def wstring_at(ptr, size=-1): Lib/idlelib/EditorWindow.py:def move_at_edge_if_selection(self, edge_index): Lib/idlelib/EditorWindow.py:def move_at_edge(event): I prefer just bits: int.bits(bit, nbits=1). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
STINNER Victor added the comment: I don't know what at of bits_at() comes from. It's rarely used in Python: Lib/asynchat.py:def find_prefix_at_end(haystack, needle): Lib/asyncio/test_utils.py:def call_at(self, when, callback, *args): Lib/asyncio/base_events.py:def call_at(self, when, callback, *args): Lib/asyncio/events.py:def call_at(self, when, callback, *args): Lib/ctypes/__init__.py:def string_at(ptr, size=-1): Lib/ctypes/__init__.py:def wstring_at(ptr, size=-1): Lib/idlelib/EditorWindow.py:def move_at_edge_if_selection(self, edge_index): Lib/idlelib/EditorWindow.py:def move_at_edge(event): I prefer just bits: int.bits(bit, nbits=1). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14304] Implement utf-8-bmp codec
STINNER Victor added the comment: Tkinter (and IDLE specially) can use only UCS-2 characters. Is it always the case, or does depend on a compilation flag of Tcl or Tk? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14304 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] Possible Memory Leak with 'shelve'
Ned Deily added the comment: Sorry, I'm not able to reproduce any major memory leak, using a couple of different dbm implementations, and there is not enough information to go on. To pursue further, you should identify: - what platform (operating system distribution and version) - exactly what version of Python you are using and its origins (if not provided by the operating system distribution): python2.7 -c 'import sys;print(sys.version)' - a test case that shows exactly what you run and how you determine that memory is growing - after running the test (and possibly aborting it) and the database file blah has been created: python2.7 -c 'import whichdb;print(whichdb.whichdb(blah))' That should show which dbm is being used. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Antoine Pitrou added the comment: I don't like the idea of the array-view int.bits[a:b]: it's harder to implement and the proposed behaviour is different than a list. Sequences are not lists. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Roundup Robot added the comment: New changeset 5502a82fb103 by Serhiy Storchaka in branch 'default': Issue #20079: makelocalealias.py now supports installed SUPPORTED file, https://hg.python.org/cpython/rev/5502a82fb103 New changeset 4a19ce6c6e0c by Serhiy Storchaka in branch '2.7': Issue #20079: Updated alias mapping to glibc 2.19 SUPPORTED file. https://hg.python.org/cpython/rev/4a19ce6c6e0c New changeset e9aaefa3f2eb by Serhiy Storchaka in branch '3.4': Issue #20079: Updated alias mapping to glibc 2.19 SUPPORTED file. https://hg.python.org/cpython/rev/e9aaefa3f2eb New changeset 994a694ab71c by Serhiy Storchaka in branch 'default': Issue #20079: Updated alias mapping to glibc 2.19 SUPPORTED file. https://hg.python.org/cpython/rev/994a694ab71c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
STINNER Victor added the comment: Sequences are not lists. Are there other object types for which obj[a:b] does not return a new sequence? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14304] Implement utf-8-bmp codec
Serhiy Storchaka added the comment: In theory Tcl/Tk can be built with 32-bit Tcl_Char. But I doubt that this option is well tested. In any case on Linux Python depends on system Tcl/Tk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14304 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14304] Implement utf-8-bmp codec
STINNER Victor added the comment: In theory Tcl/Tk can be built with 32-bit Tcl_Char. Would it make sense to compile Tcl/Tk with 32-bit Tcl_Char on Windows? I think that we embed our own build ot Tcl/Tk, right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14304 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Antoine Pitrou added the comment: Are there other object types for which obj[a:b] does not return a new sequence? That's a good question :-) I can't think of any. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] Possible Memory Leak with 'shelve'
STINNER Victor added the comment: I modified the example a little bit to display the RSS memory 10 times. The RSS increases by +176 kB at the beginning and then it is stable. I tested on Fedora 20 (Linux): anydbm.open('bla', 'c') creates a 'bsddb._DBWithCursor' object. Can you please give us the DBM type returned by: $ ./python Python 2.7.8+ (2.7:9b4673d7b046, Oct 1 2014, 00:20:22) import anydbm d=anydbm.open('bla', 'c') type(d) class 'bsddb._DBWithCursor' d.close() The loop of your example can maybe by simplified to: d=anydbm.open('bla', 'c') d.close() instead of sh = shelve.open('blah') sh.close() -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
STINNER Victor added the comment: A lot of buildbot failed. Example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/2692/steps/test/logs/stdio == FAIL: test_valencia_modifier (test.test_locale.NormalizeTest) -- Traceback (most recent call last): File /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py, line 428, in test_valencia_modifier self.check('ca_ES@valencia', 'ca_ES.ISO8859-1@valencia') File /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py, line 370, in check self.assertEqual(locale.normalize(localename), expected, msg=localename) AssertionError: 'ca_ES.ISO8859-15@valencia' != 'ca_ES.ISO8859-1@valencia' - ca_ES.ISO8859-15@valencia ?- + ca_ES.ISO8859-1@valencia : ca_ES@valencia -- nosy: +haypo resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1176504] locale._build_localename treatment for utf8
Serhiy Storchaka added the comment: This issue is already fixed (see issue10154 and issue10090). -- nosy: +serhiy.storchaka resolution: - duplicate stage: patch review - resolved status: open - closed superseder: - locale.normalize strips - from UTF-8, which fails on Mac ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1176504 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Marc-Andre Lemburg added the comment: On 02.10.2014 10:24, STINNER Victor wrote: STINNER Victor added the comment: A lot of buildbot failed. Example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/2692/steps/test/logs/stdio == FAIL: test_valencia_modifier (test.test_locale.NormalizeTest) -- Traceback (most recent call last): File /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py, line 428, in test_valencia_modifier self.check('ca_ES@valencia', 'ca_ES.ISO8859-1@valencia') File /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py, line 370, in check self.assertEqual(locale.normalize(localename), expected, msg=localename) AssertionError: 'ca_ES.ISO8859-15@valencia' != 'ca_ES.ISO8859-1@valencia' - ca_ES.ISO8859-15@valencia ?- + ca_ES.ISO8859-1@valencia : ca_ES@valencia I guess the test have to be adjusted as well :-) What I don't understand is why the above case failed. That mapping wasn't changed by the patch, AFAICT. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Roundup Robot added the comment: New changeset 7ce459fc57b9 by Serhiy Storchaka in branch '2.7': Issue #20079: Fixed tests. https://hg.python.org/cpython/rev/7ce459fc57b9 New changeset 8cdea138 by Serhiy Storchaka in branch '3.4': Issue #20079: Fixed tests. https://hg.python.org/cpython/rev/8cdea138 New changeset 433048fd4206 by Serhiy Storchaka in branch 'default': Issue #20079: Fixed tests. https://hg.python.org/cpython/rev/433048fd4206 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Marc-Andre Lemburg added the comment: On 02.10.2014 10:38, Marc-Andre Lemburg wrote: What I don't understand is why the above case failed. That mapping wasn't changed by the patch, AFAICT. Ah, the change is in the second patch round you applied, which is not on the ticket as separate patch file. Reviewing that, I think this change need to be documented (in the comment above the table) and also researched a bit: -'kk_kz':'kk_KZ.ptcp154', +'kk_kz':'kk_KZ.RK1048', -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Serhiy Storchaka added the comment: Oh, sorry. I should be more careful. Test failed due to mismatch between glibc and X11 locale.alias (issue20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to ca_ES.ISO8859-15. ca_ES@valencia exists only in glibc SUPPORTED file and was added in the last commit (due to mismatch with ca_ES). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Serhiy Storchaka added the comment: Reviewing that, I think this change need to be documented (in the comment above the table) and also researched a bit: The 'kk_kz' was added just, in the first commit of this issue (which was based on glibc 2.18 data). No changes to previous Python versions, only addition. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
stijn added the comment: New here, but I think this is the correct issue to get info about this unicode problem. On the windows console: chcp Active code page: 437 type utf.txt ╨ƒ╤Ç╨╕╨▓╨╡╤é chcp 65001 Active code page: 65001 type utf.txt Привет python --version Python 3.5.0a0 cat utf.py f = open('utf.txt') l = f.readline() print(l) print(len(l)) python utf.py Привет �²ÐµÑ‚ �‚ 13 cat utf_explicit.py import codecs f = codecs.open('utf.txt', encoding='utf-8', mode='r') l = f.readline() print(l) print(len(l)) python utf_explicit.py Привет ет 7 I partly read through the page but these things are a bit above my head. Could anyone explain - how to figure out what codec files returned by open()? - is there a way to change it globally to utf-8? - the last case is almost correct: it has the correct number of characters, but the print() still does something wrong. I got this working by using the stream patch, but got another example on which is is not correct, see below. Any way around this? type utf2.txt aαbβcγdδ cat utf2.py import streams import codecs streams.enable() f = codecs.open('utf2.txt', encoding='utf-8', mode='r') print(f.read(1)) print(f.read(1)) print(f.read(2)) print(f.read(4)) python utf2.py a α bβc γdδ -- nosy: +stijn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Serhiy Storchaka added the comment: Test failed due to mismatch between glibc and X11 locale.alias (issue20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to ca_ES.ISO8859-15. ca_ES@valencia exists only in glibc SUPPORTED file and was added in the last commit (due to mismatch with ca_ES). Hmm, no, both aliases are from glibc SUPPORTED file: ca_ES.UTF-8 UTF-8 ca_ES ISO-8859-1 ca_ES@euro ISO-8859-15 ca_ES.UTF-8@valencia UTF-8 ca_ES@valencia ISO-8859-15 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1158490] locale fails if LANGUAGE has multiple locales
Serhiy Storchaka added the comment: It looks to me that this issue is already gone. import os, locale os.environ['LANGUAGE'] = 'en_DK:en_GB:en_US:en' locale.getdefaultlocale(['LANGUAGE']) ('en_DK', 'ISO8859-1') 'en_DK' was added in issue20079. -- nosy: +serhiy.storchaka status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1158490 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20079] Add support for glibc supported locales
Marc-Andre Lemburg added the comment: On 02.10.2014 11:13, Serhiy Storchaka wrote: Serhiy Storchaka added the comment: Test failed due to mismatch between glibc and X11 locale.alias (issue20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to ca_ES.ISO8859-15. ca_ES@valencia exists only in glibc SUPPORTED file and was added in the last commit (due to mismatch with ca_ES). Hmm, no, both aliases are from glibc SUPPORTED file: ca_ES.UTF-8 UTF-8 ca_ES ISO-8859-1 ca_ES@euro ISO-8859-15 ca_ES.UTF-8@valencia UTF-8 ca_ES@valencia ISO-8859-15 See the comment in https://sourceware.org/bugzilla/attachment.cgi?id=966 The point of having % a separate locale is only for PO translations, which have a lot of social % support and are very appreciated by the Valencian-speaking community. Since it's a new locale, they simply used the Latin-1 version with Euro symbol to start with, which is a good move. Most of Europe is stuck with having ISO-8859-1 as default, which does not include the Euro symbol. Then again: most Unix installations use UTF-8 nowadays anyway. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18228] AIX locale parsing failure
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18228 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: I'm attaching a patch that works without changing the recursion limit, and adds some tests for pathological cases. Instead, PyErr_GivenExceptionMatches is changed so that if an exception was previously set, it is replaced by an exception that PyObject_IsSubclass raises. In that way recursion errors should be propagated properly. In exception matching, this means that exceptions (including recursion errors) from PyObject_IsSubclass are ignored. There is already an explicit test for this behavior in test_exceptions. This behavior *could* be changed if intended by introducing a variant of PyErr_GivenExceptionMatches that can set an exception even if none was set before, and calling that in cmp_outcome in ceval. -- nosy: +georg.brandl Added file: http://bugs.python.org/file36776/exception_proper_subclass_matching.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: New version including (I think) correct refcount handling. -- Added file: http://bugs.python.org/file36777/exception_proper_subclass_matching_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: Pros for x.bits being a view: - seems slightly cleaner (in my opinion) - can potentially abstract slicing bits without copying the underlying int (e.g. x.bits[2:][4:]) Pros for x.bits being a function: - Victor's point - no need to depreciate x.bit_length - no need to create a View object and probably faster? - easier to implement -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: Clarifying some comments in this one. -- Added file: http://bugs.python.org/file36778/exception_proper_subclass_matching_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file36776/exception_proper_subclass_matching.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19372] getaddrinfo() bug
Mark Lawrence added the comment: Can someone respond to this please as I know nothing about CentOS builds. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19372 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19402] AbstractBasicAuthHandler
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19402 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19372] getaddrinfo() bug
Georg Brandl added the comment: This needs a lot more information, such as the full config.log and output of make. Kernel 2.6.18 is also quite old, so if there is no feedback if this is still an issue I'd suggest to close the report. -- nosy: +georg.brandl status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19372 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19434] Wrong documentation of MIMENonMultipart class
Mark Lawrence added the comment: The patch is a one line change, can we have a commit review please. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19372] configure and compile problems with older CentOS releases
Changes by Georg Brandl ge...@python.org: -- status: pending - open title: getaddrinfo() bug - configure and compile problems with older CentOS releases ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19372 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: Giving it more thought: to get the int we'd need something like int(x.bits[2:][4:]) which seems quite annoying for the general case of int(x.bits[0:52]). So actually I'm not sure that views would add any more abstraction for their extra complexity without becoming a bit unwieldy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19460] Add test for MIMENonMultipart
Mark Lawrence added the comment: A quick glance says the patch is okay so can we have a commit review please. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19460 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Georg Brandl added the comment: While everybody is throwing ideas around: what about the opposite? If extracting bit ranges from bitfields is common enough to warrant this addition, updating bitfields with a bit range is probably just as common. This'd need something like i.with_bits(value, pos, width=1) No preference if it should raise an exception if value is wider than width. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19434] Wrong documentation of MIMENonMultipart class
Roundup Robot added the comment: New changeset 41f46f7f2722 by Georg Brandl in branch '3.4': Closes #19434: fix copy-paste error in MIMENonMultipart docstring. https://hg.python.org/cpython/rev/41f46f7f2722 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19434] Wrong documentation of MIMENonMultipart class
Roundup Robot added the comment: New changeset a53f2cf4b556 by Georg Brandl in branch '2.7': Closes #19434: fix copy-paste error in MIMENonMultipart docstring. https://hg.python.org/cpython/rev/a53f2cf4b556 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Drekin added the comment: stijn: You are mixing two issues here. One is reading text from a file. There is no problem with it. You just call open(path, encoding=the_encoding_of_the_file). Since the encoding of the file depends on the file, you should provide the information about it. Another issue is interactively entering and displaying Unicode characters in Python REPL in Windows console. That's what is this issue about. The streams code you use is outdated, for recent version see https://pypi.python.org/pypi/win_unicode_console and https://github.com/Drekin/win-unicode-console. It's an installable package which tries to solve the issue. The readme also contains a summary of the issue. Try the package and let me know if there is any problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18729] In unittest.TestLoader.discover doc select the name of load_tests function
Roundup Robot added the comment: New changeset 1e0156aef491 by Georg Brandl in branch '3.4': Closes #18729: minor markup improvement. https://hg.python.org/cpython/rev/1e0156aef491 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18729 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Antoine Pitrou added the comment: I'm worried about the runtime cost of this. Code like this is an extremely common idiom and should remain fast: try: x = d[key] except KeyError: # do something else -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
stijn added the comment: Drekin: you're right for both input and output. Using encoding with plain open() works just fine and using the latest win-unicode-console does give correct output for the second example as well. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: @Georg: I don't think it would be as common but do agree it'd be useful. I think it can be implemented efficiently in pure Python currently. def with_bits(i, value, pos, width=1): width = min(width, value.bit_length()) mask = ((1 width) - 1) v = value mask i = i ~(mask pos) return i | (v pos) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Georg Brandl added the comment: This is why I proposed it (and also because I had to write that quite a few times already). Efficient maybe, but very hard to get right on the first try :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: Agreed. Since type has __subclasscheck__ (why I don't know) this might result in a slowdown since all checks have to go through calling it in PyObject_IsSubclass. Just noticed that given_exception_matches_inner can be simplified a bit since PyObject_IsSubclass already checks for tuples by itself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: Quick microbenchmark: try: {}[a] except KeyError: pass original tip: 1.35 usec with patch v3: 1.55 usec so it's about 15% slowdown for catching a simple exception on my machine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Antoine Pitrou added the comment: Since type has __subclasscheck__ (why I don't know) Ouch, really? That means the PyType_IsSubtype path in PyObject_IsSubclass() is never taken? I think we should add a tp_subclasscheck slot to minimize the general cost of this. Also, try to see if there aren't redundant type / tuple checks along the way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: OK, with these two patches (speedup and v4) I can't see a significant slowdown anymore. -- Added file: http://bugs.python.org/file36779/pyobject_issubclass_isinstance_speedup.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Changes by Georg Brandl ge...@python.org: Added file: http://bugs.python.org/file36780/exception_proper_subclass_matching_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22539] Table formatting errors in pydoc
New submission from Artur de Sousa Rocha: Tables in pydoc are formatted incorrectly -- some lines are missing. Example in Python 3.4.1: help('TUPLES') ... ++--++ | Operation | Result | Notes | ++==++ | x in s | True if an item of *s* is | (1)| ++--++ | x not in s | False if an item of *s* is | (1)| ++--++ | s + t| the concatenation of *s* and *t* | (6)(7) | ++--++ | s * n or n * s | *n* shallow copies of *s*| (2)(7) | ++--++ | s[i] | *i*th item of *s*, origin 0 | (3)| ++--++ | s[i:j] | slice of *s* from *i* to *j* | (3)(4) | ++--++ | s[i:j:k] | slice of *s* from *i* to *j* | (3)(5) | ++--++ ++--++ ++--++ ++--++ | s.index(x[, i[, j]]) | index of the first occurrence of | (8)| ++--++ ++--++ Older version of the same table in Python 3.2.5 in Cygwin console: ++--++ | Operation | Result | Notes | ++==++ | ``x in s`` | ``True`` if an item of *s* is| (1)| || equal to *x*, else ``False`` || ++--++ | ``x not in s`` | ``False`` if an item of *s* is | (1)| || equal to *x*, else ``True`` || ++--++ | ``s + t`` | the concatenation of *s* and *t* | (6)| ++--++ | ``s * n, n * s`` | *n* shallow copies of *s*| (2)| || concatenated || ++--++ | ``s[i]`` | *i*th item of *s*, origin 0 | (3)| ++--++ | ``s[i:j]`` | slice of *s* from *i* to *j* | (3)(4) | ++--++ | ``s[i:j:k]`` | slice of *s* from *i* to *j* | (3)(5) | || with step *k*|| ++--++ | ``len(s)`` | length of *s*|| ++--++ | ``min(s)`` | smallest item of *s* || ++--++ | ``max(s)`` | largest item of *s* || ++--++ | ``s.index(i)`` | index of the first occurence of || || *i* in *s* || ++--++ | ``s.count(i)`` | total number of occurences of|| || *i* in *s* || ++--++ -- assignee: docs@python components: Documentation messages: 228217 nosy: Artur.de.Sousa.Rocha, docs@python priority: normal severity: normal status: open title: Table formatting errors in pydoc type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22539 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22540] speed up isinstance and issubclass for the usual cases
New submission from Georg Brandl: With the introduction of ABCs, PyObject_IsInstance (and for this issue, everything is also valid for PyObject_IsSubclass) has to check for a type's __instancecheck__ before falling back to the built-in behavior. However, the type type has an __instancecheck__ method (that calls the built-in behavior too), probably for consistency on the Python side. This means that the fast path is never taken, and every isinstance() call is slowed down unnecessarily. This patch introduces a new fast path by checking for PyType_Type exactly before looking up the __instancecheck__. It also introduces a check for exact match in PyObject_IsSubclass() analogous to one that is already present in PyObject_IsInstance(). Note that this will break __subclasscheck__ implementations that would deny issubclass(C, C). This patch is not only useful for speeding up isinstance() and issubclass() calls, but also has other effects such as not slowing down the improvement of issue #12029. -- components: Interpreter Core files: pyobject_issubclass_isinstance_speedup.patch keywords: patch messages: 228218 nosy: georg.brandl, ncoghlan, pitrou priority: normal severity: normal stage: patch review status: open title: speed up isinstance and issubclass for the usual cases type: performance versions: Python 3.5 Added file: http://bugs.python.org/file36781/pyobject_issubclass_isinstance_speedup.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22540 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12029] Catching virtual subclasses in except clauses
Georg Brandl added the comment: IsSubclass speedup patch now tracked in #22540. -- dependencies: +speed up isinstance and issubclass for the usual cases ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Mark Dickinson added the comment: - no need to depreciate x.bit_length No matter how this issue progresses, deprecating `int.bit_length` should be out of the question. Much better to have (somewhat) duplicated functionality than to gratuitously break code that's already using `int.bit_length`. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18096] bad library order returned by python-config.in
Matthias Klose added the comment: fixed in 2.7, 3.4 and 3.5 -- resolution: - fixed status: open - closed versions: +Python 2.7 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18096 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17219] cross add Python's library directory when building python standard extensions
Matthias Klose added the comment: fixed in 2.7, 3.4 and 3.5 -- resolution: - fixed status: open - closed versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17219 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: All I had meant by depreciating was changing the x.bit_length documentation to point towards len(x.bits). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22541] Support both side_effect and return_value in a more human way
New submission from Dima Tisnek: Original use case: I want to mock something that on invocation does 2 things: * updates database * returns custom, unrelated value The problem: side_effect is a catch-all setting that is used for: * true side-effects * return values * exceptions Moreover, side_effect takes precedence over return_value, unless the earlier returns mock.DEFAULT. Very quirky. Proposed change option 1: Side-effect is not used as return value; explicit return value may be used for that purpose. (probably changes a lot of tests) Proposed change option 2: return_value, being more specific and explicit, takes precedence over side_effect; that is side_effect is still executed but it's rv is lost if overwritten by return_value is set. (this is unlikely to change existing tests, as it is currently very odd to use both side_effect and return_value at the same time.) Current workaround 1: mock.Mock(side_effect=lambda *args: [db.update(), mock.DEFAULT][-1], return_value=42) Current workaround 2: mock.Mock(side_effect=lambda *args: [db.update(), 42][-1]) -- components: Library (Lib) messages: 228224 nosy: Dima.Tisnek priority: normal severity: normal status: open title: Support both side_effect and return_value in a more human way type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22541 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22541] Support both side_effect and return_value in a more human way
R. David Murray added the comment: Can you explain why you can't use side_effect to set the return value? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22541 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22541] Support both side_effect and return_value in a more human way
Dima Tisnek added the comment: I can, as shown in workaround #2. However it's hackey when true side-effect's own return value has nothing in common with return value for the mock. The shortest workaround I managed is this: mock.Mock(side_effect=lambda *arg: db.update(...) or my_return_value) # relies on db.update returning None or more explicit like this: mock.Mock(side_effect=lamda *arg: db.update(...) or mock.DEFAULT, return_value=my_return_value) # -- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22541 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22541] Support both side_effect and return_value in a more human way
R. David Murray added the comment: Oh, sorry, I missed the workarounds when I read the issue. So your issue is you want to use a lambda rather than a full function for the side effect and it looks ugly. I agree that given the names 'side_effect' and 'return_value' you'd think return_value would take precedence. On the other hand, the API is what it is, and I'm not sure we can change it for backward compatibility reasons. Option 1 is definitely not on the table, and the problem with option 2 is that it is easy to imagine a side_effect that conditionally returns mock.DEFAULT. -- nosy: +michael.foord versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22541 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Stefan Krah added the comment: FWIW, I think it would be good to make this change early in the 3.5 release cycle, so issues can be found. Sebastian, do you have an idea when the change will be decided in numpy? Regarding the discussion here ... https://github.com/numpy/numpy/issues/5085 ... about the special stride marker: In the case of slicing it would be nice to use the organic value that would arise normally from computing the slice. That helps in checking other PEP-3118 implementations like Modules/_testbuffer.c against numpy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
HCT added the comment: maybe someone should start a PEP with all of the thoughts organized? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20221] #define hypot _hypot conflicts with existing definition
Shy Shalom added the comment: Any chance this would be merged to 2.7 as well? The comment from 2014-01-11 06:33:18 says 2.7 but PC/pyconfig.h still has #define hypot _hypot -- nosy: +Shy.Shalom ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20221 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
STINNER Victor added the comment: Yes, it's a good idea to start a PEP to modify most important builtin types like int and str. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: That's something that a Python comitter would have to do isn't it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
STINNER Victor added the comment: That's something that a Python comitter would have to do isn't it? Python is open. Anyone can propose an enhancement (a PEP). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5700] io.FileIO calls flush() after file closed
Serhiy Storchaka added the comment: There is complete implementation of FileIO in pure Python in issue21859. It is free from this bug. import _pyio as io class MyIO(io.FileIO): ... def flush(self): ... print('closed:', self.closed) ... f = MyIO('test.out', 'wb') f.close() closed: False -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5700 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] Possible Memory Leak with 'shelve'
TJ added the comment: Thanks for the help. For my linux box, I have no issue. This is Ubuntu 13.10: Linux localhost 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:02:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 2.7.5+ (default, Feb 27 2014, 19:37:08) [GCC 4.8.1] However, I'm still getting issues with my other box, which is Mac OS. I think I have the relevant info here (let me know if we need additional info): [10:55:00] ~$ sw_vers -productVersion 10.9.2 [10:55:10] ~$ python -c import sys; print sys.version 2.7.8 (default, Aug 21 2014, 20:13:48) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] [10:55:57] ~$ python -c import anydbm;d = anydbm.open('bla', 'c');print(type(d)) class 'bsddb._DBWithCursor' [10:56:05] ~$ cat leaktest.py import anydbm while True: d = anydbm.open('bla', 'c') d.close() [10:56:10] ~$ python leaktest.py [1] 99030 [10:56:18] ~$ ps -o pid,rss,vsz,command -p 99030 PIDRSS VSZ COMMAND 99030 481928 3010600 python leaktest.py [10:56:56] ~$ ps -o pid,rss,vsz,command -p 99030 PIDRSS VSZ COMMAND 99030 3985920 6516788 python leaktest.py [11:01:10] ~$ # After 5 minutes, top shows MEM as 13G [11:01:23] ~$ ps -o pid,rss,vsz,command -p 99030 PIDRSS VSZ COMMAND 99030 13891152 16429156 python leaktest.py Those numbers are stable on my Linux box, and ever growing on Mac. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Possible Memory Leak with 'shelve' - bsddb memory leak on Mac OS X 10.9 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22515] Implement partial order on Counter
Ethan Furman added the comment: I, myself, wrote: - At least, it will until we fix that bug. ;) Happily, reading the whole documentation revealed that non-integer values are allowed, so it's not a bug. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
TJ added the comment: No issue with 3.4 on the Mac box. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22537] Failure building 2.7 docs on Windows
Terry J. Reedy added the comment: Works great. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value
Ethan Furman added the comment: Ignore that last comment -- I don't know what I did yesterday, but unary minus is working as expected today. :/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22533 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21859] Add Python implementation of FileIO
Serhiy Storchaka added the comment: Synchronized with the tip. _io.FileIO now behave same as _pyio,FileIO when there is a NUL in name. -- Added file: http://bugs.python.org/file36782/pyio_fileio_6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21859 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - ronaldoussoren components: +Extension Modules, Macintosh -Library (Lib) nosy: +ronaldoussoren type: - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3824] test_tarfile fails on cygwin (unicode decode error)
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3824 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
STINNER Victor added the comment: [10:55:57] ~$ python -c import anydbm;d = anydbm.open('bla', 'c');print(type(d)) class 'bsddb._DBWithCursor' Hum, on Mac OS X, I don't have the bsddb module installed by default. How did you install it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21937] IDLE interactive window doesn't display unsaved-indicator
Terry J. Reedy added the comment: Further experiments reveal that the **s mean 'the undo buffer is not empty'. Enter import time; time.sleep(2) and ** do not disappear until sleep finishes and a new prompt is displayed. Enter a character at the prompt and ** appear. Delete the char and ** stay. Hit ^z (undo) twice and ** disappear. For the final proof, recall the sleep statement and increase the sleep time to at least 5. Hit enter and ^Z enough times during the sleep and the statement and ** both disappear before sleep ends and the new prompt displayded. The behavior is the same after saving Shell, which adds the name of the file to the title. Using ** on the title bar to indicate the status of the undo buffer is undocumented as far as I know. I would agree that this is surprising, not very useful, and that having ** mean 'unsaved' for Shell as well as for other windows might be more useful. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog
Changes by Terry J. Reedy tjre...@udel.edu: -- dependencies: +IDLE - Add an extension configuration dialog ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20577 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
Ned Deily added the comment: Thanks for the detailed information. I'm not able to reproduce on OS X 10.9.5 with the python.org Python 2.7.8 which builds and links with its own copy of Sleepycat DB 4.7.25. However, I do see the memory leak when using a MacPorts Python 2.7.8 that is linked with a MacPorts copy of Sleepycat DB 4.6. -- assignee: ronaldoussoren - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c
Serhiy Storchaka added the comment: May be this patch will fix the issue. -- components: +Interpreter Core keywords: +patch nosy: +serhiy.storchaka stage: - patch review type: - behavior versions: -Python 2.6 Added file: http://bugs.python.org/file36783/issue8627.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8627 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
TJ added the comment: I should have mentioned that this a Macports environment. So python, bsddb all come from there. Looks like that might be the culprit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22542] Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible
New submission from 700eb415: Trying to run the python interpreter in a chroot fails if /dev/urandom is not present. Removing the nodev flag from the filesystem is not ideal in many situations. Instead, we should utilize functions such as OpenBSD's arc4random(3) and the new potential getentropy() Linux syscall. Alternatively, libevent provides a portable version of arc4random(3) as a workaround. This issue has been discussed extensively when forking LibreSSL. Since we're already providing win32 exceptions, we should at least use the syscall rather than device if it's defined. -- components: Build messages: 228246 nosy: 700eb415 priority: normal severity: normal status: open title: Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22542 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14929] IDLE crashes on *Edit / Find in files ...* command
Terry J. Reedy added the comment: As the 'crash' seems to have been solved, this should probably be closed and a new issue about encodings opened. Also, since the re module used to search lines within files can work with both bytes and strings, there might be an option to search undecoded bytes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14929 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22534] bsddb memory leak on Mac OS X 10.9
Ned Deily added the comment: Yeah, and I'm not sure why they have their build pegged to bdb 4.6; they provide newer ports as well. I think we can close this issue then. Perhaps you could open a MacPorts issue and ask them to update their python27 port to use at least db47. -- resolution: - third party stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com