[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2018-12-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Internally mock_open implementation uses line based iteration [0] to keep track of the state change between read calls. So readline too ignores the argument. There is issue25690 for an alternate mock_open implementation but the code change is large

[issue29707] os.path.ismount() always returns false for mount --bind on same filesystem

2018-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that we should use /proc/mounts or getmntent ,because they are not portable. os.path.ismount() uses the traditional way to detect mountpoints which is not able to detect bind mounts. But what is the problem with getting False for bind mounts

[issue29707] os.path.ismount() always returns false for mount --bind on same filesystem

2018-12-16 Thread Eryk Sun
Eryk Sun added the comment: > what is the problem with getting False for bind mounts > on the same filesystem? Probably there's no problem if it's consistently false for all bind mounts on the same file system, but ismount() is true for a bind mount to the parent directory on the same file

[issue35509] Unable to inherit from logging.Formatter

2018-12-16 Thread Vinay Sajip
Change by Vinay Sajip : -- nosy: +BNMetrics versions: +Python 3.6 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments

2018-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue21041. First than add support for slices, we should make a decision about negative indices. In any case this is a new feature, which can be only added in the future 3.8 release. -- dependencies: +pathlib.PurePath.parents rejects neg

[issue21041] pathlib.PurePath.parents rejects negative indexes

2018-12-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: behavior -> enhancement versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker ___ _

[issue20164] Undocumented KeyError from os.path.expanduser

2018-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The behavior was changed in f2f4555d8287ad217a1dba7bbd93103ad4daf3a8 as a part of issue10496. -- nosy: +serhiy.storchaka, vstinner status: open -> pending ___ Python tracker

[issue22166] test_codecs leaks references

2018-12-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-lis

[issue22166] test_codecs leaks references

2018-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR Victor? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35510] pickling derived dataclasses

