[issue26229] Make number serialization ES6/V8 compatible

2016-01-30 Thread Anders Rundgren
Anders Rundgren added the comment: As I said, the problem is close to fixed in 3.5. You should not consider the JCS specification as the [sole] target but the ability to creating a normalized JSON object which has many uses including calculating a hash of such objects.

[issue26241] repr() and str() are identical for floats in 3.5

2016-01-30 Thread Anders Rundgren
New submission from Anders Rundgren: According to the documentation repr() and str() are different when it comes to number formatting. A test with a 100 million random and selected IEEE 64-bit values returned no differences -- components: Interpreter Core messages: 259244 nosy:

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a8dc350962b by Martin Panter in branch '3.5': Issue #4806: Avoid masking original TypeError in call with * unpacking https://hg.python.org/cpython/rev/1a8dc350962b New changeset 1261f5f6fc95 by Martin Panter in branch 'default': Issue #4806: Merge

[issue26241] repr() and str() are identical for floats in 3.5

2016-01-30 Thread SilentGhost
SilentGhost added the comment: Would you mind linking to the relevant part of documentation? -- nosy: +SilentGhost ___ Python tracker ___

[issue26209] TypeError in smtpd module with string arguments

2016-01-30 Thread Berker Peksag
Berker Peksag added the comment: There is a strong change that smtpd is going to be deprecated in Python 3.6. See issue 25008 for details. +1 for improving documentation. -- assignee: -> docs@python components: +Documentation -Library (Lib) keywords: +easy nosy: +berker.peksag,

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-01-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: I opened a pull request for blob support in the pysqlite github repository: https://github.com/ghaering/pysqlite/pull/93 I will do the needed changes for python3 and will post a patch soon. -- ___ Python tracker

[issue26242] reST formatting error in Doc/library/importlib.rst

2016-01-30 Thread Alex Gaynor
New submission from Alex Gaynor: https://hg.python.org/cpython/file/default/Doc/library/importlib.rst#l1124 the spacing is wrong, it should be: .. versionchanged:: 3.5 -- assignee: docs@python components: Documentation messages: 259263 nosy: alex, docs@python, eric.araujo,

[issue26242] reST formatting error in Doc/library/importlib.rst

2016-01-30 Thread Berker Peksag
Berker Peksag added the comment: I just fixed a similar one in 23cc4b894caf :) Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker

[issue23076] list(pathlib.Path().glob("")) fails with IndexError

2016-01-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35bf4f9e68f3 by Berker Peksag in branch '3.5': Issue #23076: Path.glob() now raises a ValueError if it's called with an https://hg.python.org/cpython/rev/35bf4f9e68f3 New changeset 0a6290195f7c by Berker Peksag in branch 'default': Issue #23076:

[issue23076] list(pathlib.Path().glob("")) fails with IndexError

2016-01-30 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Thomas! > Though I've been reading the developer guide, I'm a bit unfamiliar with the > process here so I'm not totally sure I'm doing this right. You did everything right :) I just tweaked the test a bit. > I created the patch relative

[issue1475692] replacing obj.__dict__ with a subclass of dict

2016-01-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: Just FYI, if you're only trying to make immutable objects, that's what subclassing tuple with properties and __slots__ = () is for (collections.namedtuple does exactly this, building the Python declaration as a string and then eval-ing it to produce a tuple

[issue26222] Missing code in linux_distribution python 2.7.11

2016-01-30 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26216] run runtktests.py error when test tkinter

2016-01-30 Thread Martin Panter
Martin Panter added the comment: According to Issue 18018, the SystemError is changed to ImportError in 3.6, and in Python 2 (or before 3.3) it raised ValueError. To me, the more important question is: is running runtktests.py as a file meant to be supported, or should it be run as python -m

[issue20024] Py_BuildValue() can call Python code with an exception set

2016-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed patch fixed the issue only for tuples, but not for lists or dicts. See more general patch in issue26168. -- ___ Python tracker

[issue26241] repr() and str() are identical for floats in 3.5

