[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Xiang Zhang
Xiang Zhang added the comment: > The cleanest way to refactor and fix this that comes to mind would be to make > static _get_object_name() and _add_methods_to_object() functions in > moduleobject.c (which omit any strict type checks), and then call those from > PyModule_GetNameObject and PyMod

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Nick Coghlan
Nick Coghlan added the comment: Loosening the constraint on PyModule_GetNameObject would indeed work, but it means the code still has a readability problem: the convention in the C API is that officially ducktyped APIs use the PyObject_* prefix, or one of the other abstract protocols (PyNumber

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Xiang Zhang
Xiang Zhang added the comment: Nice point. I'll write a patch to fix this these days. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots

2016-08-17 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/4760/steps/test/logs/stdio test_handle_accept (test.test_asyncore.TestAPI_UseIPv6Select) ... ERROR == ERRO

[issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27761] Private _nth_root function loses accuracy

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27761] Private _nth_root function loses accuracy

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: "Just for fun, here's a recipe for a correctly-rounded nth root operation for positive finite floats. I'm not suggesting using this in the business logic: it's likely way too slow (especially for large n), but it may have a use in the tests." I don't know wel

[issue27761] Private _nth_root function loses accuracy

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: About tradeoff, would it be possible to add an option to choose the quality of the accuracy? For example, a flag to choose between "fast nth root" or "accurate nth root". Python already has two kind of numbers: Decimal and float. Maybe the "flag" should be th

[issue27181] Add geometric mean to `statistics` module

2016-08-17 Thread koobs
koobs added the comment: For posterity, the following failure was observed on all (9/10/11(current) FreeBSD buildbots: == FAIL: testFraction (test.test_statistics.Test_Nth_Root) -

[issue27761] Private _nth_root function loses accuracy

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Just to share my little experience with rounding numbers. Last years, I worked on a API to convert timestamps between float and integers, the private "PyTime C API": https://haypo.github.io/pytime.html At the beginning, I used various floatting point numbe

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue27785] Module platform: Versions of Windows

2016-08-17 Thread squish_user
New submission from squish_user: I use the module 'platform' to get information on the system my script is executed. I have 4 different operating systems in use: Windows 7, Windows 8, Windows 8.1 and Windows 10. By using the module platform version 1.0.3 I get the following results by platform

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Would it be acceptable for you to add a new option to switch to UTF-8 in Python 3.6, and discuss later if it's ok to enable it by default? In the python-ideas threed, you wrote that Windows allow surrogate characters in filenames, but not the UTF-8/strict Pyth

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Steve Dower: Please don't use git format for diff, or the bug tracker is unable to create reviews. I regenerated the patch. By the way, you introduced a bug in posix_do_stat(): you added a new "else" in the !MS_WINDOWS path which leads to a compilation error.

[issue27749] multprocessing errors on WindowsWriteFile() argument 1 must be int, not None; OSError: handle is closed

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: python 3.5.2 maybe crash in windows -> multprocessing errors on WindowsWriteFile() argument 1 must be int, not None; OSError: handle is closed ___ Python tracker _

[issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: multprocessing errors on WindowsWriteFile() argument 1 must be int, not None; OSError: handle is closed -> multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed __

[issue26331] PEP 515: Tokenizer: allow underscores for grouping in numeric literals

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: Tokenizer: allow underscores for grouping in numeric literals -> PEP 515: Tokenizer: allow underscores for grouping in numeric literals ___ Python tracker

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: I reviewed AF_ALG-kernel-crypto-support-for-socket-module.patch. -- nosy: +haypo ___ Python tracker ___

[issue26200] SETREF adds unnecessary work in some cases

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > Also, putting a function call inside a macro is a worrisome practice in C. I conccur with Raymond: it can be very painful if you get a segfault on such line. What is crashing? The function call? DECREF? INCREF? something else? It's also more painful to debu

[issue16764] Make zlib accept keyword-arguments

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Oops, I reviewed the patch before seeing that Serhiy already pushed it :-) Ignore my comment. -- nosy: +haypo ___ Python tracker ___ __

[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks Stéphane for your fix. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Oops, I didn't mention the issue number in the change. changeset: 102724:8455902b3b8e tag: tip user:Victor Stinner date:Wed Aug 17 13:51:52 2016 +0200 files: Makefile.pre.in description: "make tags": remove -t option of ctags Th

[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset cbe87a9a0cf2 by Victor Stinner in branch 'default': Fix "make tags": set locale to C to call sort https://hg.python.org/cpython/rev/cbe87a9a0cf2 -- nosy: +python-dev ___ Python tracker

[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed95e9ca2699 by Victor Stinner in branch '3.5': Issue #27726: Fix "make tags" https://hg.python.org/cpython/rev/ed95e9ca2699 -- ___ Python tracker

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > This means initialize/run script/finalize will crash the second time, since > the inittab can have stale entries. Sorry, I don't understand. inittab: do you mean _PyImport_Inittab defined in Modules/config.c or PC/config.c? This table is constant, no? Are y

[issue23591] enum: Add Flags and IntFlags

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: I really like the idea of IntFlags. -- nosy: +haypo title: Add Flags and IntFlags -> enum: Add Flags and IntFlags ___ Python tracker ___ ___

[issue23591] enum: Add Flags and IntFlags

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: I expected better repr for such code: >>> socket.SOCK_STREAM | socket.SOCK_CLOEXEC 524289 >>> os.O_RDONLY | os.O_APPEND 1024 -- ___ Python tracker

[issue10976] accept bytes in json.loads()

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: json.loads() raises TypeError on bytes object -> accept bytes in json.loads() ___ Python tracker ___ __

[issue27765] Accept UTF-8 encoded bytes as input to json.loads()

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> duplicate status: open -> closed superseder: -> accept bytes in json.loads() ___ Python tracker ___ __

[issue10976] accept bytes in json.loads()

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: "Right now the way to work around this is to get some deterministic hash from your string; one mechanism being a truncated SHA256 hash, ..." It looks like I missed something. Lib/random.py already computes the SHA-512 hash of you pass a string to random.Random

[issue10976] accept bytes in json.loads()

2016-08-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue27599] Buffer overrun in binascii

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27761] Private _nth_root function loses accuracy

2016-08-17 Thread Mark Dickinson
Mark Dickinson added the comment: Victor: by "way too slow", I really *do* mean way too slow. :-) floor_nroot does arithmetic with integers of bit-length approximately 54*n. For small n, that's fine, but if someone tried to take the geometric mean of a list of 5 values (which it seems to m

[issue27574] Faster parsing keyword arguments

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: The issue can now be closed no? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue27765] Accept UTF-8 encoded bytes as input to json.loads()

