[issue22537] Failure building 2.7 docs on Windows

2014-10-02 Thread Georg Brandl
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

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-10-02 Thread Ned Deily
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

[issue22537] Failure building 2.7 docs on Windows

2014-10-02 Thread Roundup Robot
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:

[issue19342] Improve grp module docstrings

2014-10-02 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19342 ___ ___ Python-bugs-list mailing

[issue19342] Improve grp module docstrings

2014-10-02 Thread Roundup Robot
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

[issue19342] Improve grp module docstrings

2014-10-02 Thread Roundup Robot
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

[issue22528] Missing hint to source code

2014-10-02 Thread Roundup Robot
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

[issue14573] json iterencode can not handle general iterators

2014-10-02 Thread Alfred Morgan
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.

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
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

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread Terry J. Reedy
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

[issue14326] IDLE - allow shell to support different locales

2014-10-02 Thread Terry J. Reedy
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

[issue20076] Add UTF-8 locale aliases

2014-10-02 Thread Roundup Robot
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:

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Nick Coghlan
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. -- ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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 ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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,

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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,

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread STINNER Victor
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

[issue22534] Possible Memory Leak with 'shelve'

2014-10-02 Thread Ned Deily
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Antoine Pitrou
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Roundup Robot
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread Serhiy Storchaka
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

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread STINNER Victor
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Antoine Pitrou
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

[issue22534] Possible Memory Leak with 'shelve'

2014-10-02 Thread STINNER Victor
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread STINNER Victor
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

[issue1176504] locale._build_localename treatment for utf8

2014-10-02 Thread Serhiy Storchaka
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Roundup Robot
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.

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Serhiy Storchaka
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Serhiy Storchaka
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

[issue1602] windows console doesn't print or input Unicode

2014-10-02 Thread stijn
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

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Serhiy Storchaka
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

[issue1158490] locale fails if LANGUAGE has multiple locales

2014-10-02 Thread Serhiy Storchaka
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:

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
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

[issue18228] AIX locale parsing failure

2014-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18228 ___ ___

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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 ___

[issue19372] getaddrinfo() bug

2014-10-02 Thread Mark Lawrence
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 ___

[issue19402] AbstractBasicAuthHandler

2014-10-02 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19402 ___ ___ Python-bugs-list

[issue19372] getaddrinfo() bug

2014-10-02 Thread Georg Brandl
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

[issue19434] Wrong documentation of MIMENonMultipart class

2014-10-02 Thread Mark Lawrence
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 ___

[issue19372] configure and compile problems with older CentOS releases

2014-10-02 Thread Georg Brandl
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
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

[issue19460] Add test for MIMENonMultipart

2014-10-02 Thread Mark Lawrence
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 ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Georg Brandl
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,

[issue19434] Wrong documentation of MIMENonMultipart class

2014-10-02 Thread Roundup Robot
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 -

[issue19434] Wrong documentation of MIMENonMultipart class

2014-10-02 Thread Roundup Robot
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

[issue1602] windows console doesn't print or input Unicode

2014-10-02 Thread Drekin
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

[issue18729] In unittest.TestLoader.discover doc select the name of load_tests function

2014-10-02 Thread Roundup Robot
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Antoine Pitrou
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

[issue1602] windows console doesn't print or input Unicode

2014-10-02 Thread stijn
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
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 =

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Georg Brandl
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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. --

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Antoine Pitrou
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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 ___

[issue22539] Table formatting errors in pydoc

2014-10-02 Thread Artur de Sousa Rocha
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

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-02 Thread Georg Brandl
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__

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Mark Dickinson
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

[issue18096] bad library order returned by python-config.in

2014-10-02 Thread Matthias Klose
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

[issue17219] cross add Python's library directory when building python standard extensions

2014-10-02 Thread Matthias Klose
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
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 ___

[issue22541] Support both side_effect and return_value in a more human way

2014-10-02 Thread Dima Tisnek
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,

[issue22541] Support both side_effect and return_value in a more human way

2014-10-02 Thread R. David Murray
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 ___

[issue22541] Support both side_effect and return_value in a more human way

2014-10-02 Thread Dima Tisnek
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)

[issue22541] Support both side_effect and return_value in a more human way

2014-10-02 Thread R. David Murray
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

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-10-02 Thread Stefan Krah
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread HCT
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 ___

[issue20221] #define hypot _hypot conflicts with existing definition

2014-10-02 Thread Shy Shalom
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

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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 ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
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 ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
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

[issue5700] io.FileIO calls flush() after file closed

2014-10-02 Thread Serhiy Storchaka
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()

[issue22534] Possible Memory Leak with 'shelve'

2014-10-02 Thread TJ
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

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread STINNER Victor
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 ___

[issue22515] Implement partial order on Counter

2014-10-02 Thread Ethan Furman
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

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread TJ
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

[issue22537] Failure building 2.7 docs on Windows

2014-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Works great. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22537 ___ ___ Python-bugs-list mailing

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-02 Thread Ethan Furman
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

[issue21859] Add Python implementation of FileIO

2014-10-02 Thread Serhiy Storchaka
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

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread Serhiy Storchaka
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

[issue3824] test_tarfile fails on cygwin (unicode decode error)

2014-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3824 ___ ___

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread STINNER Victor
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? -- ___

[issue21937] IDLE interactive window doesn't display unsaved-indicator

2014-10-02 Thread Terry J. Reedy
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 **

[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-10-02 Thread Terry J. Reedy
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 ___

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread Ned Deily
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

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2014-10-02 Thread Serhiy Storchaka
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

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread TJ
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

[issue22542] Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible

2014-10-02 Thread 700eb415
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

[issue14929] IDLE crashes on *Edit / Find in files ...* command

2014-10-02 Thread Terry J. Reedy
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

[issue22534] bsddb memory leak on Mac OS X 10.9

2014-10-02 Thread Ned Deily
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. --

  1   2   >