2016-01-30 Thread Eryk Sun
Eryk Sun added the comment: > A test with a 100 million random and selected IEEE 64-bit values > returned no differences The float type's tp_str and tp_repr both call float_repr in Objects/floatobject.c. See the 3.5.1 PyFloat_Type definition [1]. Perhaps you were reading something in

[issue26241] repr() and str() are identical for floats in 3.5

2016-01-30 Thread Mark Dickinson
Mark Dickinson added the comment: Closing: as Martin pointed out, the behaviour is intentional, and without a reference to a particular part of the documentation this issue isn't useful. (Anders: if you find a part of the 3.5 documentation that does state that str and repr are different for

[issue26039] More flexibility in zipfile interface

2016-01-30 Thread Thomas Kluyver
Thomas Kluyver added the comment: Updated version of the ZipInfo.from_file() patch attached. -- Added file: http://bugs.python.org/file41758/zipinfo-from-file5.patch ___ Python tracker

[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-01-30 Thread Martin Panter
Martin Panter added the comment: I was going to suggest just documenting your use-after-free case as a limitation of the N format. I doubt there is much demand to give away a borrowed reference with N _and_ rely on that borrowed reference staying alive for other parameters. It seems a lot of

[issue26241] repr() and str() are identical for floats in 3.5

2016-01-30 Thread Anders Rundgren
Anders Rundgren added the comment: Apparently the docs have changed since 2.7: https://docs.python.org/3.5/tutorial/floatingpoint.html However, the documentation still "sort of" mentions repr() as the most accurate form which isn't entirely correct since it nowadays is identical to str() for

[issue26241] repr() and str() are identical for floats in 3.5

2016-01-30 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue26243] zlib.compress level as keyword argument

2016-01-30 Thread Martin Panter
Martin Panter added the comment: Seems like a reasonable enhancement. A couple of points: * Watch out for the parameter names. Should it be “bytes” or “data”? * Z_DEFAULT_COMPRESSION is -1 not 6 (see Issue 26244) * Needs a version changed notice, and probably a What’s New update --

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-30 Thread Serge Stroobandt
Serge Stroobandt added the comment: Related issue: https://bugs.python.org/issue8060 -- ___ Python tracker ___

[issue25690] Replacement for unittest.mock.mock_open

2016-01-30 Thread Niv Ben-David
Niv Ben-David added the comment: Regarding the documentation changes, my version simply mocks `open` more "closely", so for the most part I can't think of any changes to the documentation. I've added a bit about the mock object acting as a map of file names to mock objects. Should I add

[issue26244] zlib.compressobj level default value documentation

2016-01-30 Thread Martin Panter
Martin Panter added the comment: I’m not sure that is perfectly correct. It really does default to -1, and that is passed to the underlying zlib library (-1 = Z_DEFAULT_COMPRESSION). It is the zlib library that decides that this means 6, but in theory I guess it could be configured or

[issue7850] platform.system() should be "macosx" instead of "Darwin" on OSX

2016-01-30 Thread Nicholas Chammas
Nicholas Chammas added the comment: As of Python 3.5.1 [0], it looks like 1) the `aliased` and `terse` parameters of `platform.platform()` are documented to take integers instead of booleans (contrary to what Marc-Andre requested), and 2) calling `platform.platform()` with `aliased` set to

[issue24110] zipfile.ZipFile.write() does not accept bytes arcname

2016-01-30 Thread Patrik Dufresne
Patrik Dufresne added the comment: Manage to work around this issue by using surrogateescape for arcname and filename. For me it's no longer an issue. -- ___ Python tracker

[issue23252] Add support of writing to unseekable file in zipfile

2016-01-30 Thread Patrik Dufresne
Patrik Dufresne added the comment: While this path provide support to create Zip file for non-seekable stream. It doesn't support reading a file from a non-seekable stream. -- nosy: +Patrik Dufresne ___ Python tracker

[issue26173] test_ssl.bad_cert_test() exception handling

2016-01-30 Thread Martin Panter
Martin Panter added the comment: Updated patch; thanks for the comments Berker -- Added file: http://bugs.python.org/file41763/separate-test-py3.v2.patch ___ Python tracker