[issue34254] Include type annotations in error messages for better errors

2018-08-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the feedback on this. Brett also gave feedback on the python-ideas mailing list as below : > Two things to quickly mention: one is that type hints have no run-time > semantics, so adding them to such a critical exception would be

[issue26515] Update extending/embedding docs to new way to build modules in C

2018-08-05 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +berker.peksag type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 3.5 ___ Python tracker ___

[issue26515] Update extending/embedding docs to new way to build modules in C

2018-08-05 Thread Berker Peksag
Change by Berker Peksag : -- keywords: +patch pull_requests: +8177 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue34254] Include type annotations in error messages for better errors

2018-08-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: FWIW I am rather -1 on this. More detailed errors messages are always good, but in the proposed form it looks more like a distraction. I think just showing a fully qualified name of the function would be both more concise and more informative, since the

[issue34236] Test6012 in test_capi is not run as part of make test

2018-08-05 Thread Zackery Spytz
Change by Zackery Spytz : -- components: +Tests -Build nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34236] Test6012 in test_capi is not run as part of make test

2018-08-05 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +8176 stage: -> patch review ___ Python tracker ___ ___

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I think I could make linecache use the ResourceReader API to find the source file instead of looking in the sys.path entries. However, that's orthogonal to PR 6653: we still need PR 6653 to continue looking for the source file in the first place.

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Vlad Tudorache
Vlad Tudorache added the comment: Check the commands below and the results to see why the problem with the mouse wheel appeared: >>> a = 1 >>> a >= 0 == True False >>> (a >= 0) == True True >>> a >= (0 == True) True >>> a >= 0 == False True >>> (a >= 0) == False False >>> a >= (0 == False)

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Stefan Behnel
Stefan Behnel added the comment: > SageMath is the only project that I know which actually installs .pyx sources. Ah, right. I wrongly remembered that they are automatically included in binary packages, but that only applies to .py source of Cython compiled Python modules (which are

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I just realized the existence of https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceReader Isn't this *exactly* what we need here? -- ___ Python tracker

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > If you're OK with that, I don't see the problem. I recall that we already agreed several months ago, when I submitted https://github.com/python/cpython/pull/6653 -- ___ Python tracker

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: If you're OK with that, I don't see the problem. My objection was with the claims that ExtensionLoader.get_source shouldn't return None or shouldn't exist. PEP 302 mandates that loaders have a get_source, and that get_source should return None if the loader

[issue34339] Argument unpacking syntax for lambdas

2018-08-05 Thread danijar
danijar added the comment: Thank you! Closing this. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-08-05 Thread ppperry
Change by ppperry : -- title: float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error -> float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator ___ Python

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > One other thing I will say is that the PEP 302 APIs were seemingly designed > for working with Python source and were not necessarily oriented towards > alternative code representations that were executed That's also my impression. I'm perfectly fine with

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Now, though, we need a way for SageMath to get it working on releases up to > and including 3.7, *without* any help from Cython or CPython That's not really what I need. We already have a work-around in SageMath: try: from importlib.machinery import

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread miss-islington
miss-islington added the comment: New changeset e610c4f9984d50b45eb00e04c73c4208c0542a3b by Miss Islington (bot) in branch '3.7': bpo-34336: Don't promote possibility to leave out typing.Optional (GH-8677) https://github.com/python/cpython/commit/e610c4f9984d50b45eb00e04c73c4208c0542a3b

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > So, where is the filename coming from? Python 3.7.0 (default, Jul 23 2018, 10:07:21) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from sage.all import Integer >>> try: ... Integer(1)/Integer(0)

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread miss-islington
miss-islington added the comment: New changeset 02c4eae35cd24ab71c12b5e61ec22e993ac4839b by Miss Islington (bot) in branch '3.6': bpo-34336: Don't promote possibility to leave out typing.Optional (GH-8677) https://github.com/python/cpython/commit/02c4eae35cd24ab71c12b5e61ec22e993ac4839b

[issue34339] Argument unpacking syntax for lambdas

2018-08-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think this is an explicit decision to remove it in Python 3 unless I am mistaking the syntax you are referring to. Please refer : https://www.python.org/dev/peps/pep-3113/ . A note on 2to3 to fix this :

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: On Sun, 5 Aug 2018 at 18:10, Brett Cannon wrote: > One other thing I will say is that the PEP 302 APIs were seemingly designed > for working with Python source and were not necessarily oriented towards > alternative code representations that were executed, e.g.

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Brett Cannon
Brett Cannon added the comment: On Sun, Aug 5, 2018, 08:55 Nick Coghlan, wrote: > > Nick Coghlan added the comment: > > While I'd be inclined to agree with Paul's analysis if CPython were a > greenfield project, I also think if SageMath had already been ported to > Python 3.2, we would have

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +8174 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +8175 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34340] mimetypes libmagic compatibility

