[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-05-07 Thread Stefan Behnel
Stefan Behnel added the comment: Adding to the list above: "f_lasti" is used in "libpython.py", which is an almost exact copy of the one in CPython's "Tools/gdb/" for debugging Python code in gdb. If that implementation changes, we can probably adapt, especially since it uses runtime genera

[issue40558] update CONTRIBUTING.rst docs

2020-05-07 Thread Zachary Ware
Zachary Ware added the comment: That redirect just didn't exist yet :). It now does, and I went ahead and added it for 3.9 ahead of time. -- nosy: +zach.ware ___ Python tracker

[issue40558] update CONTRIBUTING.rst docs

2020-05-07 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +19305 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19989 ___ Python tracker ___

[issue40558] update CONTRIBUTING.rst docs

2020-05-07 Thread hai shi
New submission from hai shi : update the links of buildbot in CONTRIBUTING.rst. I don't know why I can not visit `http://buildbot.python.org/3.8.stable/` -- assignee: docs@python components: Documentation messages: 368422 nosy: docs@python, shihai1991 priority: normal severity: normal

[issue40273] mappingproxy isn't reversible

2020-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 02fa0ea9c1073e4476c9bde3d7112f5dd964aa57 by Zackery Spytz in branch 'master': bpo-40273: Reversible mappingproxy (FH-19513) https://github.com/python/cpython/commit/02fa0ea9c1073e4476c9bde3d7112f5dd964aa57 -- __

[issue40557] Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API.

2020-05-07 Thread Mariusz Felisiak
Mariusz Felisiak added the comment: I can prepare a patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40557] Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API.

2020-05-07 Thread Mariusz Felisiak
New submission from Mariusz Felisiak : I would like to propose making test.support.captured_stdin(), captured_stdout(), and captured_stderr() public APIs with guaranteed stability. These helpers are really useful and are stable for the last ~10 years. -- components: Tests messages: 36

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Zain, what I understand is: > python3.8 -m idlelib # To open idle from Terminal In IDLE, File=>New, then File=>SaveAs In dialog opened to Documents, enter name in Save As box, then click Save. For me 2012? Macbook Air with 10.14.6? Mohave and 3.8.3rc1, dialog

[issue40549] Convert posixmodule.c to multiphase initialization (PEP 489)

2020-05-07 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue40488] setup.py shall search by default for libffi.so in /usr/local/lib64

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi

[issue40502] PyNode_New() does not initialize n->n_col_offset

2020-05-07 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch nosy: +nanjekyejoannah nosy_count: 1.0 -> 2.0 pull_requests: +19304 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19988 ___ Python tracker

[issue40535] While build python 3.8.2 in linux ctypes.so is using libffi.so.6 instead of libffi.so.7

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi

[issue34823] libffi detection doesn’t work in my setup

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi

[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi

[issue14527] How to link with a non-system libffi?

2020-05-07 Thread Ned Deily
Ned Deily added the comment: See also earlier discussions in Issue31710, Issue34823, Issue40488, and Issue40535, closed as duplicated of this issue. -- stage: -> needs patch type: enhancement -> ___ Python tracker

[issue18499] mingw: setup _ctypes module with system libffi

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the suggested patch and sorry that it has not been replied to earlier. As of Python 3.7, the libffi source for Unix-y platforms is no longer "vendored" in Python source releases; building ctypes now requires an external copy of libffi, either as suppli

[issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references

2020-05-07 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Minimal reproducer: ./python -m test test__xxsubinterpreters -m test_custom___reduce__ -R : 0:00:00 load avg: 3.20 Run tests sequentially 0:00:00 load avg: 3.20 [1/1] test__xxsubinterpreters beginning 9 repetitions 123456789 . test__xxsubinter

[issue26192] python3 k1om dissociation permanence: libffi

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch and sorry for the long delay in replying. As you may know, as of Python 3.7, we no longer "vendor" a copy of the libffi source in Python source releases; you now have to use either a system-supplied version of libffi or otherwise supply your

[issue25413] ctypes (libffi) fails to compile on Solaris X86

2020-05-07 Thread Ned Deily
Ned Deily added the comment: As of Python 3.7, we no longer "vendor" a copy of the libffi source in Python source releases; you either need to use a system-supplied libffi, a third-party binary, or build it youself. Also Python 2.7 has reached end-of-life and is now frozen. So, if any libf

[issue40334] PEP 617: new PEG-based parser

2020-05-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19303 pull_request: https://github.com/python/cpython/pull/19987 ___ Python tracker ___ ___

[issue36944] Add support for ARM64 to libffi

2020-05-07 Thread Ned Deily
Change by Ned Deily : -- resolution: out of date -> third party status: open -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue40555] pegen (PEP 617): bug in error handling

2020-05-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset db9163ceef31ba00ccb23226917f9c8e9142a0b8 by Pablo Galindo in branch 'master': bpo-40555: Check for p->error_indicator in loop rules after the main loop is done (GH-19986) https://github.com/python/cpython/commit/db9163ceef31ba00ccb232269

[issue40555] pegen (PEP 617): bug in error handling

2020-05-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc

2020-05-07 Thread Ned Deily
Change by Ned Deily : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue36944] Add support for ARM64 to libffi

