[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2015-01-09 Thread Martin Panter
New submission from Martin Panter: I am trying to make LZMAFile (which implements BufferedIOBase) use a BufferedReader in read mode. However this broke test_lzma.FileTestCase.test_read1_multistream(), which calls read1() with the default size argument. This is because BufferedReader.read1()

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Tim Peters
Tim Peters added the comment: This is easy: Cowlishaw is wrong on this one, but nothing can be done about it ;-) Confusion arises because most people think of 0**0 as a value (where it certainly must be 1) while others seem to view it as some kind of shorthand for expressing a limit (as the

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-09 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: I inferred from Serhiy's comment that if you override __iter__ to be efficient and not use __getitem__, this overridden behavior used to pass on to index(), but wouldn't after this patch. -- ___ Python tracker

[issue23215] MemoryError with custom error handlers and multibyte codecs

2015-01-09 Thread Aleksi Torhamo
Changes by Aleksi Torhamo alexerion+pythonb...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37660/python_codec_crash_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23215

[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-09 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: docs@python - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23144 ___

[issue23215] MemoryError with custom error handlers and multibyte codecs

2015-01-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +haypo, lemburg, loewis, serhiy.storchaka stage: - patch review versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23215

[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-09 Thread Berker Peksag
Berker Peksag added the comment: Hi Tommy, the patch is already committed to Python 3.5. See https://docs.python.org/3.5/library/heapq.html#heapq.merge -- nosy: +berker.peksag stage: patch review - resolved ___ Python tracker rep...@bugs.python.org

[issue23215] MemoryError with custom error handlers and multibyte codecs

2015-01-09 Thread Aleksi Torhamo
New submission from Aleksi Torhamo: Using a multibyte codec and a custom error handler that ignores errors to encode a string that contains characters not representable in said encoding causes exponential growth of the output buffer, raising MemoryError. The problem is in

[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-09 Thread Tommy Carstensen
Tommy Carstensen added the comment: I noticed 3.5 alpha1 is not released until February 1st. Is there any way I can get my hands on this new functionality? -- nosy: +Tommy.Carstensen ___ Python tracker rep...@bugs.python.org

[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-09 Thread Tommy Carstensen
Tommy Carstensen added the comment: Yes, but 3.5 has not been pre-released yet. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13742 ___ ___

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: Mark Dickson wrote: I've talked to Mike Cowlishaw (the author of the specification) about this particular issue, and the spec is not likely to change on this point. I'm curious about the rationale for the decision. As I'm sure you're aware, in general

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-01-09 Thread Martin Panter
Martin Panter added the comment: Here is a patch for the higher-level LZMAFile implementation to use Nikolaus’s “max_length” parameter. It depends on Nikolaus’s patch also being applied. I split out a _RawReader class that does the actual decompress() calls, and then wrapped that in a

[issue20699] Behavior of ZipFile with file-like object and BufferedWriter.

2015-01-09 Thread Martin Panter
Martin Panter added the comment: I think the simplest thing to do here would be to update the documentation to match the usage. This patch does so, saying that all write() methods, as well as the BytesIO() constructor, have to accept bytes-like objects. It also expands some tests to verify

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2015-01-09 Thread Martin Panter
Martin Panter added the comment: Here is a simple documentation patch to guarantee that at least one byte is normally returned. This would make the method much more useful, and compatible with the BZ2File and LZMAFile interfaces, allowing them to use BufferedReader, as I propose to do in

[issue23213] subprocess communicate() hangs when stderr isn't closed

2015-01-09 Thread Martin Panter
Martin Panter added the comment: I suspect this is not a bug but a misunderstanding of how communiate(), pipes, daemon processes, etc, work. If communicate() didn’t wait for stderr to be closed, then how would it know it had read all the data that was written into the pipe? I don’t have that

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the patch! I posted a review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23206 ___ ___

[issue23213] subprocess communicate() hangs when stderr isn't closed

2015-01-09 Thread Thomas D.
New submission from Thomas D.: Hi, to demonstrate the problem you need =systemd-217: # python3.4 Python 3.4.2 (default, Oct 12 2014, 20:09:43) [GCC 4.8.3] on linux Type help, copyright, credits or license for more information. import subprocess sp = subprocess.Popen([/sbin/udevd, --daemon],

[issue19776] Provide expanduser() on Path objects

2015-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, your patch sounds ok to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___

[issue23188] Exception chaining should trigger for non-normalised exceptions

2015-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: The interesting discovery I made while reviewing the patch for issue 22906 is that there apparently *is* implicit chaining support in PyErr_SetObject Indeed, there is, and it should work properly (AFAIR there was quite a bit of debugging to make this

[issue23208] asyncio: add BaseEventLoop._current_handle

2015-01-09 Thread STINNER Victor
New submission from STINNER Victor: One pain point of asynchronous programming is to understand bugs and rebuild the chain of callbacks / coroutines / tasks. I added the source traceback to Handle, Future (Task) and CoroWrapper to help debugging. Here is a new enhancement to provide more

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread INADA Naoki
INADA Naoki added the comment: Patch update. Now C version does escaping same way to Python version. -- Added file: http://bugs.python.org/file37656/json-fast-unicode-encode.patch ___ Python tracker rep...@bugs.python.org

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The iteration usually has linear complexity The iteration abstract method depends on indexing as well: def __iter__(self): i = 0 try: while True: v = self[i] yield v i += 1

[issue22411] Embedding Python on Windows

2015-01-09 Thread Joakim Karlsson
Joakim Karlsson added the comment: You shouldn't mix headers with and without the _DEBUG symbol defined. At least on some versions of MSVC this can lead to errors as some standard headers start referencing functions that are not available in both debug and release versions of the MSV C

[issue23208] asyncio: add BaseEventLoop._current_handle

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: Yury Selivanov proposed something different in the past: add a context (or a context identifier) to tasks to be able to (indirectly) attach local variables to tasks. Add notion of context_id to event loop https://code.google.com/p/tulip/issues/detail?id=165

[issue22986] Improved handling of __class__ assignment

2015-01-09 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +benjamin.peterson stage: - patch review type: - enhancement versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22986

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm afraid you're getting lost in details that don't matter. We're trying to make the index() method more useful so that searches and be restarted where they left off. -- ___ Python tracker

[issue23204] list.index and rest of list methods disagree if a value is in the list if it's mutated during the call

2015-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is because list.index() has start and stop parameters, and L.index(x) is equivalent to L.index(x, 0, len(L)). In list.count() and list.remove() the limit is dynamic during iteration, but in list.index() it is specified by arguments before iterating. It

[issue23204] list.index and rest of list methods disagree if a value is in the list if it's mutated during the call

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a non-guaranteed behavior. It is allowed to be different from other list methods. The behavior is also very old, stable, and has not been a problem in practice. No good would come from changing it. -- nosy: +rhettinger resolution: - not

[issue23196] Greek letters not sorted properly

2015-01-09 Thread Pierre Nugues
Pierre Nugues added the comment: Hello David, This is not the same issue as 23195. I tested the Greek letters on your interactive console available at Python.org and this is not related to OS X. The Greek sorting works for all the characters I tested except the ‘ῖ’ character, which is in the

[issue23189] Set docstrings to empty string when optimizing with -OO.

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: It seems to me that the problem here lies with the packages that use __doc__+=sometext rather than with -OO which is doing exactly what it is supposed to. -- nosy: +rhettinger ___ Python tracker

[issue23196] Greek letters not sorted properly

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: Which order do you expect? What is your OS? Result on Linux (Fedora 21) with the french UTF-8 locale. locale.setlocale(locale.LC_ALL, '') 'fr_FR.utf8' locale.getlocale(locale.LC_COLLATE) ('fr_FR', 'UTF-8') sorted(x) ['Ά', 'Γ', 'Η', 'Κ', 'Ν', 'Ο', 'έ', 'ί',

[issue23188] Exception chaining should trigger for non-normalised exceptions

2015-01-09 Thread Nick Coghlan
Nick Coghlan added the comment: The interesting discovery I made while reviewing the patch for issue 22906 is that there apparently *is* implicit chaining support in PyErr_SetObject: https://hg.python.org/cpython/file/default/Python/errors.c#l70 Chris indicates that it doesn't seem to be

[issue23185] add inf and nan to math module

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: 2015-01-09 8:16 GMT+01:00 Serhiy Storchaka rep...@bugs.python.org: May be make math.inf and math.nan special objects so that for all x (except inf and nan): What do you mean? Implement a subtype of float and override some methods? x math.inf x -math.inf

[issue23119] Remove unicode specialization from set objects

2015-01-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 09.01.2015 09:33, Raymond Hettinger wrote: I'm withdrawing this one. After more work trying many timings on multiple compilers and various sizes and kinds of datasets, it appears that the unicode specialization is still worth it. The cost of

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Does the spec have a handy list of differences to floats anywhere, or do you have to internalize the whole thing? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23201

[issue23196] Greek letters not sorted properly

2015-01-09 Thread Pierre Nugues
Pierre Nugues added the comment: Hello Victor, Thank you for your prompt answer. Which order do you expect? What is your OS? Result on Linux (Fedora 21) with the french UTF-8 locale. You can try this ICU demo http://demo.icu-project.org/icu-bin/locexp?_=eld_=frx=col and paste the list: Ά

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I afraid that the patch can change computational complexity. The iteration usually has linear complexity, but indexing can has non-constant complexity. E.g. for linked list it will cause quadratic complexity of index(). May be we should have special case

[issue22560] New SSL implementation based on ssl.MemoryBIO

2015-01-09 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Add loop-agnostic SSL implementation to asyncio - New SSL implementation based on ssl.MemoryBIO ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22560

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: this deserves to be spelled out in big red letters in the documentation for the decimal module, along with any other inconsistencies. I think you lost all sense of proportion here. The decimal module is obliged to follow the decimal spec (that is its

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: the spec is not likely to change on this point. In this case, we should just document the behaviour with a reference to the General Decimal Arithmetic Specification. -- nosy: +haypo ___ Python tracker

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The docs already reference the spec. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23201 ___ ___

[issue23198] asyncio: refactor StreamReader

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: See also this feature request: StreamReader needs a timeout https://code.google.com/p/tulip/issues/detail?id=96 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23198

[issue23209] asyncio: break some cycles

2015-01-09 Thread Martin Richard
New submission from Martin Richard: Hi, I would like to submit 3 trivial modifications which break a cycle each. It is not much, but those three cycles caused a lot of objects to be garbage collected. They can now be freed using the reference counting mechanism, and therefore, reduce the

[issue23209] asyncio: break some cycles

2015-01-09 Thread Martin Richard
Changes by Martin Richard mart...@martiusweb.net: -- components: +asyncio nosy: +gvanrossum, haypo, yselivanov type: - performance versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23209

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread Ethan Furman
New submission from Ethan Furman: The help() function explains range as being a virtual sequence, but that phrase cannot be found anywhere in the docs. Suggestion is to insert a phrase below: The advantage of the range type over a regular list or tuple is that a range object is a virtual

[issue23209] asyncio: break some cycles

2015-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: All three changes look good to me. The selectors.py fix should be applied to CPython first; the others to Tulip first. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23209

[issue22411] Embedding Python on Windows

2015-01-09 Thread Steve Dower
Steve Dower added the comment: Right, so when using python34_d.dll you need the _d.pyd versions (and if you're building your own .pyd you need to add the _d suffix too). There's nothing wrong with this difference, since the debug and release builds are subtly incompatible with each other, so

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread Ethan Furman
Ethan Furman added the comment: On 01/09/2015 09:39 AM, Guido van Rossum wrote: Please don't add this to the glossary and don't start using virtual (it is my favorite example of terminology gone wrong in C++ as well as in colloquial language). The terminology virtual sequence is only used

[issue23210] remove the word virtual from help(range)

2015-01-09 Thread Ethan Furman
Ethan Furman added the comment: Others have chimed in for removal of the word virtual, with the Best In Class comment going to Guido for: To me it is a poisonous buzzword that we're better without. It has virtually no semantics left. :-) -- assignee: docs@python - components:

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-09 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23166 ___ ___

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread Ethan Furman
Ethan Furman added the comment: Update: per Guido, we need to drop the word virtual from the help() for range. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23210 ___

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2015-01-09 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23014 ___

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab72f30bcd9f by Brett Cannon in branch 'default': Issue #23014: Make importlib.abc.Loader.create_module() required when https://hg.python.org/cpython/rev/ab72f30bcd9f -- nosy: +python-dev ___ Python

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-09 Thread Brett Cannon
Brett Cannon added the comment: I think I would need to see exactly how you want the bytecode to change and then think over any backwards-compatibility issues since this is doesn't come up very often. -- ___ Python tracker rep...@bugs.python.org

[issue16192] ctypes - documentation example

2015-01-09 Thread Berker Peksag
Berker Peksag added the comment: It's not correct that [The c_int] type is an alias for the c_long type on 32-bit systems. Actually it's an alias if int and long are the same size. It's already documented at https://docs.python.org/dev/library/ctypes.html#ctypes.c_int On platforms

[issue22411] Embedding Python on Windows

2015-01-09 Thread Steve Dower
Steve Dower added the comment: Yeah, unfortunately the only correct way to do this is to use a debug build of Python. It isn't that difficult to build, but it is extra work and may not be an option at all depending on context (for example, some businesses won't let employees access source

[issue22992] Adding a git developer's guide to Mercurial to devguide

2015-01-09 Thread Brett Cannon
Brett Cannon added the comment: If Antoine or Ezio don't make any more comments or commit this themselves then I will take the patch as-is and commit it next Friday. Sorry for the delay, Demian, but December is always a slow month due to holidays. --

[issue22992] Adding a git developer's guide to Mercurial to devguide

2015-01-09 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the response Brett and no worries, the delay is totally understandable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22992 ___

[issue22411] Embedding Python on Windows

2015-01-09 Thread Joakim Karlsson
Joakim Karlsson added the comment: A complicating factor is that the debug and release versions of the dll:s seem to behave differently, which makes it hard to replace one with the other. For instance, in dynload_win.c, the suffix of files looked for are _d.pyd in debug mode and .pyd in

[issue23210] clarify virtual sequence and range docs

2015-01-09 Thread R. David Murray
R. David Murray added the comment: I agree with Guido. Virtual is an abused word and I can't imagine anyone searching on it unless they saw it used somewhere in the first place. Range is a sequence, and the help docs are just a reminder. The Range docs clearly explain the advantages of the

[issue23211] test.test_logging.SMTPHandlerTest failing on Snow Leopard

2015-01-09 Thread Geoffrey Spear
New submission from Geoffrey Spear: This seems to be related to issue20605 where _socket.getaddrinfo() mysteriously fails on some Snow Leopard systems but not others; I don't think the cause of that one was ever explained but this appears to be the same error:

[issue23212] Update Windows and OS X installer copies of OpenSSL to 1.0.1k

2015-01-09 Thread Ned Deily
New submission from Ned Deily: https://www.openssl.org/news/secadv_20150108.txt -- components: Build, Macintosh, Windows messages: 233780 nosy: ned.deily, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Update

[issue23209] asyncio: break some cycles

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 376c5398f28d by Victor Stinner in branch '3.4': Issue #23209: Break some reference cycles in asyncio. Patch written by Martin https://hg.python.org/cpython/rev/376c5398f28d -- nosy: +python-dev ___

[issue23209] asyncio: break some cycles

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: Hi Martin, thanks for the patch. It looks good to me. I applied it to Tulip, Python 3.4 and Python 3.5. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23210] remove the word virtual from help(range)

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79f33147949b by Benjamin Peterson in branch '3.4': remove buzzword (closes #23210) https://hg.python.org/cpython/rev/79f33147949b New changeset 154ae3af0317 by Benjamin Peterson in branch 'default': merge 3.4 (#23210)

[issue23209] asyncio: break some cycles

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7438f2e30908 by Victor Stinner in branch '3.4': Issue #23209: Revert change on selectors, test_selectors failed. https://hg.python.org/cpython/rev/7438f2e30908 New changeset 27cbc877447b by Victor Stinner in branch 'default': (Merge 3.4) Issue

[issue23209] asyncio: break some cycles

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: Ooops, test_selectors fails because get_key() raises TypeError: 'NoneType' object is not subscriptable when the selector is closed. A different fix should be written. I'm now using tox to run the Tulip test suite, I'm surprised that I didn't notice the

[issue23212] Update Windows and OS X installer copies of OpenSSL to 1.0.1k

2015-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a216f349771b by Ned Deily in branch '2.7': Issue #23212: Update OS X installer build OpenSSL to 1.0.1k. https://hg.python.org/cpython/rev/a216f349771b New changeset 849ec86651b4 by Ned Deily in branch '2.7': Issue #23212: 2.7-specific OS X

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2015-01-09 Thread Al Sweigart
New submission from Al Sweigart: GrepDialog.py's findfiles() method lacks a unit test. The comments in the unit test stub in test_grep.py correctly notes that since findfiles() method does not rely on the GrepDialog class, it can be made into a function. The attached patch does the

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: This behavior seems to be required by the General Decimal Arithmetic Specification (http://speleotrove.com/decimal/daexcep.html ) Yes, exactly. The decimal module strictly follows that specification. I don't like the 0**0 - NaN result much either

[issue23119] Remove unicode specialization from set objects

2015-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm withdrawing this one. After more work trying many timings on multiple compilers and various sizes and kinds of datasets, it appears that the unicode specialization is still worth it. The cost of the lookup indirection appears to be completely

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-09 Thread Nick Coghlan
Nick Coghlan added the comment: You can see the difference between the two cases in the bytecode: dis.dis(import x.y.z) 1 0 LOAD_CONST 0 (0) 3 LOAD_CONST 1 (None) 6 IMPORT_NAME 0 (x.y.z) 9 STORE_NAME

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2015-01-09 Thread Robert Kuska
Robert Kuska added the comment: This commit (probably) breaks aarch64 python build. See https://bugzilla.redhat.com/show_bug.cgi?id=1174037 Build was done with libffi 3.1.6, I have also tried with latest upstream libffi version with same result. (gdb) b ReturnRect Function ReturnRect not

[issue19051] Unify buffered readers

2015-01-09 Thread Martin Panter
Martin Panter added the comment: For what it’s worth, it would be better if compressed streams did limit the amount of data they decompressed, so that they are not susceptible to decompression bombs; see Issue 15955. But having a flexible-sized buffer could be useful in other cases. I

[issue23207] logging.basicConfig does not validate keyword arguments

2015-01-09 Thread Florian Bruhin
New submission from Florian Bruhin: logging.basicConfig uses **kwargs and does not validate them. This caused me to shoot myself in the foot multiple times by passing logLevel instead of level accidentally, and then trying to figure out why my messages don't get logged. -- messages:

[issue23193] Please support numeric_owner in tarfile

2015-01-09 Thread Berker Peksag
Berker Peksag added the comment: The patch also needs documentation update for TarFile.extract(): https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extract The tarfile documentation is located at Doc/library/tarfile.rst. -- nosy: +berker.peksag

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2015-01-09 Thread Steve Dower
Steve Dower added the comment: This change only has an effect of you're building with Visual Studio and our fork of libffi. You seem to have an unrelated issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20160

[issue17003] Unification of read() and readline() argument names

2015-01-09 Thread Martin Panter
Martin Panter added the comment: Is there anything left for this bug or could it be closed? I can confirm my v3.4.2 docs say “size” instead of “n” :) -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17003

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2015-01-09 Thread Martin Panter
Martin Panter added the comment: Is the current documentation as accurate as it can be? “The number of bytes returned may be less or more than requested” To me this has always made this method practically useless. A valid implementation could just always return b. I noticed the BZ2File.peek()

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread INADA Naoki
New submission from INADA Naoki: I prefer ensure_ascii=False because it's efficient. But I notice it is very slower. On Python 3.4.2: In [3]: %timeit json.dumps([{'hello': 'world'}]*100) 1 loops, best of 3: 74.8 µs per loop In [4]: %timeit json.dumps([{'hello': 'world'}]*100,

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Stefan Krah
Stefan Krah added the comment: The behavior is already documented (power function): at least one of x or y must be nonzero The decimal docs are already so large that it is probably a bad idea to add a warning. -- ___ Python tracker

[issue16192] ctypes - documentation example

2015-01-09 Thread eryksun
eryksun added the comment: It's not correct that [The c_int] type is an alias for the c_long type on 32-bit systems. Actually it's an alias if int and long are the same size. Here's the relevant snippet from __init__: if _calcsize(i) == _calcsize(l): # if int and long have the

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread INADA Naoki
INADA Naoki added the comment: I've copied test_encode_basestring_ascii.py and modify it for this patch. -- Added file: http://bugs.python.org/file37654/test_encode_basestring.py ___ Python tracker rep...@bugs.python.org

[issue22038] Implement atomic operations on non-x86 platforms

2015-01-09 Thread Gustavo Temple
Gustavo Temple added the comment: Thank you, Victor! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list

[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-09 Thread STINNER Victor
STINNER Victor added the comment: See also the Documentation: document AbstractServer, Server.sockets is specific to asyncio event loops issue: https://code.google.com/p/tulip/issues/detail?id=188 -- ___ Python tracker rep...@bugs.python.org

[issue17003] Unification of read() and readline() argument names

2015-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: readlines() parameter name is not unified still (it can be hint, size, sizehint). There is no obvious winner. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17003

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka stage: - patch review type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23206