2018-08-05 Thread bpypy
New submission from bpypy : An obvious use case for mimetypes would be to check if file has correct mimetype, by getting the type with some of libmagic wrappers, and then comparing to guess_type result. But it seems that they don't always match. One example: applicattion/rar vs

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 336c945858055059a65134d4c501a85037d70d99 by Ivan Levkivskyi (Ville Skyttä) in branch 'master': bpo-34336: Don't promote possibility to leave out typing.Optional (#8677)

[issue34339] Argument unpacking syntax for lambdas

2018-08-05 Thread danijar
New submission from danijar : It would be great to support argument unpacking for lambdas. Example: lambda x, (y, z): x + y + z instead of lambda x, y_and_z: x + y_and_z[0] + y_and_z[1] Similar unpacking syntax is available for normal functions: def foo(x, y_and_z): y, z =

[issue34338] abstractmethod can run on classes

2018-08-05 Thread Michael Hooreman
New submission from Michael Hooreman : Hello, When I decorate a class method with abc.abstractmethod, and I call it from the class (not the instance), the call is successful. It looks like ID 5867 which was closed years ago. See

[issue34247] PYTHONOPTIMIZE ignored in 3.7.0 when using custom launcher

2018-08-05 Thread Nick Coghlan
Nick Coghlan added the comment: My comment wasn't about the 3.7.0 -> 3.7.1 fix, but rather about the fact that I suspect that 3.7.1 is now going to respect some environment variables in this case that 3.6.x ignored. I don't know for sure though, since we didn't have a test case for this

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Nick Coghlan
Nick Coghlan added the comment: While I'd be inclined to agree with Paul's analysis if CPython were a greenfield project, I also think if SageMath had already been ported to Python 3.2, we would have considered this change a behavioural regression between 3.2 and 3.3 resulting from the

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Vlad Tudorache
Vlad Tudorache added the comment: In fact, if the first click before dragging takes place in the upper half of the scrollbar slider, the click is not received nor the drag after. Is like the scroll slider is translated down with half of the slider length (that's why I can drag the slider

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Vlad Tudorache
Vlad Tudorache added the comment: With: up = {EventType.MouseWheel: (event.delta >= 0) == darwin, EventType.Button: (event.num == 4)} in editor.py at 461-462 I don't see bugs #1 neither #3 on 3.7.0 but I'll try with other files. -- ___

[issue34319] Clarify pathlib.Path("filepath").read_text()

2018-08-05 Thread Sanyam Khurana
Sanyam Khurana added the comment: +1 to Terry's suggestion. I've reviewed xtreak's PR and it looks good to me. -- nosy: +CuriousLearner ___ Python tracker ___

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: So, where is the filename coming from? Looking at exception and frame objects, I don't see a "source filename" attribute anywhere - have I missed something here? -- ___ Python tracker

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > The one possible fly in the ointment is if there are use cases that we need to support where a single .so/.pyd file is built from *multiple* source files, as get_source doesn't allow for that. Yes, we must support that. A cython module may have multiple

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +8173 stage: test needed -> patch review ___ Python tracker ___ ___

[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error

2018-08-05 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Tal Einat
Tal Einat added the comment: Yes! Vlad's fix resolves the "sticks at bottom of file" bug for me on macOS. It also resolves #2 in my list of additional bugs, regarding scrolling direction. With both 3.7.0 and current master, I still see additional bugs #1 and #3, i.e. issues dragging the

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Vlad Tudorache
Vlad Tudorache added the comment: The solution was very simple on my Mac. In /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py, lines 461-462 should be: up = {EventType.MouseWheel: (event.delta >= 0) == darwin, EventType.Button: event.num == 4} instead

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-05 Thread Vlad Tudorache
Vlad Tudorache added the comment: Having 3.6.5 and 3.7.0 with Tcl/Tk 8.6.8, try to File->Open Module and open ssl module. On 3.6 everything is fine, on 3.7 the scroller sticks at the bottom. A Tk text widget with the same amount of lines shows no problem. Apple macOS 17.7.0 with 64 bit

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: On Sun, 5 Aug 2018 at 06:51, Stefan Behnel wrote: > This whole idea looks backwards and complicated. As Brett noted, .pyc files > were moved out of the source tree, because they are build time artifacts and > not sources. With that analogy, it's the .so files

[issue34247] PYTHONOPTIMIZE ignored in 3.7.0 when using custom launcher

2018-08-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher -> PYTHONOPTIMIZE ignored in 3.7.0 when using custom launcher ___ Python tracker

[issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher

2018-08-05 Thread STINNER Victor
STINNER Victor added the comment: On my PR, Nick Coghlan wrote: "We may want to tweak the porting note in What's New, as I believe this may read more environment variables at init time than the interpreter did previously, so embedding applications that want more complete control may now

[issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher

2018-08-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0c90d6f75931da4fec84d06c2efe9dd94bb96b77 by Victor Stinner in branch '3.7': [3.7] bpo-34247: Fix Python 3.7 initialization (#8659) https://github.com/python/cpython/commit/0c90d6f75931da4fec84d06c2efe9dd94bb96b77 --

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Keeping two identical package structures in different places, one for .py > files and generated .so files, and one for Cython source files (.pyx, .pxd, > .pxi), is not desirable from a user perspective, and would require namespace > packages for the

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Nick: do you agree that this "source-only metapath" should by default contain an entry to look in sys.path for source files? -- ___ Python tracker

[issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6

2018-08-05 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: rejected -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6

2018-08-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Yu, I am going to close this issue because 1. there is no master-dirty branch 2. your hash commit: d17fe275a3 does not exist in the CPython repository 3. I just downloaded the last revision of CPython and compile it on a 10.13.4 OSX and I don't have your

[issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6

2018-08-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Could you retry with a make distclean && ./configure --with-debug && make ? To be sure. -- nosy: +matrixise ___ Python tracker ___

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > In a subdirectory similar to __pycache__. I thought about that, but I don't like the idea because then the directory structure of the actual sources would be different from the directory structure of the installed sources. So for example, how should "pip

[issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6

2018-08-05 Thread Xiang Zhang
Xiang Zhang added the comment: I could not find the specific commit you mentioned on master branch. Maybe you are on a customized branch(what is master-dirty)? -- nosy: +xiang.zhang ___ Python tracker

[issue34337] Fail to get a right answer for 1.2%0.2

2018-08-05 Thread Mark Dickinson
Mark Dickinson added the comment: This isn't a bug: in short, you're evaluating a discontinuous function very close to a discontinuity; the errors inherent in floating-point arithmetic put you the "wrong" side of the discontinuity. Or more simply, with binary floating-point, What You See Is

[issue34337] Fail to get a right answer for 1.2%0.2

2018-08-05 Thread Yiwei Guo
New submission from Yiwei Guo : the answer of 1.2%0.2 should be zero -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34337] Fail to get a right answer for 1.2%0.2

2018-08-05 Thread Yiwei Guo
Change by Yiwei Guo : -- components: Tests nosy: qq100460045 priority: normal severity: normal status: open title: Fail to get a right answer for 1.2%0.2 type: compile error versions: Python 3.6 ___ Python tracker

[issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher

2018-08-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: The PR works for me as well, and looks ok to me. -- ___ Python tracker ___ ___ Python-bugs-list

[issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-08-05 Thread Tal Einat
Tal Einat added the comment: I can confirm the these issues do *not* occur on my macOS setup when using tcl/tk 8.6.8 built from source. -- ___ Python tracker ___

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread Tal Einat
Change by Tal Einat : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread Tal Einat
Change by Tal Einat : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread miss-islington
miss-islington added the comment: New changeset 2474cef34cd50e603c674c4856a17e3da4af71b3 by Miss Islington (bot) in branch '3.6': bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683)

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread Ville Skyttä
Change by Ville Skyttä : -- keywords: +patch pull_requests: +8172 stage: -> patch review ___ Python tracker ___ ___

[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

2018-08-05 Thread Ville Skyttä
New submission from Ville Skyttä : The documentation of typing.Optional seems to promote practices for not specifying Optional that are recommended against in PEP 484: https://www.python.org/dev/peps/pep-0484/#union-types -- end of chapter recommends against inferring Optional.

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread miss-islington
miss-islington added the comment: New changeset e65ec491fbaa14db61a6559eb269733616b0e7f0 by Miss Islington (bot) in branch '3.7': bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683)

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +8170 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +8171 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-08-05 Thread Tal Einat
Tal Einat added the comment: New changeset 87e59ac11ee074b0dc1bc864c74fac0660b27f6e by Tal Einat in branch 'master': bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683) https://github.com/python/cpython/commit/87e59ac11ee074b0dc1bc864c74fac0660b27f6e