[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Cheryl Sabella
New submission from Cheryl Sabella : Add unit tests for pyparse.py in IDLE. -- assignee: terry.reedy components: IDLE messages: 312352 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Add tests for pyparse type: enhancement

[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: I also moved existing comments in pyparse.py to be docstrings. Adding the tests revealed a bug in the initialization of self.lastopenbracketpos, but I didn't make any changes to fix it. With the bug, the tests weren't repeatable, so I

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
On Mon, 19 Feb 2018 12:32:49 +, Rhodri James wrote: > On 18/02/18 16:18, Wildman via Python-list wrote: >>> But that's only going to show one (uplink) address. If I needed to get >>> ALL addresses for ALL network adapters, I'd either look for a library, >>> and if one wasn't easily found, I'd

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Chris Angelico
On Mon, Feb 19, 2018 at 11:35 PM, bartc wrote: > Sometimes, the reason for creating a special numerical type is precisely so > you can't do arithmetic on them, if it's not meaningful for the type. > > So the special type of the values 65..90 might not allow the type be >

[issue32873] Pickling of typing types

2018-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I think it would be nice it would be pickled by name so the pickles are compatible between Python versions. What would we do for List[int]? How are regular ABCs pickled? -- ___ Python tracker

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Marko Rauhamaa
Paul Moore : > I'm curious - How would you explain Python's "variables" to someone > who knows how C variables work, in a way that ensures they don't carry > across any unfortunate misconceptions based on how C works? Just say that 1. Every Python variable is of the type

[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-02-19 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +5534 stage: needs patch -> patch review ___ Python tracker ___

[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-02-19 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower ___ Python tracker ___ ___

Re: Python 2 to 3 Conversion

2018-02-19 Thread Chris Angelico
On Mon, Feb 19, 2018 at 11:32 PM, Rhodri James wrote: > On 18/02/18 16:18, Wildman via Python-list wrote: >>> >>> But that's only going to show one (uplink) address. If I needed to get >>> ALL addresses for ALL network adapters, I'd either look for a library, >>> and if one

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Anders Wegge Keller
På Mon, 19 Feb 2018 15:15:19 + (UTC) Steven D'Aprano skrev: > On Mon, 19 Feb 2018 14:06:36 +0100, Anders Wegge Keller wrote: > > > Array is not even close to providing a strongly typed container. > > That's a mighty powerful claim that goes against

[issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage

2018-02-19 Thread Steve Dower
Steve Dower added the comment: Eryk's solution seems to be best, so I'll add that. -- assignee: -> steve.dower versions: +Python 3.8 ___ Python tracker

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Ned Batchelder
On 2/19/18 10:39 AM, Paul Moore wrote: On 19 February 2018 at 15:18, Ned Batchelder wrote: On 2/19/18 9:54 AM, Steven D'Aprano wrote: On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote: [1] The most basic question, which people making such claims often can't

[issue32854] Add ** Map Unpacking Support for namedtuple

2018-02-19 Thread Jay Crotts
Jay Crotts added the comment: Thanks Raymond, I wasn't sure if it was a common pattern or not, that makes sense. -- ___ Python tracker

[issue32875] Add __exit__() method to event loops

2018-02-19 Thread Victor Porton
New submission from Victor Porton : Please add `__exit__()` method to event loops, to use them with `with`. -- components: asyncio messages: 312360 nosy: asvetlov, porton, yselivanov priority: normal severity: normal status: open title: Add __exit__() method to event

[issue32872] backport of #32305 causes regressions in various packages

2018-02-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Paul Moore
On 19 February 2018 at 17:11, Ned Batchelder wrote: > On 2/19/18 10:39 AM, Paul Moore wrote: >> >> I'm curious - How would you explain Python's "variables" to someone >> who knows how C variables work, in a way that ensures they don't carry >> across any unfortunate

[issue32872] backport of #32305 causes regressions in various packages

2018-02-19 Thread Ned Deily
Ned Deily added the comment: Now that we know that this change *does* break some existing code, I think it is worth having that talk as mentioned in PR 5481: "I suppose it's possible that this will break existing code, but I'd argue that because current behavior runs counter

[issue31937] Add the term "dunder" to the glossary

2018-02-19 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage

2018-02-19 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +5535 stage: needs patch -> patch review ___ Python tracker ___

Re: How to run script from interpreter?

2018-02-19 Thread windhorn
On Saturday, February 17, 2018 at 8:50:48 AM UTC-6, Steven D'Aprano wrote: > > For me, the tool I use is a set of re-usable tools: > > - a text editor; > - a system command prompt in a terminal/console window; > - a Python REPL for running code snippets and looking up help(obj). > > Other

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
On Tue, 20 Feb 2018 02:26:19 +1100, Chris Angelico wrote: > * Opaque IOCTLs Would you mind to elaborate a little about your concerns? -- GNU/Linux user #557453 "There are only 10 types of people in the world... those who understand Binary... and those who don't." -Spike --

Re: Python 2 to 3 Conversion

2018-02-19 Thread Chris Angelico
On Tue, Feb 20, 2018 at 3:49 AM, Wildman via Python-list wrote: > On Mon, 19 Feb 2018 12:32:49 +, Rhodri James wrote: > >> On 18/02/18 16:18, Wildman via Python-list wrote: But that's only going to show one (uplink) address. If I needed to get ALL addresses

[issue32872] backport of #32305 causes regressions in various packages

2018-02-19 Thread Ned Deily
Change by Ned Deily : -- priority: critical -> release blocker ___ Python tracker ___ ___

Re: Python 2 to 3 Conversion

2018-02-19 Thread Chris Angelico
On Tue, Feb 20, 2018 at 3:53 AM, Wildman via Python-list wrote: > On Tue, 20 Feb 2018 02:26:19 +1100, Chris Angelico wrote: > >> * Opaque IOCTLs > > Would you mind to elaborate a little about your > concerns? Look at your original code: it's impossible to figure out what

[issue32566] Not able to run Python 3.6 on Windows

2018-02-19 Thread Steve Dower
Change by Steve Dower : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32877] Login to bugs.python.org with Google account NOT working

2018-02-19 Thread ruffsl
New submission from ruffsl : I've been unable to login to bugs.python.org using Google's oauth. After clicking the google oauth logo on the sidebar on bugs.python.org, I am either slowly redirected to a google login page (after about 1 min) to select an account, then

[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: My only contact with pyparse has been #21765, which modified hyperparser and pyparse to support unicode identifiers. It also added tests for hyperparser, but not pyparse (msg223150: "it seems to be working as expected"). Thanks for

[ANN] Biovarase ver 2

2018-02-19 Thread Beppe
Biovarase has been updated to version 2, The project has been migrated from python 2.7 to python 3.5 Biovarase is an application to manage clinical quality control data. The purpose of Quality Control Assurance in a clinical laboratory is to allow the control of the performances of an

How to link to python 3.6.4 library on linux ?

2018-02-19 Thread Jason Qian via Python-list
Hi, I am calling python from a c application. It compiles and works fine on the windows. How do I compile and link it on the linux for Python 3.6.4 ? Under python dir, it only have a static library, /opt/Python-3.6.4*/lib*/*libpython3.6m.a* * If I link to it, I

Re: [ANN] Biovarase ver 2

2018-02-19 Thread Chris Angelico
On Tue, Feb 20, 2018 at 8:45 AM, Beppe wrote: > > Biovarase has been updated to version 2, > > The project has been migrated from python 2.7 to python 3.5 > > Biovarase is an application to manage clinical quality control data. > > The purpose of Quality Control

Re: How to link to python 3.6.4 library on linux ?

2018-02-19 Thread Chris Angelico
On Tue, Feb 20, 2018 at 8:07 AM, Jason Qian via Python-list wrote: > Hi, > > I am calling python from a c application. > It compiles and works fine on the windows. How do I compile and link > it on the linux for Python 3.6.4 ? > > Under python dir, it

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

2018-02-19 Thread Zachary Ware
Zachary Ware added the comment: Looks like macOS rather than Windows, and I can't reproduce it locally with current master: 14:28 $ ./python.exe -m test -R3:3 test_multiprocessing_fork Run tests sequentially 0:00:00 load avg: 2.68 [1/1] test_multiprocessing_fork

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

2018-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: FYI I found out about this refleak from https://mail.python.org/pipermail/python-checkins/2018-February/153907.html So it's definitely not Mac OS X specific thing. -- ___ Python tracker

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

2018-02-19 Thread Zachary Ware
Zachary Ware added the comment: I'm pretty sure that report is still running on the last changeset on hg.python.org; can you confirm that Antoine? -- nosy: +pitrou ___ Python tracker

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington
miss-islington added the comment: New changeset ef0bb5c7b76a49a5f3c5b85b5f9112cfefe54328 by Miss Islington (bot) in branch '3.6': bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2018-02-19 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington
miss-islington added the comment: New changeset 622a824802771fc5aa133ae92101bc8303360294 by Miss Islington (bot) in branch '3.7': bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)

Re: Help on convert PyObject to string (c) Python 3.6

2018-02-19 Thread Jason Qian via Python-list
Thanks a lot and I will take a look Cython, On Mon, Feb 19, 2018 at 3:23 PM, Stefan Behnel wrote: > Jason Qian via Python-list schrieb am 04.02.2018 um 17:52: > >This is the case of calling python from c and the python function > will > > return a string. > > Hi Jason,

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

2018-02-19 Thread pmpp
Change by pmpp : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30439] Expose the subinterpreters C-API in the stdlib.

2018-02-19 Thread pmpp
Change by pmpp : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Marko Rauhamaa
Ned Batchelder : > I guess I'll have to continue to grit my teeth as people say, "Python > doesn't have variables."   Why can't we say, "Python's variables work > differently than other languages"? Because they don't? Marko --

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Chris Angelico
On Tue, Feb 20, 2018 at 12:34 AM, Steven D'Aprano wrote: > On Mon, 19 Feb 2018 20:14:32 +1100, Chris Angelico wrote: > >> As an integer, 3.141590 is 107853 $ >> >> Looks to me like C is perfectly happy to interpret a float as an int. > > Yes, but that's

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Paul Moore
On 19 February 2018 at 15:18, Ned Batchelder wrote: > On 2/19/18 9:54 AM, Steven D'Aprano wrote: >> >> On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote: >> >>> [1] The most basic question, which people making such claims often can't >>> answer, is "Do you mean that

[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +5533 stage: -> patch review ___ Python tracker ___

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you for checking. If this issue happens even when Python is run manually from an ordinary shell, fixing it in the same way as in #30225 is probably not what you want because while the error message will be gone the corresponding

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread Zachary Ware
Zachary Ware added the comment: New changeset 5537646bfacec463b450871dde31cb06c44a0556 by Zachary Ware in branch 'master': bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +5538 ___ Python tracker ___

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +5537 ___ Python tracker ___

[issue32876] HTMLParser raises exception on some inputs

2018-02-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ezio.melotti ___ Python tracker ___ ___

Re: c code generator from python

2018-02-19 Thread Stefan Behnel
bhattacharya.kush...@gmail.com schrieb am 17.01.2018 um 12:03: > Is there any python framework or any tool as which can generate C code from > python code as it is . http://cython.org/ Stefan -- https://mail.python.org/mailman/listinfo/python-list

[issue32872] backport of #32305 causes regressions in various packages

2018-02-19 Thread Brett Cannon
Brett Cannon added the comment: I'm personally fine if the change gets reverted. I don't think the odd behaviour is severe enough to justify breaking projects in a maintenance release. Besides, they will learn soon enough about their code breaking in Python 3.7. --

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

2018-02-19 Thread Eric Snow
Eric Snow added the comment: I'm not seeing any refleak (on linux/clang). I'm guessing this is Windows-specific (based on use of "./python.exe"). How does test_multiprocessing_fork even run on Windows? I thought "fork" is an unsupported start method on Windows

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

2018-02-19 Thread Eric Snow
Eric Snow added the comment: Davin, any thoughts on how my most recent commit (for this issue) might be causing the leaks Yury found? -- nosy: +davin ___ Python tracker

Re: Help on convert PyObject to string (c) Python 3.6

2018-02-19 Thread Stefan Behnel
Jason Qian via Python-list schrieb am 04.02.2018 um 17:52: >This is the case of calling python from c and the python function will > return a string. Hi Jason, I noticed that you ran into a couple of problems using the C-API, so I suggest looking into Cython instead. It basically translates

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Ned Batchelder
On 2/19/18 1:01 PM, Paul Moore wrote: On 19 February 2018 at 17:11, Ned Batchelder wrote: On 2/19/18 10:39 AM, Paul Moore wrote: I'm curious - How would you explain Python's "variables" to someone who knows how C variables work, in a way that ensures they don't carry

[issue32820] Add bits method to ipaddress

2018-02-19 Thread Eric Osborne
Eric Osborne added the comment: I brought it up on python-ideas. Since I've not been through this process before - what happens now? Do I wait for code review on github, or is there more I need to do? eric On Tue, Feb 13, 2018 at 11:56 PM Nick Coghlan

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

2018-02-19 Thread Eric Snow
Eric Snow added the comment: @Yury, thanks! I thought I had checked before I made the PR, but apparently not. I'll git it fixed. -- ___ Python tracker

[issue32876] HTMLParser raises exception on some inputs

2018-02-19 Thread Hanno Boeck
New submission from Hanno Boeck :

I noticed that the HTMLParser will raise an exception on some inputs.
I'm not sure what the expectations here are, but given that real-world HTML 
often contains all kinds of broken content I would assume an HTMLParser to 
always try to 

[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread Zachary Ware
Change by Zachary Ware : -- pull_requests: +5536 ___ Python tracker ___ ___

[issue32878] Document value of st_ino on Windows

2018-02-19 Thread Guido van Rossum
New submission from Guido van Rossum : We received a report from a well-meaning security researcher who was confused by the non-zero and arbitrary value of st_ino in stat() results on Windows (where in Python 2 this was always zero). The researcher was worried that this was

Re: [ANN] Biovarase ver 2

2018-02-19 Thread Beppe
Il giorno lunedì 19 febbraio 2018 23:02:43 UTC+1, Chris Angelico ha scritto: > On Tue, Feb 20, 2018 at 8:45 AM, Beppe wrote: > > > > Biovarase has been updated to version 2, > > > > The project has been migrated from python 2.7 to python 3.5 > > > > Biovarase is an

[issue32873] Pickling of typing types

2018-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I'm honestly not too concerned about what happens with List[int] (though doing a sensible thing here is not wrong :-), but I feel strongly that a pickle containing a reference to typing.List should be compatible between Python 3.6 and 3.7.

[issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname

2018-02-19 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +5539 stage: needs patch -> patch review ___ Python tracker ___

[issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname

2018-02-19 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower stage: patch review -> needs patch versions: +Python 3.7 ___ Python tracker

[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode

2018-02-19 Thread Steve Dower
Steve Dower added the comment: I took another look at this and it's still unclear whether it's worth the performance loss. Perhaps moving fsencode and fsdecode (almost) entirely into C would be a better approach? That shouldn't send us backwards at all, and all they

[issue32876] HTMLParser raises exception on some inputs

2018-02-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: The stdlib HTML parser requires correct HTML. To parse broken HTML, as you find in the real world, you need a third-party library like BeautifulSoup. BeautifulSoup is much more complex (about 7-8 times as many LOC) but can handle

[issue32876] HTMLParser raises exception on some inputs

2018-02-19 Thread Hanno Boeck
Hanno Boeck added the comment: Actually BeautifulSoup also uses the python html parser in the backend, so it has the same problem. (It can use alternative backends, but the python parser is the default and they also describe it as "lenient", which I would interpret as "it

<    1   2