[issue32543] odd floor division behavior

2018-01-12 Thread Tim Peters
Tim Peters added the comment: This report appears to be the same: https://bugs.python.org/issue27463 One other thing to note: the Python docs are sometimes unclear about whether expressions are intended to be interpreted as Python code or as mathematical expressions. In: """ floor divisio

[issue32146] multiprocessing freeze_support needed outside win32

2018-01-12 Thread bbayles
bbayles added the comment: I ran into this issue, and found references to it on StackOverflow [1] and GitHub [2] as well. I found that the problem applies to both the 'spawn' and 'forkserver' start methods on Linux. I made an attempt to implement dancol's fix above. (1) and (3) are straightf

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Andres Petralli
Andres Petralli added the comment: Re: rarity. There is at least one more person that ran into the same issue as seen in this report: https://github.com/Azure/azure-cli/issues/5184 -- ___ Python tracker

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Andres Petralli
Andres Petralli added the comment: Moving doesn't work, but even removing the firewire adapter (which was unused on my system), doesn't remove it from the output of ifconfig. I did however work around the issue by just patching up uuid in a suboptimal manner (truncated the 64bit int to 48bit)

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Ned Deily
Ned Deily added the comment: (As a workaround, you *might* be able to reorder the network interfaces in the System Preferences -> Network control panel.) -- ___ Python tracker ___

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +5024 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Andres Petralli
Andres Petralli added the comment: This could be purely incidental to have shown up in 10.13, but yes, the problem comes from the fact that the first hardware ID in the list of devices happens to be an EUI-64 address with 64 bits now. This is the Firewire interface of my Mac Pro and maybe one

[issue32543] odd floor division behavior

2018-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is the result of multiple roundings. 0.9 and 0.1 can't be represented exactly as floats. They are approximated by binary fractions. >>> from fractions import Fraction >>> Fraction(0.9) Fraction(8106479329266893, 9007199254740992) >>> Fraction(0.1) Frac

[issue32543] odd floor division behavior

2018-01-12 Thread Ammar Askar
Ammar Askar added the comment: Looks like floor division for floats call into the divmod function, which has the same behavior: >>> 0.9 .__divmod__(0.1) (8.0, 0.09998) -- nosy: +ammar2 ___ Python tracker

[issue32543] odd floor division behavior

2018-01-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: That does look at first glance like a bug in // to me. 0.9/0.1 is correctly rounded to 9.0 exactly, so flooring it should return 9 (as it does): # Python 3.5 on Linux py> 0.9/0.1 == 9 True py> math.floor(0.9/0.1) 9 So I too would expect that 0.9//0.1 should

[issue32537] multiprocessing.pool.Pool.starmap_async - wrong parameter name

2018-01-12 Thread Ned Deily
Ned Deily added the comment: This wouldn't qualify as a security problem so, if the problem no longer exists in 3.6, then this issue should be closed -- nosy: +ned.deily ___ Python tracker __

[issue32537] multiprocessing.pool.Pool.starmap_async - wrong parameter name

2018-01-12 Thread Martin Panter
Martin Panter added the comment: This was supposed to be fixed in 3.6+ by Issue 31304. In general, 3.5 only gets security fixes at this stage. I’m not sure if it is easy or worth back porting this. -- nosy: +martin.panter ___ Python tracker

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Ned Deily
Ned Deily added the comment: Thanks for your additional analysis. So, assuming I understand it correctly, the problem here is that there can be hardware configurations where the only (or first?) hardware addresses available exceed 48 bits. I'm not sure what might be different for your syste

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-12 Thread Brett Cannon
Brett Cannon added the comment: New changeset bca42186b69e2e615d29d0d4fdb493c9fe71c48b by Brett Cannon in branch 'master': bpo-32248: Introduce the concept of Loader.get_resource_reader() (GH-5108) https://github.com/python/cpython/commit/bca42186b69e2e615d29d0d4fdb493c9fe71c48b --

[issue32542] memory not freed, aka memory leak continues...

2018-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue25582 fixed a memory leak. If run the tests repeatedly every iteration leaked 100 MB of memory. If you get a MemoryError with a single iteration, this means that your machine just doesn't have enough memory for tests. Tests require around 500-600MB of