2020-05-07 Thread Paul Monson
Paul Monson added the comment: Yes I think this can be closed. Thank you! -- status: pending -> open ___ Python tracker ___ ___ Py

[issue35061] Specify libffi.so soname for ctypes

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Sorry for the long delay in answering this issue: ctypes and libffi issues do not get a lot of attention currently. I assume you must have long ago found a solution to the problem but, just for the record and assuming I understand the problem correctly, if you bu

[issue31033] Add argument to .cancel() of Task and Future

2020-05-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: I also posted a second PR (separate from the first) that adds a "msg" argument to Future.cancel() and Task.cancel(). That PR is also now ready for review: https://github.com/python/cpython/pull/19979 The other PR is simpler and more essential though, so I thi

[issue36944] Add support for ARM64 to libffi

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Paul, it looks like your changes were included upstream in libffi 3.3.0 which is now being used for python.org Windows builds. If that is true, can we now close this issue? -- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open

[issue40525] zipapps execute symlinks as if they are code

2020-05-07 Thread Filipe Laíns
Filipe Laíns added the comment: I tracked this down to zipimporter. I have one untested patch, when I run python from my development tree for some reason the zipimport definition at Lib/zipimport.py is not used. I assume something weird is going on because of the frozen circular imports. I wo

[issue40554] Add escape to the glossary?

2020-05-07 Thread Inada Naoki
Inada Naoki added the comment: There are many "escape"; JSON, HTML, SQL, Python string literal, ESC-key, escape sequence in the terminal, etc... Is there a consistent meaning of "escape" in the context of Python? -- nosy: +inada.naoki ___ Python t

[issue17848] can't compile with clang and build a shared lib due to libffi

2020-05-07 Thread Ned Deily
Ned Deily added the comment: As of Python 3.7, Python source releases no longer "vendor" the source of libffi for Linux platforms; you need to use either a system-supplied libffi or, if really necessary, build and link with your own copy (not always easy to do). As the supplied patch modifie

[issue27133] python 3.5.1 will not compile because libffi module uses wrong CFLAGS

2020-05-07 Thread Ned Deily
Ned Deily added the comment: As of Python 3.7.0, we no longer "vendor" a copy of the libffi source for Unix-y platforms so I believe this issue of passing the right flag values into cpython's libffi build is no longer relevant. -- nosy: +ned.deily resolution: -> out of date stage:

[issue14527] How to link with a non-system libffi?

2020-05-07 Thread Ned Deily
Ned Deily added the comment: As of current Python 3 releases, like 3.8, the python build no longer vendors a copy of libffi for most Unix systems and for those systems the --with-system-ffi configure option is ignored, i.e. configure and setup.py will always try to find an external libffi.

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > Hm, but there the old parser seems at fault: it points to the last space > rather than beyond it? Both parsers seem to have the same behaviour, when parsing files. I just found out that even the new parser points to the `|` if there is not trailing whi

[issue39685] Python 3.8 regression Socket operation on non-socket

2020-05-07 Thread Dima Tisnek
Dima Tisnek added the comment: The code in question is interesting... I don't claim to understand it. A pair of file descriptors is passed wrapped in sockets, and the objects are used here: https://github.com/sshuttle/sshuttle/blob/966fd0c5231d56c4f464752865d96f97bd3c0aac/sshuttle/ssnet.py#L2

[issue40555] pegen (PEP 617): bug in error handling

2020-05-07 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: That's because we're not checking for errors after a loop is done. Pushing a fix. -- ___ Python tracker ___

[issue40555] pegen (PEP 617): bug in error handling

2020-05-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +19302 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19986 ___ Python tracker __

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: The commit a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 introduced reference leaks: $ ./python -m test -R 3:3 test__xxsubinterpreters -m test.test__xxsubinterpreters.RunFailedTests.test_traceback_propagated (...) test__xxsubinterpreters leaked [1863, 1861, 1863]

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, but there the old parser seems at fault: it points to the last space rather than beyond it? -- ___ Python tracker ___

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > But if the col_offset points way past the text, what should happen? The > clipping there seems reasonable. Note that if a file is being parsed and not a string the behaviour is this: ╰─ cat -e t.py x = 1 | 2 |$ ╰─ ./python.exe t.py File "/Users/lys