2018-12-16 Thread Satrajit S Ghosh
Satrajit S Ghosh added the comment: thank you + serhiy.storchaka while that works in an interactive namespace, it fails in the following setting, which is closer to my dynamic use case. ``` class A: def __init__(self, fields=None): self.B = dc.make_dataclass('B', fields or [])

[issue35510] pickling derived dataclasses

2018-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Dataclasses are pickled by name, as well as other classes. Pickling classes which can not be accessed by name is not supported. -- ___ Python tracker

[issue35510] pickling derived dataclasses

2018-12-16 Thread Satrajit S Ghosh
Satrajit S Ghosh added the comment: Thank you. -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue35509] Unable to inherit from logging.Formatter

2018-12-16 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: Hi Vinay Sajip, thanks for notifying the patch author. Just a question: is there a reason to remove 3.8 from affected versions? My sample program is indeed broken on Python 3.8. -- ___ Python tracker

[issue21041] pathlib.PurePath.parents rejects negative indexes

2018-12-16 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue35499] "make profile-opt" overrides CFLAGS_NODIST

2018-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 640ed520dd6a43a8bf470b79542f58b5d57af9de by Victor Stinner in branch 'master': bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) https://github.com/python/cpython/commit/640ed520dd6a43a8bf470b79542f58b5d57af9de -- __

[issue25430] speed up ipaddress __contain__ method

2018-12-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Though this is out of the scope of the issue I tried converting num_addresses, __hash__, __getitem__ and __eq__ as per Serhiy's idea for IPv6Network replacing the stdlib implementation's int calls with _ip in a custom class. I can see up to 50% spe

[issue16516] argparse types (and actions) must be hashable

2018-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: Luna discovered that has actually been fixed in 3.8 (i.e. the master branch), by making {}.get hashable. So I'm closing this as fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed _

[issue34864] In Idle, Mac tabs make editor status line disappear.

2018-12-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned, the warning is non-specific as to what might go wrong. I would not want to remove it until I had tested everything possibly relevant with tabbing set. And there is still the possibility that people will run IDLE with earlier tk releases. The #33397 i

[issue35507] multiprocessing: seg fault when creating RawArray from numpy ctypes

2018-12-16 Thread Anthony Sottile
Anthony Sottile added the comment: This appears to be a bug with numpy, I've made a PR for them: https://github.com/numpy/numpy/pull/12566 -- nosy: +Anthony Sottile ___ Python tracker __

[issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it.

2018-12-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset b912f9342e7a37d170ba659c13c959115c11545a by Andrew Svetlov (Beomsoo Kim) in branch 'master': bpo-35511: Trivial docs updates for profile and resource library modules. (GH-11124) https://github.com/python/cpython/commit/b912f9342e7a37d170ba659c1

[issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it.

2018-12-16 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue35496] left-to-right violation in match order

2018-12-16 Thread Steve Newcomb
Steve Newcomb added the comment: I'm very grateful for your time and attention, and sorry to have distracted you. You're correct when you say: Steven D'Aprano: ...the rightmost alternative matches from position 1 of the text, while the leftmost alternative doesn't match until position 8.

[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2018-12-16 Thread Jason R. Coombs
New submission from Jason R. Coombs : Originally [reported in testing-cabal/mock#405](https://github.com/testing-cabal/mock/issues/405), I believe I've discovered an inconsistency that manifests as a flaw: `patch` and `patch.object` allow the target to be specified as string referring to the

[issue35491] multiprocessing: enhance repr() to ease debugging

2018-12-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10418 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue20164] Undocumented KeyError from os.path.expanduser

2018-12-16 Thread STINNER Victor
STINNER Victor added the comment: Even if it's not exactly a duplicate of bpo-10496, the reported bug has been fixed. I close the issue. -- resolution: -> duplicate stage: test needed -> resolved status: pending -> closed superseder: -> Python startup should not require passwd entry

[issue35499] "make profile-opt" overrides CFLAGS_NODIST

2018-12-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +10419 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic()

2018-12-16 Thread STINNER Victor
New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/145/builds/956 Unhandled exception in thread started by .task at 0x111775cb0> Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/lock_tests.py", line 41, in

[issue35499] "make profile-opt" overrides CFLAGS_NODIST

2018-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9a4758550d96030ee7e7f7c7c68b435db1a2a825 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179) https://github.com/python/cpython/commit/9a4758550d96030ee7e7f7c7c6

[issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic()

2018-12-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +10420 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue35491] multiprocessing: enhance repr() to ease debugging

2018-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2dfe3511fe310c559d5571c52dcac381f33fd3a6 by Victor Stinner in branch 'master': bpo-35491, multiprocessing: replace "RUN" with RUN (GH-11178) https://github.com/python/cpython/commit/2dfe3511fe310c559d5571c52dcac381f33fd3a6 --

[issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic()

2018-12-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10421 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35412] test_future4 ran no test

2018-12-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +10422 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-12-16 Thread Grant Jenks
Change by Grant Jenks : -- nosy: +grantjenks ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25667] Supply dual-stack (IPv4/IPv6) socket bind routine

2018-12-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe this issue is a duplicate of 17561, which I stumbled onto today. -- resolution: -> duplicate superseder: -> Add socket.create_server_sock() convenience function ___ Python tracker

[issue17561] Add socket.create_server_sock() convenience function

2018-12-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: I do believe this issue is still important and relevant. See issue25667 for a duplicate ticket (and references to implementations) and issue24209 for another issue where this could have been applied. -- nosy: +jason.coombs versions: +Python 3.8 -Pyt

[issue17561] Add socket.create_server_sock() convenience function

2018-12-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Interesting. Yes, I agree this proposal is still desirable. We can reuse socket.create_server_sock() in smtpd, ftplib, socketserver (issue20215) and http.server (issue24209) modules which will inherit dual-stack IPv4/6 capabilities for free. I should be a

[issue35397] Undeprecate and document urllib.parse.unwrap

2018-12-16 Thread Éric Araujo
Éric Araujo added the comment: I suspect the only reason was that unwrap was caught in the bag of «undocumented functions (that don‘t seem useful)». Personally I think I see more bare URLs than URLs in angle brackets these days, and `URL:` feels like an archaic marker :) But I don’t see any

[issue35514] Docs on reference count detail. enhancement.

2018-12-16 Thread bombs
New submission from bombs : https://docs.python.org/3/c-api/intro.html#reference-count-details When I read that section of the docs first time, I found it hard to grasp what transferring of ownership is, which is an important and repeating concept throughout the docs. Some explanations were c

[issue35360] [Windows] Update SQLite dependency

2018-12-16 Thread Scott Stevens
Scott Stevens added the comment: With the discovery of the SQLite "Magellan" bug, could the version be upgraded to 3.26 for all Python versions? As far as I know, the security case is restricted to where the user is allowing aribitrary SQL execution without arbitrary Python execution, but i

[issue34916] include sqlite-3.25+ (with window functions)

2018-12-16 Thread Scott Stevens
Scott Stevens added the comment: Due to the SQLite "Magellan" bug, I'd suggest this be 3.26+. Details: https://blade.tencent.com/magellan/index_en.html See also: https://bugs.python.org/issue35360 -- nosy: +Scott Stevens ___ Python tracker

[issue35186] distutils.command.upload uses deprecated platform.dist with bdist_rpm

2018-12-16 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9 by Petr Viktorin (Paul Ganssle) in branch 'master': bpo-35186: Remove "built with" comment in setup.py upload (GH-10414) https://github.com/python/cpython/commit/4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9