[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This looks similar to issue36378 which was rejected and has a link to previous mailing list discussion. -- nosy: +xtreak ___ Python tracker

[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Varun Agrawal
New submission from Varun Agrawal : Currently, json.load and json.dump take file pointers, aka file-like objects which have support for `.write()` and `.read()`. This necessitates the following pattern of code on a regular basis: ``` with open(filename) as f: o = json.load(f) ... with

[issue37614] Pasteing into idle makes it crash

2019-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please add your operating system and environment information? It seems similar to issue37286 and issue13153 in Windows. -- nosy: +xtreak ___ Python tracker

[issue37614] Pasteing into idle makes it crash

2019-07-17 Thread Colby Reeves
New submission from Colby Reeves : Like the title says pasting  (or U+1F339) into IDLE makes IDLE instantaneously crash. -- assignee: terry.reedy components: IDLE messages: 348095 nosy: Colby Reeves, terry.reedy priority: normal severity: normal status: open title: Pasteing into idle

[issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation

2019-07-17 Thread 徐靖
徐靖 added the comment: I got it that it is just my misunderstanding. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37602] nonzero fixer problem

2019-07-17 Thread 徐靖
徐靖 added the comment: Got it. I am just testing all changes in Python 3.X (in preparation for a project porting to 3.7 before I have permission to view the source code), and call __nonzero__() directly for testing. So maybe I cannot provide an example. I did not realize that it should not be

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5eb19fddd2d6c70ded14a91cf083681d750d593b by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14830)

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 028f1d2479a9a508e1f0bfcff42c20c348244549 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14829)

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-07-17 Thread Jack Wong
Change by Jack Wong : -- nosy: +iforapsy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14622 pull_request: https://github.com/python/cpython/pull/14829 ___ Python tracker ___

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14623 pull_request: https://github.com/python/cpython/pull/14830 ___ Python tracker ___

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 1b3892243433da7eae7f5f3a4f98f13d309c8926 by Terry Jan Reedy in branch 'master': bpo-36390: Gather IDLE Format menu functions into format.py (#14827) https://github.com/python/cpython/commit/1b3892243433da7eae7f5f3a4f98f13d309c8926 --

[issue37613] Broken "Back to top" link in www.python.org (mobile)

2019-07-17 Thread Mariatta
Mariatta added the comment: Thanks for the report. The issue tracker for python.org website is at https://github.com/python/pythondotorg/issues PR should be proposed there instead of python/cpython. -- assignee: docs@python -> nosy: +Mariatta resolution: -> third party stage: ->

[issue37613] Broken "Back to top" link in www.python.org (mobile)

2019-07-17 Thread Giovanni Cappellotto
Giovanni Cappellotto added the comment: I can reproduce the error in Chrome for MacOS when I emulate the resolution of a generic mobile device. I think I have a quick fix for the issue, I will publish a PR soon. -- ___ Python tracker

[issue37613] Broken "Back to top" link in www.python.org (mobile)

2019-07-17 Thread Giovanni Cappellotto
Change by Giovanni Cappellotto : -- title: Fix broken "Back to top" link in www.python.org (mobile) -> Broken "Back to top" link in www.python.org (mobile) ___ Python tracker

[issue37613] Fix broken "Back to top" link in www.python.org (mobile)

2019-07-17 Thread Giovanni Cappellotto
New submission from Giovanni Cappellotto : The mobile version of https://www.python.org/ has a "Back to top" link at the bottom of every page that should scroll the page back to the top, but it doesn't work in Chrome for Android. Note: it works with Safari on iOS. -- assignee:

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-17 Thread Jo Henke
New submission from Jo Henke : Regarding link() POSIX states (https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html): "If path1 names a symbolic link, it is implementation-defined whether link() follows the symbolic link, or creates a new link to the symbolic link itself."

[issue36390] IDLE: Move formatting functions into new format module.

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The new PR moves the remaining Format functions to format.py. I only edited enough to make things work. I did not add tests for the 2 indent methods. They only change future indents, leaving existing indents as it. They need change, possibly elimination,

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +14621 pull_request: https://github.com/python/cpython/pull/14827 ___ Python tracker ___

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-17 Thread Brett Cannon
Brett Cannon added the comment: If you're using your example code for 'testext' that you uploaded then that's expected because the import in your package causes a normal import which means the import machinery is adding things to sys.modules. Try it with a plain module that's empty so you

[issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation

2019-07-17 Thread Brett Cannon
Brett Cannon added the comment: The documentation is correct by not documenting the methods as they are not meant to be used. A warning could be added, but it requires new code to wrap the C function with a DeprecationWarning since that code is currently shared between

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14620 pull_request: https://github.com/python/cpython/pull/14826 ___ Python tracker ___

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14618 pull_request: https://github.com/python/cpython/pull/14824 ___ Python tracker ___

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-07-17 Thread miss-islington
miss-islington added the comment: New changeset 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9 by Miss Islington (bot) (jpic) in branch 'master': bpo-34155: Dont parse domains containing @ (GH-13079) https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9 --

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14619 pull_request: https://github.com/python/cpython/pull/14825 ___ Python tracker ___

[issue33408] Enable AF_UNIX support in Windows

2019-07-17 Thread Paul Monson
Change by Paul Monson : -- keywords: +patch pull_requests: +14617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14823 ___ Python tracker ___

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-17 Thread Tal Einat
Tal Einat added the comment: Regarding validating integer inputs in the configuration dialog (E3), see my new PR GH-14822. -- ___ Python tracker ___

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-17 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +14616 pull_request: https://github.com/python/cpython/pull/14822 ___ Python tracker ___

[issue33408] Enable AF_UNIX support in Windows

2019-07-17 Thread Paul Monson
Paul Monson added the comment: I don't know if datagram support is coming to AF_UNIX on Windows. The changes will only add the flag on Windows, and will enable stream sockets to use AF_UNIX on Windows. In mind this isn't breaking datagram support. It is true that it's a subset of what

[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-17 Thread Matthias Klose
Matthias Klose added the comment: Luis, I'm still trying to figure out why you are seeing that. Please could you report the package versions which are installed on the system? dpkg -l python3.7 python3.8 python3-distutils -- ___ Python tracker

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-17 Thread Tal Einat
Tal Einat added the comment: Terry, on latest master (with the aforementioned PR merged), the context is updated quickly after the code-context is shown. This happens after a delay of up to 100ms due to the update loop. I've created PR GH-14821 with a fix. --

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-17 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +14615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14821 ___ Python tracker ___

[issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs

2019-07-17 Thread Mariatta
New submission from Mariatta : On the left of docs.python.org, is a link to "Report a Bug", which takes you to "Dealing with Bugs" section (https://docs.python.org/3/bugs.html) One of the first few paragraphs of the page is telling people that documentation bugs can be reported at the bug

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-17 Thread Benjamin Mintz
Benjamin Mintz added the comment: ``` name = 'testext' spec = importlib.util.find_spec(name) print(name in sys.modules) module = importlib.util.module_from_spec(spec) print(name in sys.modules) spec.loader.exec_module(module) print(name in sys.modules) ``` This prints False, False, True

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-17 Thread Mariatta
Mariatta added the comment: Should have included the link, but I can't edit issue. Here's the page which I think could be improved. https://docs.python.org/3/using/index.html -- ___ Python tracker

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-17 Thread Mariatta
New submission from Mariatta : The Python Usage and Setup documentation lists how to use Python in different environments: 1. command line 2. Unix 3. Windows 4. MacOS Under "Unix" environment there is a section for Editors and IDE, which actually links to external links like

[issue33976] Enums don't support nested classes

2019-07-17 Thread Ethan Furman
Ethan Furman added the comment: Edward, I'm inclined to agree with you. It will take a couple versions for deprecation, etc., to push this through (assuming nobody comes up with a good counter-argument). In the mean-time, this change has landed in aenum [1] so you can use it now. [1]

[issue37461] email.parser.Parser hang

2019-07-17 Thread miss-islington
miss-islington added the comment: New changeset 6816ca30af7705db691343100e696ea3d8f447d5 by Miss Islington (bot) in branch '3.8': bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

[issue37461] email.parser.Parser hang

2019-07-17 Thread miss-islington
miss-islington added the comment: New changeset 391511ccaaf0050970dfbe95bf2df1bcf6c33440 by Miss Islington (bot) in branch '3.7': bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

[issue37491] IndexError in get_bare_quoted_string

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14614 pull_request: https://github.com/python/cpython/pull/14819 ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14613 pull_request: https://github.com/python/cpython/pull/14820 ___ Python tracker ___

[issue37461] email.parser.Parser hang

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14612 pull_request: https://github.com/python/cpython/pull/14818 ___ Python tracker ___

[issue37461] email.parser.Parser hang

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14611 pull_request: https://github.com/python/cpython/pull/14817 ___ Python tracker ___

[issue37461] email.parser.Parser hang

2019-07-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset a4a994bd3e619cbaff97610a1cee8ffa87c672f5 by Barry Warsaw (Abhilash Raj) in branch 'master': bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

[issue37461] email.parser.Parser hang

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14610 pull_request: https://github.com/python/cpython/pull/14816 ___ Python tracker ___

[issue36793] Do not define unneeded __str__ equal to __repr__

2019-07-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: Serhiy: Did you plan to do any further work, or can this issue be closed? -- ___ Python tracker ___

[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-17 Thread Elizabeth Uselton
Elizabeth Uselton added the comment: I feel like I agree with Paul here, unsurprising behavior from ANY is it matching anything, with no expectation that third party objects have to correctly have a return path for NotImplemented on their __eq__ method. ANY doesn't currently do that. I've

[issue37560] with cgi.FieldStorage(...) fails on cleanup with AttributeError, missing try/except in __exit__

2019-07-17 Thread Ngalim Siregar
Change by Ngalim Siregar : -- keywords: +patch pull_requests: +14609 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14815 ___ Python tracker ___

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2019-07-17 Thread Zackery Spytz
Zackery Spytz added the comment: Can this issue be closed? PR 7978 was merged and backported. -- nosy: +ZackerySpytz ___ Python tracker ___

[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2019-07-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: Is there a good reason to not explicitly initialize them nevertheless? Valgrind is a common tool, and this false positive will affect everyone attempting to run it on a Python extension module. -- ___ Python

[issue37337] Add _PyObject_VectorcallMethod() function

2019-07-17 Thread Zackery Spytz
Zackery Spytz added the comment: Commit b1263d5a60d3f7ab02dd28409fff59b3815a3f67 causes GCC 9.1.0 to give a warning in Objects/descrobject.c. Objects/descrobject.c:1050:19: warning: cast between incompatible function types from ‘PyObject * (*)(mappingproxyobject *, PyObject * const*,

[issue37461] email.parser.Parser hang

2019-07-17 Thread Guido Vranken
Guido Vranken added the comment: I used fuzzing to find this bug. After applying your patch, the infinite loop is gone and it cannot find any other bugs of this nature. -- ___ Python tracker

[issue37337] Add _PyObject_VectorcallMethod() function

2019-07-17 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +14608 pull_request: https://github.com/python/cpython/pull/14814 ___ Python tracker ___

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 093e9b1268f21624a09777818903f1088c674689 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14812)

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 1fc43a3fafd22eb20832459654fd125f12aa3738 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14811)

[issue37602] nonzero fixer problem

2019-07-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: I suspect these fixers were left out simply because no one expected anyone to call the dunder names directly; the whole point of the dunder names is that they're not used directly, being invoked by syntax/context (__nonzero__ being the first thing tried for

[issue37491] IndexError in get_bare_quoted_string

2019-07-17 Thread Abhilash Raj
Change by Abhilash Raj : -- pull_requests: +14607 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14813 ___ Python tracker ___

[issue37461] email.parser.Parser hang

2019-07-17 Thread Abhilash Raj
Abhilash Raj added the comment: I have proposed a PR for this: https://github.com/python/cpython/pull/14794 Reviews are welcome. -- ___ Python tracker ___

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14606 pull_request: https://github.com/python/cpython/pull/14812 ___ Python tracker ___

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14605 pull_request: https://github.com/python/cpython/pull/14811 ___ Python tracker ___

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 82494aa6d947c4a320c09c58fe0f100cdcf7af0b by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) https://github.com/python/cpython/commit/82494aa6d947c4a320c09c58fe0f100cdcf7af0b

[issue37597] audit event table breaks PDF sphinx build

2019-07-17 Thread Julien Palard
Julien Palard added the comment: Looks like a failure during library.pdf, from why we try to link to c-api. In the sphinx latex builder: if docname not in self.docnames: raise NoUri in self.docnames during the library build, we're only having library/* links. So c-api/code is

[issue37543] Optimize pymalloc for non PGO build

2019-07-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset fb26504d14a08fcd61bb92bb989b6d2b12188535 by Inada Naoki in branch 'master': bpo-37543: optimize pymalloc (#14674) https://github.com/python/cpython/commit/fb26504d14a08fcd61bb92bb989b6d2b12188535 --

[issue37543] Optimize pymalloc for non PGO build

2019-07-17 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue28569] mock.attach_mock should work with any return value of patch()

2019-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this similar to issue21478? Michael, can you please confirm this behavior and the change proposed in issue21478? I tried out the below program as per initial report # foo.py from unittest.mock import patch, Mock p = patch('requests.get',

[issue37609] support "UNC" device paths in ntpath.splitdrive

2019-07-17 Thread Eryk Sun
New submission from Eryk Sun : Windows Python includes UNC shares such as "//server/spam" in its definition of a drive. This is natural because Windows supports setting a UNC path as the working directory and handles the share component as the working drive when resolving rooted paths such

[issue34443] enum repr should use __qualname__

2019-07-17 Thread Walter Dörwald
Change by Walter Dörwald : -- pull_requests: +14603 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14809 ___ Python tracker ___

[issue24231] os.makedirs('/', exist_ok=True) fails on Darwin

2019-07-17 Thread SilentGhost
Change by SilentGhost : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation

2019-07-17 Thread 徐靖
New submission from 徐靖 : In https://docs.python.org/3/whatsnew/3.0.html#library-changes Documentation, it said "Cleanup of the thread module: acquire_lock() and release_lock() are gone; use acquire() and release() instead." But in 3.7, I can still find {"acquire_lock",

[issue37530] IDLE: simplify, optimize, and clean up code context

2019-07-17 Thread Tal Einat
Change by Tal Einat : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37578] Change Glob: Allow Recursion for Hidden Files

2019-07-17 Thread myungsekyo
Change by myungsekyo : -- nosy: +myungsekyo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37530] IDLE: simplify, optimize, and clean up code context

2019-07-17 Thread miss-islington
miss-islington added the comment: New changeset 6cf7c45cb5691b75d9a774c904df02a4f8bfcd04 by Miss Islington (bot) in branch '3.8': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/6cf7c45cb5691b75d9a774c904df02a4f8bfcd04

[issue37530] IDLE: simplify, optimize, and clean up code context

2019-07-17 Thread miss-islington
miss-islington added the comment: New changeset bb79ab84c258566bcba89a87eb549fbc8643f882 by Miss Islington (bot) in branch '3.7': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/bb79ab84c258566bcba89a87eb549fbc8643f882

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-17 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: One possible solution would be to have a macro to suppress the tp_print field in the first place. Something like #ifndef PY_NO_TP_PRINT /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */ Py_DEPRECATED(3.8) int (*tp_print)(PyObject

[issue37530] IDLE: simplify, optimize, and clean up code context

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14602 pull_request: https://github.com/python/cpython/pull/14808 ___ Python tracker ___

[issue37530] IDLE: simplify, optimize, and clean up code context

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14601 pull_request: https://github.com/python/cpython/pull/14807 ___ Python tracker ___

[issue37530] IDLE: simplify, optimize, and clean up code context

2019-07-17 Thread Tal Einat
Tal Einat added the comment: New changeset 7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2 by Tal Einat in branch 'master': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2 --

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2019-07-17 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14600 pull_request: https://github.com/python/cpython/pull/14804 ___ Python tracker ___