[issue32543] odd floor division behavior

2018-01-12 Thread Nathan Goldbaum
New submission from Nathan Goldbaum : According to PEP 238: "floor division will be implemented in all the Python numeric types, and will have the semantics of: a // b == floor(a/b) except that the result type will be the common type into which a and b are coerced before the operation." Bu

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5b76bdba071e7bbd9fda0b9b100d1506d95c04bd by Serhiy Storchaka in branch 'master': bpo-31993: Do not use memoryview when pickle large strings. (#5154) https://github.com/python/cpython/commit/5b76bdba071e7bbd9fda0b9b100d1506d95c04bd --

[issue32541] cgi.FieldStorage constructor assumes all lines terminate with \n

2018-01-12 Thread Ned Deily
Change by Ned Deily : -- nosy: -ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue32541] cgi.FieldStorage constructor assumes all lines terminate with \n

2018-01-12 Thread Ned Deily
Ned Deily added the comment: I'm removing the macOS tag and nosies because I think it highly unlikely that the behavior would be limited to macOS. Without a reproducible test case, it's not easy to verify that or investigate further. The cgi module doesn't get a lot of attention but perhaps

[issue29708] support reproducible Python builds

2018-01-12 Thread Brett Cannon
Brett Cannon added the comment: A disagreement has popped up over what the ideal solution is on the PR currently connected to this issue. I'm having the folks involved switch it over to here. IMO I think py_compile can respect SOURCE_DATE_EPOCH and just blindly use it for creating .pyc files

[issue32542] memory not freed, aka memory leak continues...

2018-01-12 Thread Michael Felt
New submission from Michael Felt : in issue25582 - the issue is not (yet) resolved. Perhaps this one can be closed and issue25582 reopened. Both from python2-2.7.14 and "git master" I am getting: michael@x071:[/data/prj/python/git/gcc-python3-3.7]./python -m unittest -v ctypes.test.test_point

[issue32541] cgi.FieldStorage constructor assumes all lines terminate with \n

2018-01-12 Thread Ian Craggs
New submission from Ian Craggs : Using cgi.FieldStorage in an HTTP server in a subclass of BaseHTTPRequestHandler, parsing the request with: form = cgi.FieldStorage(fp=self.rfile, headers=self.headers, environ={"REQUEST_METHOD":op.upper(),

[issue32476] Add concat functionality to ElementTree xpath find

2018-01-12 Thread John Jolly
Change by John Jolly : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue32540] venv docs - doesn't match behavior

2018-01-12 Thread Jason R. Coombs
New submission from Jason R. Coombs : In the docs for the venv command, it states: > Changed in version 3.4: In earlier versions, if the target directory already > existed, an error was raised, unless the --clear or --upgrade option was > provided. Now, if an existing directory is specified, i

[issue32539] os.listdir(...) on deep path on windows in python2.7 fails with errno 123

2018-01-12 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> patch review type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue32539] os.listdir(...) on deep path on windows in python2.7 fails with errno 123

2018-01-12 Thread Eryk Sun
Eryk Sun added the comment: This should be fixed. That said, we have to use a unicode string for a long path anyway. Prior to Windows 8, the conversion from ANSI to Unicode in the system runtime library uses a static MAX_PATH buffer, so the ANSI API is inherently limited to MAX_PATH. You'll s

[issue32539] os.listdir(...) on deep path on windows in python2.7 fails with errno 123

2018-01-12 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +5023 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue28914] selectmodule build fails