2016-08-17 Thread Berker Peksag
Changes by Berker Peksag : -- stage: needs patch -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Oops, I forget to close the issue. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread John Hagen
John Hagen added the comment: @Raymond, you raise valid concerns to be sure. Hoping we can work something out. @Ethan, what are your thoughts? It's not just C that has enums where you can define a unique group of names and omit the values for clarity when they are not significant: C++: h

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread STINNER Victor
New submission from STINNER Victor: When reading the issue #27725, I saw that x_sub() of Objects/longobject.c is too careful just to change the sign of the newly created number: z cannot be shared at the end of the function, before z is normalized. Attached patch simplifies the code. See also

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: I suggest to close this issue. Aliasing issues are complex and simply cannot be fixed in Python 2. The root issue has been fixed in Python 3, it required to change the main C structures of Python objects. The fix for your issue to already known, use -qalias=n

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread Steve Dower
Steve Dower added the comment: Thanks for the regen. I don't think git format is the problem as most of my patches are fine, it's probably because it was in a patch queue and so the parent isn't actually a known commit. I haven't tested whether this works without my other console patches but I

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: I mean that fixing ob->ob_size in Objects/longobject.c is not enough. You should also fix C structures and fix all other C files in the code base... It's too late for such major refactoring in Python 2. -- ___ Pytho

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Patch 12 has the following changes: * Change the chunked_encoding parameter to keyword-only * Drop most of the change regarding the UpdatingFile test (see code review) * Update the urlopen() TypeError to mention “data” may be a file object * Fix and update the te

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +Oren Milman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27785] Module platform: Versions of Windows

2016-08-17 Thread R. David Murray
Changes by R. David Murray : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: I reviewed issue27558_v2.patch, see my comments. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Hum, but we use the same binary (.exe) for all Windows versions. Does it mean that we drop support for Windows < 10 in Python 3.6? -- nosy: +haypo ___ Python tracker _

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-17 Thread Stefan Krah
Stefan Krah added the comment: Agreed, the changes are too big for 2.7. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27682] wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine -> wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborte

[issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown

2016-08-17 Thread STINNER Victor
Changes by STINNER Victor : -- type: behavior -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread Emanuel Barry
Emanuel Barry added the comment: I tend to like all things magic, but the more I think about it, and the less I like it being a part of the standard library. I've had a use for this feature before, and when I did, I cooked my own 12-lines subclass of EnumMeta and _EnumDict. Raymond's points ar

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-17 Thread REIX Tony
REIX Tony added the comment: OK. However, compiling ONLY the file Objects/longobject.c with -qalias=noansi did fix the issue on AIX. That could be the same on Linux. I haven't tried to use Py_SIZE() in all places where it should be used. Now trying to figure out why GCC behaves worst than XLC

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-17 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your review, Victor. :) Leave a reply. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > However, compiling ONLY the file Objects/longobject.c with -qalias=noansi did > fix the issue on AIX. That could be the same on Linux. Nobody asked to only set the compiler file to only this file. As we said, the issue is sprayed in all the C code base. The