[issue40555] pegen (PEP 617): bug in error handling

2020-05-07 Thread STINNER Victor
New submission from STINNER Victor : autopep8 test suite does crash on Python 3.9.0a6. The bug can be reproduced with: Python 3.9.0a6+ (heads/master:b7a78ca74a, May 8 2020, 01:46:01) [GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux Type "help", "copyright", "credits" or "license" for mor

[issue40555] pegen (PEP 617): bug in error handling

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: Workaround: use python3.9 -X oldparser. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue40535] While build python 3.8.2 in linux ctypes.so is using libffi.so.6 instead of libffi.so.7

2020-05-07 Thread Filipe Laíns
Filipe Laíns added the comment: Which error are you getting? libffi is provided by your distribution. -- nosy: +FFY00 ___ Python tracker ___ ___

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-05-07 Thread Filipe Laíns
Filipe Laíns added the comment: This is the backtrace I get: Traceback (most recent call last): File "/home/anubis/test/multiprocessing-error.py", line 16, in proc.terminate() File "/home/anubis/git/cpython/Lib/subprocess.py", line 2069, in terminate self.send_signal(signal.SIGTERM

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Zain Said
Zain Said added the comment: The screenshot link is at the top of the thread -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: FYI the autopep8 project uses lib2to3. -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Zain Said
Zain Said added the comment: Sure i'll supply a screenshot This problem doesn't effect saving in general after editing existing programs by the way. My process of saving a program: - I'll open IDLE (Python 3.8.2) - write anything at all - I'll either hit command>s or click file>save as

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: > I propose the following plan: > > * Always run GitHub Action jobs Done. > * Make Windows 64-bit job mandatory My request: https://github.com/python/core-workflow/issues/368 -- ___ Python tracker

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Ned Deily
Ned Deily added the comment: Zain and/or Raymond: can you please give the exact steps to reproduce this problem, including exactly how you invoke IDLE, the Python version info and build date info from the IDLE shell window, the details of exactly how you invoke Save As (i.e whether via click

[issue39881] Multiple Interpreters in the Stdlib (PEP 554) - High-level Implementation

2020-05-07 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- pull_requests: +19301 pull_request: https://github.com/python/cpython/pull/19985 ___ Python tracker ___

[issue40228] Make setting line number in frame more robust.

2020-05-07 Thread STINNER Victor
Change by STINNER Victor : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40228] Make setting line number in frame more robust.

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: Windows 64-bit emits a compiler warning on this line: int len = PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT); Warning: D:\a\cpython\cpython\Objects\frameobject.c(400,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', poss

[issue40554] Add escape to the glossary?

2020-05-07 Thread Julien Palard
New submission from Julien Palard : Geoff Cutter noticed via docs@ that escape is not defined in the glossary. I concur with the idea of adding it, opening as an "easy" issue, even if finding a good definition might not be that easy. -- assignee: docs@python components: Documentation

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps we could create an option in the general settings that offers a workaround: open a regular text window to get the filename. This wouldn't be as pretty (won't display filenames, offer mouse support, won't show file previews), but it would be rel

[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-05-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Any news about this? Should we revert the commit for 3.9? -- ___ Python tracker ___ ___ Python-b

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I frequently have this issue as well. My workaround is awful: I go to the terminal prompt to create an empty file with the desired name, and then open it up in IDLE to edit and save. This avoids the SaveAs dialog window that triggers the failure. This

[issue40517] Syntax highlighting for ASDL

2020-05-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Thank you all for your reviews for styling, also I have to thank https://github.com/CyberSaxosTiGER for his external reviews on the color scheme. -- ___ Python tracker ___

[issue40517] Syntax highlighting for ASDL

2020-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the contribution. It looks much nicer than what we had before. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker

[issue40517] Syntax highlighting for ASDL

2020-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b7a78ca74ab539943ab11b5c4c9cfab7f5b7ff5a by Batuhan Taskaya in branch 'master': bpo-40517: Implement syntax highlighting support for ASDL (GH-19967) https://github.com/python/cpython/commit/b7a78ca74ab539943ab11b5c4c9cfab7f5b7ff5a -

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-07 Thread Zain Said
New submission from Zain Said : What I'm currently using: Mid 2012 13'' MacBook Pro OS Catalina 10.15.4 Python 3.8.2 I'm having an issue with saving a new python program. When I go to "save as" a program python seems to freeze/not . The only way I've been able to get python working again is

[issue40541] Add optional weights parameter to random.sample()

2020-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: > How about "counts" instead of "weights"? That makes sense. -- ___ Python tracker ___ ___ Py

[issue40552] Enhance for loop and copy example in tutorial

2020-05-07 Thread Julien Palard
New submission from Julien Palard : During the past few weeks we got two reports of an example not working in the tutorial: [1], [2]. [1]: https://mail.python.org/archives/list/d...@python.org/message/ZJM3S2TE5UPFYIII5R4VQ4KY2WN4TKVO/ [2]: https://mail.python.org/archives/list/d...@python.o

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4e363761fc02a89d53aba4382dc451293bd6f0ba by Victor Stinner in branch 'master': bpo-40548: Always run GitHub action, even on doc PRs (GH-19981) https://github.com/python/cpython/commit/4e363761fc02a89d53aba4382dc451293bd6f0ba -- __

[issue40551] PRs should be rebased on top of master before running the build/tests

2020-05-07 Thread Filipe Laíns
New submission from Filipe Laíns : Let's imagine this scenario: (master history) abcd - some commit hijk - change something (pull request history) abcd - some commit defg - add feature master pull request abcd - some commit --- defg -

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-05-07 Thread Alexander Overvoorde
New submission from Alexander Overvoorde : The following program frequently raises a ProcessLookupError exception when calling proc.terminate(): ``` import threading import subprocess import multiprocessing proc = subprocess.Popen(["sh", "-c", "exit 0"]) q = multiprocessing.Queue() def comm

[issue39685] Python 3.8 regression Socket operation on non-socket

2020-05-07 Thread hillpd
hillpd added the comment: Blocking the use of stdin/stdout like this looks intentional. I have added dimaqq and asvetlov for comment. The python docs [0] indicate that the file descriptor should be a socket: "The file descriptor should refer to a socket, but this is not checked — subsequent o

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Guido van Rossum
Guido van Rossum added the comment: Aha! So the traceback module does have a difference. First, if the offset points inside the text, there's no difference: >>> raise SyntaxError("message", ("", 1, 4, "text")) Traceback (most recent call last): File "", line 1, in File "", line 1 tex

[issue40397] Refactor typing._GenericAlias

2020-05-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +19300 pull_request: https://github.com/python/cpython/pull/19984 ___ Python tracker ___

[issue40397] Refactor typing._GenericAlias

2020-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The next PR removes __args__ and __parameters__ from _SpecialGenericAlias. * No existing test is failed. It is an evidence that these attributes are not intended, but a side effect of mixing two different kinds in one class. * get_args() ignores __args__ a

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread Filipe Laíns
Filipe Laíns added the comment: > * And only then try to skip documentation-only changes Done :) -- ___ Python tracker ___ ___ Pyth

[issue40528] Improve / Clear ASDL generator

2020-05-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Next is using asdl_int_seq for all simple sum types, and not for only cmpop. Looks like it is hardcoded to use it, and I plan to refactor this in a way that might save some time in python implementation of classes (also it will solve this bug). For not conf

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread Filipe Laíns
Change by Filipe Laíns : -- pull_requests: +19299 pull_request: https://github.com/python/cpython/pull/19983 ___ Python tracker ___ _

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Guido: > I don't understand why the traceback module is implicated. The traceback module is implicated, because it currently does not allow the caret to point to a position after the error line. In format_exception_only there is the following snippet of c

[issue40178] Convert the remaining os funtions to Argument Clinic

2020-05-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40549] Convert posixmodule.c to multiphase initialization (PEP 489)

2020-05-07 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19298 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19982 ___ Python tracker ___ _

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Guido van Rossum
Guido van Rossum added the comment: For example: raise SyntaxError("message", ("", 1, 3, "text")) Traceback (most recent call last): File "", line 1, in File "", line 1 text ^ SyntaxError: message >>> (I can't find docs for the constructor of SyntaxError objects. We should upd

[issue40549] Convert posixmodule.c to multiphase initialization (PEP 489)

2020-05-07 Thread STINNER Victor
New submission from STINNER Victor : Attached PR converts posixmodule.c to multiphase initialization (PEP 489). It uses the new shiny PyType_FromModuleAndSpec() and PyType_GetModule() of the PEP 573 added by bpo-38787. The PR removes the following macro :-) #define _posixstate_global ((_posi

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: > The workaround presented at > https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/51344/highlight/true#M8157 > seems pretty reasonable. And it seems like travis is alerady doing the same > thing as it doesn't have nat

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Guido van Rossum
Guido van Rossum added the comment: I don't understand why the traceback module is implicated. It just formats the information in the SyntaxError object, same as the builtin printing for syntax errors. The key difference is always in what line/column/text is put in the SyntaxError object by

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread Filipe Laíns
Filipe Laíns added the comment: The workaround presented at https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/51344/highlight/true#M8157 seems pretty reasonable. And it seems like travis is alerady doing the same thing as it doesn't have native support

[issue39837] Make Azure Pipelines optional on GitHub PRs

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: I created a follow-up issue to have again a mandatory Windows pre-commit CI: bpo-40548. -- ___ Python tracker ___ __

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread STINNER Victor

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-07 Thread STINNER Victor
New submission from STINNER Victor : bpo-39837 made Azure Pipelines CI non-mandatory. Travis CI was made mandatory to have at least one mandatory job: https://github.com/python/core-workflow/issues/365 I would prefer to have at least one mandatory Windows CI running on Python pull requests.

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset c068b53a0ca6ebf740d98e422569d2f705e54f93 by Hai Shi in branch 'master': bpo-38787: Update structures.rst docs (PEP 573) (GH-19980) https://github.com/python/cpython/commit/c068b53a0ca6ebf740d98e422569d2f705e54f93 -- __

[issue40547] 2to3 raise can silently remove code from old 2.4 string exceptions

2020-05-07 Thread Rémy Oudompheng
New submission from Rémy Oudompheng : When running "2to3 -f raise" on the following code, which uses an old Python 2.4 raise of a string: def f(): raise ("message %s %s" % (1, 2)) try: f() finally: pass I obtain the following quite surprising result. I would have expected to get

[issue37132] Add a module for integer related math functions

2020-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: See also #40028 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-07 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- title: Inconsistencies between pegen and traceback SyntaxErrors -> Inconsistencies between PEG parser and traceback SyntaxErrors ___ Python tracker _

[issue40546] Inconsistencies between pegen and traceback SyntaxErrors

2020-05-07 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : Since traceback is programmed to match the SyntaxErrors emitted by the old parser, there are some inconsistencies between how it formats SyntaxErrors and how the new parser does it. One example for such behaviour is the following: New Parser: ╰─ ./pytho

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-07 Thread hai shi
Change by hai shi : -- pull_requests: +19296 pull_request: https://github.com/python/cpython/pull/19980 ___ Python tracker ___ ___ P

[issue40517] Syntax highlighting for ASDL

2020-05-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I've updated the PR with bold_dark_blue.png changes. -- ___ Python tracker ___ ___ Python-bugs-l

[issue38131] compile(mode='eval') uninformative error message

2020-05-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I've updated PR 17715 in order to point out exact field that error happened. Also it now only shows type >>> import ast >>> expr_without_lineno_but_ok = >>> ast.Expression(body=ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), >>> op=ast.Add())) >>> expr_wi

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: > Please don't add any setter functions, that would a major change to the VM > and would need a PEP. There is no such "major change". PyFrameObject structure was fully exposed in the public C API since the earliest Python version. I don't see how adding set

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-05-07 Thread Eric Snow
Eric Snow added the comment: New changeset a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 by Eric Snow in branch 'master': bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768) https://github.com/python/cpython/commit/a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 -- ___

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: I confirm what Victor wrote. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue40542] path environment variable not created correctly

2020-05-07 Thread Zachary Ware
Zachary Ware added the comment: Just a note to add my full support for what Steve said. PATH is frequently abused on Windows, and we only have the option at all because people become unreasonably upset if it's not there. I wouldn't be against adding a "you don't actually want this, use py.

[issue18319] gettext() cannot find translations with plural forms

2020-05-07 Thread Gilles Bassière
Gilles Bassière added the comment: Hi there, I worked on a patch for this issue (see attached pull request). I would be happy to discuss it with people involved in gettext module maintenance but I'm not sure how to contact them. Is there a dedicated mailing list or an IRC channel or somethin

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: > Why do you need to specify a `PyThreadState`? >From past issues, I understood that Julien's use case is a profiler which >inspects memory without calling functions nor switching to other threads. It's >like "dump the state of all Python threads". I'm fine

[issue40517] Syntax highlighting for ASDL

2020-05-07 Thread Zachary Ware
Zachary Ware added the comment: I say merge it :) -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Mark Shannon
Mark Shannon added the comment: Why do you need to specify a `PyThreadState`? -- ___ Python tracker ___ ___ Python-bugs-list mailin

  1   2   >