2018-01-12 Thread Chris Rose
Chris Rose added the comment: Ach; ignore the libc version below; that's a PEBKAC error on my part. The libc version on the system that's failing is older (and hard to get; just trust me, it's older) and doesn't have the relevant epoll value. -- __

[issue28914] selectmodule build fails

2018-01-12 Thread Chris Rose
Chris Rose added the comment: Is this patch mergeable? I'm trialing the 3.7.0a4 build on some systems here and am unable to build due to this issue, on libc 2.12: ± /lib/libc.so.6 GNU C Library stable release version 2.12, by Roland McGrath et al. Copyright (C) 2010 Free Software Foundation, I

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-12 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Unfortunately the yp_prot.h and ypclnt.h [0] headers have also moved to a different package. Currently they reside at /usr/include/nsl/rpcsvc/*.h [0] https://github.com/python/cpython/blob/f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf/Modules/nismodule.c#L

[issue32539] os.listdir(...) on deep path on windows in python2.7 fails with errno 123

2018-01-12 Thread Anthony Sottile
New submission from Anthony Sottile : On windows, a deep path can be accessed by prefixing the path with \\?\ https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath The call to `listdir()` fails because it uses a posix separator. A q

[issue32528] Change base class for futures.CancelledError

2018-01-12 Thread Joongi Kim
Change by Joongi Kim : -- nosy: +achimnol ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-12 Thread Christian Heimes
Christian Heimes added the comment: New changeset ab95b3074ee43098edf3f23b07fb18ef57ee614d by Christian Heimes (Miss Islington (bot)) in branch '2.7': bpo-32521: nis libtirpc (GH-5137) (#5166) https://github.com/python/cpython/commit/ab95b3074ee43098edf3f23b07fb18ef57ee614d -- _

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-12 Thread Christian Heimes
Christian Heimes added the comment: New changeset d55d6825d7bd0fc120c95d579065623ce6392a2f by Christian Heimes (Miss Islington (bot)) in branch '3.6': [3.6] bpo-32521: nis libtirpc (GH-5137) (#5165) https://github.com/python/cpython/commit/d55d6825d7bd0fc120c95d579065623ce6392a2f --

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2018-01-12 Thread Erik Bray
Erik Bray added the comment: > Users might be better off by not seeing an unhelpful error message when > passing in a numpy.int32, or they might be worse-off by having lost a cue > that they were writing inefficient code (which invisibly creates temporary > integer objects on every call when

[issue32538] Multiprocessing Manager on 3D list - no change of the list possible

2018-01-12 Thread Johannes
New submission from Johannes : I have the following code, which works without multiprocessing: data=[[['','','','','','','','','','','','']]] data[0][0][0] = 5 data[0][0][1] = "5" # data in the array is mixed with float and str print(data) #=> [[[5, '5', '', '', '', '', '', '', '', '', '', '']]

[issue32537] multiprocessing.pool.Pool.starmap_async - wrong parameter name

2018-01-12 Thread Tilman Beck
New submission from Tilman Beck : The optional parameter for the error callback function is named "error_callback" not "error_back" -- assignee: docs@python components: Documentation files: bug.png messages: 309857 nosy: devnull, docs@python priority: normal severity: normal status: ope

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-12 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +5022 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-12 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +5021 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-12 Thread Christian Heimes
Christian Heimes added the comment: New changeset f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf by Christian Heimes in branch 'master': bpo-32521: nis libtirpc (#5137) https://github.com/python/cpython/commit/f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf -- ___

[issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError()

2018-01-12 Thread João Sebastião de Oliveira Bueno
João Sebastião de Oliveira Bueno added the comment: This discussion is fresh, so maybe it is worth asking here prior to python-ideas: In Python we can change any global variable, object attribute or mapping-value with function calls. Locals and nonlocals are the only exceptions and from time

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2018-01-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Just to note that this bug affects SageMath too: https://trac.sagemath.org/ticket/24528 Thanks for fixing! -- nosy: +jdemeyer ___ Python tracker ___

[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-12 Thread Pox TheGreat
Pox TheGreat added the comment: I have already uploaded a patch file but it is not in the required format. Also I realize that most of the confusion was because I forgot to provide the OS version. Perhaps it would be good to have a separate field for that. I will upload a patch as it is descr

[issue32536] ast and tokenize disagree about line number

2018-01-12 Thread Mark Shannon
New submission from Mark Shannon : This occurs (on linux at least) when the the end of line sequence `\r\r\n` occurs in a comment that is indented relative to the following lines. The attached file demonstrates the problem. -- components: Library (Lib) files: tokenize_fail_test.py mess

[issue32346] Speed up slot lookup for class creation

2018-01-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Since benchgcclasses.py doesn't creates dunder methods, cache doesn't have GC-tracked tuples, and ref cycles. Hmm, you're right, thank you. I can also reproduce your numbers here (using benchgcclasses2.py). There's definitely an impact. -- __

[issue32346] Speed up slot lookup for class creation

2018-01-12 Thread INADA Naoki
INADA Naoki added the comment: > Note this is really a worst-case benchmark: lots of classes, no methods, no > user data beside the classes. Since benchgcclasses.py doesn't creates dunder methods, cache doesn't have GC-tracked tuples, and ref cycles. benchgcclasses2.py adds three dunder metho

[issue32346] Speed up slot lookup for class creation

2018-01-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy: > The relative speed up looks nice. But it is just few microseconds per class. > You have to create many thousands of classes to gain a significant fraction > of second. This work started with your message in https://mail.python.org/pipermail/python

[issue32346] Speed up slot lookup for class creation

2018-01-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a simple script creating 1 classes (a large number, but perhaps not out of sight for a large application importing a lot of libraries (*)). (*) see the experiment I did in https://mail.python.org/pipermail/python-dev/2017-December/151260.html Bef

[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-12 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-12 Thread INADA Naoki
INADA Naoki added the comment: New changeset a91662affeb0aae2515cdc5e8f82269337105bf4 by INADA Naoki (Miss Islington (bot)) in branch '3.6': bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091) https://github.com/python/cpython/commit/a91662affeb0aae2515cdc5e8f82269337105bf4 ---

[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2018-01-12 Thread Sebastian Bank
Sebastian Bank added the comment: To be complete, the docs of Dialect.escapechar should probably also say that it is used to escape itself. However, note that csw.writer currently only does this with csv.QUOTE_NONE (breaking round-trip otherwise: #12178). -- _

[issue32346] Speed up slot lookup for class creation

2018-01-12 Thread INADA Naoki
INADA Naoki added the comment: As my understand, this patch creates cache for all classe, not only for parent classes. Caches may has much tuples, and they are GC tracked because they contains function descriptors. And they actually creates reference cycles. Am I correct? If so, I want estima

[issue18369] X509 cert class for ssl module

2018-01-12 Thread Christian Heimes
Christian Heimes added the comment: More examples: >>> import ssl, socket, pprint >>> ctx = ssl.create_default_context() >>> sock = ctx.wrap_socket(socket.socket(), server_hostname="www.python.org") >>> sock.connect(("www.python.org", 443)) >>> pprint.pprint(sock._sslobj._sslobj.verified_chain(

[issue27643] test_ctypes fails on AIX with xlc

2018-01-12 Thread Michael Felt
Michael Felt added the comment: @panter - your patch seems to be working well. Thanks. PR 5164 submitted for review -- ___ Python tracker ___ _

[issue27643] test_ctypes fails on AIX with xlc

2018-01-12 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +5020 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue18369] X509 cert class for ssl module

2018-01-12 Thread Christian Heimes
Christian Heimes added the comment: API example: >>> import ssl >>> chain = ssl.Certificate.chain_from_file("Lib/test/ssl_cert.pem") >>> cas = ssl.Certificate.bundle_from_file("Lib/test/pycacert.pem") >>> pkey = ssl.PrivateKey.from_file("Lib/test/ssl_key.passwd.pem") Traceback (most recent cal

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2018-01-12 Thread Christian Heimes
Christian Heimes added the comment: Senthil, I'm not a fan of PR 2449 because it provides yet another way to load certificates and keys from memory. It's a clever idea to use MemoryBIO here. But the approach is *not* compatible with PEP 543. The PEP requires an API that can turn a memory blo

[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-12 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +5019 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-12 Thread INADA Naoki
INADA Naoki added the comment: New changeset ae12f5d4c98f2095c2aadd58981453e955044697 by INADA Naoki (yahya-abou-imran) in branch 'master': bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091) https://github.com/python/cpython/commit/ae12f5d4c98f2095c2aadd58981453e955044697

[issue18369] X509 cert class for ssl module

2018-01-12 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5018 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m