[issue27698] socketpair not in socket.__all__ on Windows

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: The issue should now be fixed by my change. Thanks for the bug report! -- nosy: +haypo resolution: -> fixed status: open -> closed ___ Python tracker _

[issue27698] socketpair not in socket.__all__ on Windows

2016-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac2bc921169c by Victor Stinner in branch '3.5': Issue #27698: Add socketpair to socket.__all__ on Windows https://hg.python.org/cpython/rev/ac2bc921169c -- nosy: +python-dev ___ Python tracker

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-17 Thread Xiang Zhang
Xiang Zhang added the comment: > initialize/run script/finalize will crash the second time I don't think so since we already get a test case in test_capi that does init/fini repeatedly. It does not crash. So I agree to close this one. -- ___ Python

[issue27761] Private _nth_root function loses accuracy

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > floor_nroot does arithmetic with integers of bit-length approximately 54*n. Oh, I see. But maybe the Decimal is fast enough for such giant numbers, since we can control the precision? -- ___ Python tracker

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > Is there a surrogatepass option? I'm talking about error handlers of Python codecs: text.encode('utf8', 'surrogatepass') -- ___ Python tracker __

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > I suspect we'll have to go to Guido to get a ruling on the default, but I'll > add an environment variable to switch. If you go in this direction, I would like to follow you for the UNIX/BSD side to make the switch portable. I was thinking about "-X utf8" whi

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > It's not just C that has enums where you can define a unique group of names > and omit the values ... Yes, Python 3.4 too: Animal = Enum('Animal', 'ant bee cat dog') https://docs.python.org/dev/library/enum.html#functional-api -- __

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > Raymond, what are your thoughts about the version of AutoEnum that requires > that a bare tuple be used as the value. It has been in the Python docs since > 3.4 and was actually the original request of this issue: > https://docs.python.org/library/enum.html

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: The issue was fixed by a previous change, maybe the issue #27736. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-17 Thread Martin Panter
New submission from Martin Panter: In Issue 12319, there are many iterations of a patch that adds a new TestCase subclass to Lib/test/test_httplib.py. However it never got run by the main regrtest infrastructure, because nobody remembered to add the class to the list of test classes. So I want

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Your patch changes 3 different things. After the code review, I suggest to split it in two changes (fix test_httplib threading ripper, fix save_env, fix test_httplib main). -- nosy: +haypo ___ Python tracker

[issue23591] enum: Add Flags and IntFlags

2016-08-17 Thread Ethan Furman
Ethan Furman added the comment: The repr is better -- which patch did you test? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Petr Viktorin
Petr Viktorin added the comment: Hi! I'm on a tight schedule this week, so I'm not looking into this in detail. But please let me know if you need any help and I'll raise the priority. -- ___ Python tracker __

[issue23591] enum: Add Flags and IntFlags

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > The repr is better -- which patch did you test? Sorry, I wasn't clear. I didn't test any patch :-) I expect (not expected) better repr when changes will be applied, it's just a remark... -- ___ Python tracker

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 385181e809bc by Vinay Sajip in branch 'default': Closes #9998: Allowed find_library to search additional locations for libraries. https://hg.python.org/cpython/rev/385181e809bc -- nosy: +python-dev resolution: -> fixed stage: patch review -

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-17 Thread Steve Dower
Steve Dower added the comment: No, the flag that we add to the binary is backwards compatible. Earlier versions will just ignore it. -- ___ Python tracker ___ __

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread Steve Dower
Steve Dower added the comment: By portable, do you mean not using an environment variable? Command line parsing is potentially affected by this on Windows - I'd have to look deeper - as command lines are provided as UTF-16. But we may not ever expose them as bytes. I don't even know that this

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Steve Dower added the comment: > By portable, do you mean not using an environment variable? I mean that "python3 -X utf8" should force sys.getfilesystemencoding() to UTF-8 on UNIX/BSD, it would ignore the current locale setting. -- ___

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread Steve Dower
Steve Dower added the comment: Ah I see, if we end up sticking with MBCS and offering a switch to enable UTF-8. In that case, we'll definitely ensure the flag is the same (but I'm hopeful we will just make the reliable behavior on Windows the default, so it won't matter). --

[issue27788] platform module's version number doesn't match its docstring

2016-08-17 Thread Brett Cannon
New submission from Brett Cannon: Not sure if it's worth keeping the version number around, but ATM the module has __version__ set to 1.0.7 while the docstring mentions a 1.0.8. -- components: Library (Lib) messages: 272964 nosy: brett.cannon, lemburg priority: normal severity: normal s

[issue27785] Module platform: Versions of Windows

2016-08-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue27785] Module platform: Versions of Windows

2016-08-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-08-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread Brett Cannon
Brett Cannon added the comment: I would add a comment as to why the assertion is there, otherwise it seems somewhat random that it exists. -- nosy: +brett.cannon ___ Python tracker

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: > I would add a comment as to why the assertion is there, otherwise it seems > somewhat random that it exists. Hum. Maybe it's even better to remove the assertion :-) -- ___ Python tracker

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread Brett Cannon
Brett Cannon added the comment: That works too. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue27785] Module platform: Versions of Windows

2016-08-17 Thread Steve Dower
Steve Dower added the comment: Platform module version 1.0.8 added support for Windows 8.1 and later. You actually downgraded to 1.0.7, which is why you lost functionality. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Updated patch. -- Added file: http://bugs.python.org/file44135/x_sub-2.patch ___ Python tracker ___

[issue27181] Add geometric mean to `statistics` module

2016-08-17 Thread Mark Dickinson
Mark Dickinson added the comment: > self.assertEqual(self.nroot(x**12, 12), float(x)) > AssertionError: 1.1865 != 1.1868 That looks like a case where the test should simply be weakened to an `assertAlmostEqual` with a suitable tolerance; there's no strong reason to

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread Ethan Furman
Ethan Furman added the comment: Raymond, I appreciate your review and your poll. I am open to removing AutoEnum, but would like to give it a couple more weeks of review. (I'll post on py-dev.) The only point you made that I will firmly refute is the "unexpected breakage": you ran your test

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-17 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: It does seem to be stable on python 3, but on python 2.7 it's definitely a problem: $ python -Rc "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10, hash('abc'))" ('9553343809', -1972659830997666042) $ python

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-17 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: Changing the affected version to just 2.7. -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___

[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-08-17 Thread Mark Roseman
Mark Roseman added the comment: Justin, as you say, I think your patch is entirely reasonable as an interim step, as eventually doing a broader improvement on the preferences dialog as suggested in #24781 makes sense. My reworked version used Combobox in similar ways; I think we can safely do

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Maybe use size_a instead of Py_SIZE(z)? And look at "sign". Currently it takes values 1 and -1. Is it worth to replace it with boolean variable "negative"? Or Py_ssize_t variable size_z that takes values size_a and -size_a? -- __

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset be9dc240bf28 by Victor Stinner in branch 'default': Issue #27786: Simplify x_sub() https://hg.python.org/cpython/rev/be9dc240bf28 -- nosy: +python-dev ___ Python tracker

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Petr. I'd appreciate it if you are willing to review the patch. Upload a patch to fix this, along with tests and doc updating. But here is something different. In PEP489, it is explicitly stated that "Py_mod_create slot is not responsible for setting impor

[issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

2016-08-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the review Brett, I pushed my fix. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue27574] Faster parsing keyword arguments

2016-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I left this issue open for three reasons. 1. I had ideas and almost finished patch for different optimization. Unfortunately my hope was not justified, new implementation is slower. If I fail to fix it in few days, I'll close the issue. 2. For bikeshedding

[issue26200] SETREF adds unnecessary work in some cases

2016-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Raymond and Victor. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue27574] Faster parsing keyword arguments

2016-08-17 Thread Brett Cannon
Brett Cannon added the comment: I think for converting uses to Argument Clinic it can be done in a more iterative process on a per-module basis. How many modules do we have left to convert? If it isn't ridiculously huge we could open individual issues to convert them each. -- ___

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > you ran your test script with the -m "run module as script" flag Right, that was a mistest, so it looks like triple quotes do work. I did notice that there's also an issue if one line reads, "red='hello'". But really, the big issue is using a bare-identif

[issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown

2016-08-17 Thread Ned Deily
Changes by Ned Deily : -- nosy: +alex, dstufft, giampaolo.rodola, janssen versions: +Python 3.6 -Python 2.6, Python 3.1 ___ Python tracker ___ ___

[issue27574] Faster parsing keyword arguments

2016-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I came to conclusion than needed to push existing issues for separate files. I'm sure there are ready patches waiting for review. Now there is additional reason for converting to Argument Clinic. But some files contain only one PyArg_ParseTupleAndKeywor

[issue27645] Supporting native backup facility of SQLite

2016-08-17 Thread Cédric Krier
Changes by Cédric Krier : -- nosy: +ced ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

  1   2   >