[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-02 Thread Chris Withers
Chris Withers added the comment: New changeset 7561e7a83f5118fda6c62fe9c8c3458f8cfd by Miss Islington (bot) in branch '3.7': bpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescription (GH-18321)

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +17694 pull_request: https://github.com/python/cpython/pull/18321 ___ Python tracker ___

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +17695 pull_request: https://github.com/python/cpython/pull/18322 ___ Python tracker ___

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-02 Thread Chris Withers
Chris Withers added the comment: New changeset 032de7324e30c6b44ef272cea3be205a3d768759 by Steve Cirelli in branch 'master': bpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescription (GH-18175)

lxml - minor problem appending new element

2020-02-02 Thread Frank Millman
Hi all I usually send lxml queries to the lxml mailing list, but it appears to be not working, so I thought I would try here. This is a minor issue, and I have found an ugly workaround, but I thought I would mention it. In Python I can iterate through a list, and on a certain condition

[issue37224] test__xxsubinterpreters fails randomly

2020-02-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +17693 pull_request: https://github.com/python/cpython/pull/18318 ___ Python tracker ___

[issue39533] Use `statx(2)` system call on Linux for extended `os.stat` information

2020-02-02 Thread ntninja
New submission from ntninja : Background: For a long time several Linux filesystems have been tracking two extra bits of information. The file attributes bits[1] and the file creation time (aka crtime aka btime aka birthtime)[2]. Before Linux 4.11 accessing these required secret knowledge

[issue39515] pathlib won't strip "\n" in path

2020-02-02 Thread 徐彻
徐彻 added the comment: Thank you for your explanation. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-02 Thread Tim Peters
Tim Peters added the comment: [Tim] >> The pure-Python Miller-Rabin code i posted in the >> aforementioned thread is typically at least 100 >> times faster than that. [Steven] > This is exactly the sort of argument about quality of > implementation which isn't, or shouldn't be, part of > the

The source of the PSL*

2020-02-02 Thread DL Neil via Python-list
Is there a set location for PSL project repos? (it used to be GitHub, and before that, Google) I'd like to review some serious PyTest/Unittest examples, eg as are applied to familiar (Python source) library members... * should be easier to find than was the source of the Nile (by Europeans)

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: > [Steven] > > ... Try it on numbers like this: > > ... > > Q = P*(313*(P-1)+1)*(353*(P-1)+1) > > > > Q is a 397 digit Carmichael Number. Its smallest factor is P, > > which has 131 digits. [Tim] > The pure-Python Miller-Rabin code i posted in the

Re: Please answer fast.....

2020-02-02 Thread Abdur-Rahmaan Janhangeer
CSV as data entry with " " is a pain. > > -- https://mail.python.org/mailman/listinfo/python-list

[issue39532] Pathlib: handling of `.` in paths and patterns creates unmatchable paths

2020-02-02 Thread Isaac Muse
Isaac Muse added the comment: The more I think about this, I think the normalization of paths is actually fine, it is the normalization of the patterns that is problematic, or more the difference in normalization. I could live with the pattern normalization of `.` and trailing `/` if it was

[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-02-02 Thread Kyle Stanley
Kyle Stanley added the comment: > Thank you very muck, Kyle! No problem. Thanks for reviewing and merging the PR, Antoine! -- ___ Python tracker ___

[issue39532] Pathlib: handling of `.` in paths and patterns creates unmatchable paths

2020-02-02 Thread Isaac Muse
New submission from Isaac Muse : It appears that the pathlib library strips out `.` in glob paths when they represent a directory. This is kind of a naive approach in my opinion, but I understand what was trying to be achieved. When a path is given to pathlib, it normalizes it by stripping

Re: JavaScript's void operator in Python?

2020-02-02 Thread Jon Ribbens via Python-list
On 2020-02-02, Stefan Ram wrote: > Jon Ribbens writes: >>Why does it matter if the return value is None? > > In a lambda, a return value of None sometimes would be > convenient as by convention it indicates that the return > value does not carry any information and the function is >

Re: JavaScript's void operator in Python?

2020-02-02 Thread Jon Ribbens via Python-list
On 2020-02-02, Stefan Ram wrote: > Greg Ewing writes: >>If the functions you're calling all return None, you can >>do this: >> >>> print(2); print(3) > > »print(2); print(3)« is not an expression anymore but an stmt_list. > It cannot be used in all places where an expression is allowed. Why

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-02 Thread Jeremy Kloth
Jeremy Kloth added the comment: +1, obviously, as I came to the same conclusion above (see msg361122) -- ___ Python tracker ___

Re: JavaScript's void operator in Python?

2020-02-02 Thread Greg Ewing
On 3/02/20 3:38 am, Stefan Ram wrote: void( ( print( 2 ), print( 3 ))) If the functions you're calling all return None, you can do this: >>> print(2); print(3) 2 3 -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Random idea (not carefully thought-out): Would it be simpler to have these objects just ignore their refcount by having dealloc() be a null operation or having it set the refcount back to a positive number). That would let sub-interpreters share the

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is the sub-interpreter PEP approved? If not, I had thought the plan was to only implement PRs that made clean-ups that would have been necessary anyway. -- nosy: +rhettinger ___ Python tracker

Re: Please answer fast.....

2020-02-02 Thread DL Neil via Python-list
On 3/02/20 7:05 AM, Abdur-Rahmaan Janhangeer wrote: ... suggest you put names, birthday in csv the load csv for each row: layout.addWidget(QLabel) On Sun, 2 Feb 2020, 21:21 Souvik Dutta, wrote: Because i want to show the name and date of 40 persons and their birthdays. Why csv?

[issue39492] reference cycle affecting Pickler instances (Python3.8+)

2020-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 17236873392533ce0c5d7bbf52cbd61bca171c59 by Antoine Pitrou in branch '3.8': [3.8] bpo-39492: Fix a reference cycle between reducer_override and a Pickler instance (GH-18266) (#18316)

[issue39492] reference cycle affecting Pickler instances (Python3.8+)

2020-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: Please answer fast.....

2020-02-02 Thread Abdur-Rahmaan Janhangeer
Ah ok. suggest you put names, birthday in csv the load csv for each row: layout.addWidget(QLabel) On Sun, 2 Feb 2020, 21:21 Souvik Dutta, wrote: > Because i want to show the name and date of 40 persons and their birthdays. > > On Sun, Feb 2, 2020, 10:42 PM Abdur-Rahmaan Janhangeer < >

Re: Pyqt5 help

2020-02-02 Thread Alan Gauld via Python-list
On 01/02/2020 12:06, Souvik Dutta wrote: > not happening. Now the no. Of labels depend upon something, so I decided to > use a for loop which is not working. Attaching the code below. Can you help? I just spotted something else odd in your code: def initUi(self): ... self.n =

Re: Please answer fast.....

2020-02-02 Thread Abdur-Rahmaan Janhangeer
I'm 100% ready to answer your question, just add some more details like why you need 40 labels. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyqt5 help

2020-02-02 Thread Alan Gauld via Python-list
On 01/02/2020 12:06, Souvik Dutta wrote: > I was making a pyqt5 project and I ran into a problem. I want a button in > one window to add a label in another window when clicked upon. But that is > not happening. What is happening? Don't expect us to run your buggy code! > Now the no. Of labels

My Python programming book for kids is free for 48 hours

2020-02-02 Thread Kent Tong
Hi, If you're interested, please get it for free at: https://www.amazon.com/Yes-Kids-can-learn-Python-ebook/dp/B084CY2L43/ref=sr_1_3 This is a set of training materials I used to successfully teach Python to kids as little as 10 years old. The online learning environment are freely available

[issue39492] reference cycle affecting Pickler instances (Python3.8+)

2020-02-02 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +17692 pull_request: https://github.com/python/cpython/pull/18316 ___ Python tracker ___

[issue39531] Memory Leak in multiprocessing.Pool()

2020-02-02 Thread EMO
New submission from EMO : After even deleting all variables it still reserves memory of around a GB. -- components: Library (Lib) files: User's.py messages: 361253 nosy: EMO priority: normal severity: normal status: open title: Memory Leak in multiprocessing.Pool() type: behavior

[issue39492] reference cycle affecting Pickler instances (Python3.8+)

2020-02-02 Thread miss-islington
miss-islington added the comment: New changeset 0f2f35e15f9fbee44ce042b724348419d8136bc5 by Pierre Glaser in branch 'master': bpo-39492: Fix a reference cycle between reducer_override and a Pickler instance (GH-18266)

Re: JavaScript's void operator in Python?

2020-02-02 Thread Python
Stefan Ram wrote: Jon Ribbens writes: On 2020-02-02, Stefan Ram wrote: void( ( print( 2 ), print( 3 ))) 2 3 I'm not sure why you'd want to - but "None and foo" is an expression that will return None regardless of the value of "foo". Yes, but it also does not evaluate the second

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-02 Thread Tim Peters
Tim Peters added the comment: [Steven] > ... Try it on numbers like this: > ... > Q = P*(313*(P-1)+1)*(353*(P-1)+1) > > Q is a 397 digit Carmichael Number. Its smallest factor is P, > which has 131 digits. > ... > My old and slow PC can prove that Q is a composite number, > using pure Python,

[issue35885] configparser: indentation

2020-02-02 Thread SilentGhost
SilentGhost added the comment: I would suggest adding indent parameter to the write method, it would default to an empty string and could be used directly in the formatting operation. -- nosy: +SilentGhost ___ Python tracker

[issue39529] Deprecate get_event_loop()

2020-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is what I meant. Many code written before 3.7 use get_event_loop() because there was no get_running_loop() yet. Now, to avoid deprecation (and making the code more robust) it should be rewritten with using get_running_loop() or get_event_loop()

Re: PyQt5 help on buttons and grid layout

2020-02-02 Thread Abdur-Rahmaan Janhangeer
d = {} layout = ... for key in d: layout.addWidget(QButton(...)) On Sun, 2 Feb 2020, 19:59 Souvik Dutta, wrote: > Hi, > I want to add about 40 buttons based upon a dictionary. I want them to be > added to a grid layout. How can I do it easily. Please write the code and > thank you for

Re: App made with pyinstaller is not running on another computer.

2020-02-02 Thread Abdur-Rahmaan Janhangeer
recompile with the latest dev versio of pyinstaller, fixed my issue. On Sun, 2 Feb 2020, 19:55 Souvik Dutta, wrote: > Hi, > I made an executable file with pyinstaller on my pc which had python 3.7. > It ran well in my pc but when I tried to run it on my friend computer > having a 32 bit

[issue39529] Deprecate get_event_loop()

2020-02-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- components: +asyncio nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39529] Deprecate get_event_loop()

2020-02-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Serhiy, maybe I had not understood your proposal properly. If you are asking about deprecating get_event_loop() call from outside of async code but implicit call get_running_loop() without a warning if called from async function -- it sounds like a

[issue39529] Deprecate get_event_loop()

2020-02-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Currently, I'm talking about adding a deprecation only. The asyncio.get_event_loop() function will stay in Python for a while in deprecated status. I don't know the exact period but it should be 3 releases at least I guess, with possibly extending to 5

[issue39524] Escape sequences in doc string of ast._pad_whitespace

2020-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: I think this would be an improvement, and an good issue for a newcomer. I'd vote for the r-string, but it doesn't really matter. -- keywords: +easy, newcomer friendly nosy: +eric.smith stage: -> needs patch ___

[issue39529] Deprecate get_event_loop()

2020-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Will asyncio.get_event_loop() be removed or made an alias of asyncio.get_running_loop()? The latter could minimize the disruption of the existing code. -- nosy: +serhiy.storchaka ___ Python tracker

Re: App made with pyinstaller is not running on another computer.

2020-02-02 Thread Chris Angelico
On Mon, Feb 3, 2020 at 2:57 AM Souvik Dutta wrote: > > Hi, > I made an executable file with pyinstaller on my pc which had python 3.7. > It ran well in my pc but when I tried to run it on my friend computer > having a 32 bit windows 10 os it didn't run it is just saying that "this > app cannot be

PyQt5 help on buttons and grid layout

2020-02-02 Thread Souvik Dutta
Hi, I want to add about 40 buttons based upon a dictionary. I want them to be added to a grid layout. How can I do it easily. Please write the code and thank you for your trouble. -- https://mail.python.org/mailman/listinfo/python-list

App made with pyinstaller is not running on another computer.

2020-02-02 Thread Souvik Dutta
Hi, I made an executable file with pyinstaller on my pc which had python 3.7. It ran well in my pc but when I tried to run it on my friend computer having a 32 bit windows 10 os it didn't run it is just saying that "this app cannot be run on your pc". My pc has a 64 bit version of windows 10 and

[issue35885] configparser: indentation

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Can I take this? What needs to be done? adding an indent flag and if it's passed indent the keys? -- nosy: +Ido Michael ___ Python tracker ___

[issue38101] Update devguide triaging keywords

2020-02-02 Thread Ido Michael
Ido Michael added the comment: It treats the PR as a cpython while it's on the devguide repo, here is the link: https://github.com/python/devguide/pull/570 -- ___ Python tracker

[issue38101] Update devguide triaging keywords

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Added a PR: GH-570 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Created PR added arguments to method signature in doc. GH-18315 -- nosy: +Ido Michael ___ Python tracker ___

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-02 Thread Ido Michael
Change by Ido Michael : -- keywords: +patch pull_requests: +17691 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18315 ___ Python tracker ___

[issue10572] Move test sub-packages to Lib/test

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Are there any conclusions? what needs to be done? -- nosy: +Ido Michael ___ Python tracker ___ ___

Re: JavaScript's void operator in Python?

2020-02-02 Thread Jon Ribbens via Python-list
On 2020-02-02, Stefan Ram wrote: > JavaScript has a void operator that maps everything to > undefined. E.g., > > JavaScript console > >|< void( console.log( 2 ) ) >| 2 >|> undefined > > I can easily write a corresponding function in Python. > > main.py > > def void( x ): > pass > >

[issue38691] [easy] importlib: PYTHONCASEOK should be ignored when using python3 -E

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Created this PR: GH-18314 -- nosy: +Ido Michael ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38691] [easy] importlib: PYTHONCASEOK should be ignored when using python3 -E

2020-02-02 Thread Ido Michael
Change by Ido Michael : -- keywords: +patch pull_requests: +17690 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18314 ___ Python tracker ___

[issue39274] Conversion from fractions.Fraction to bool

2020-02-02 Thread SilentGhost
SilentGhost added the comment: "Successful" PR would be merged into master. This issue is still in "patch review" stage. -- nosy: +SilentGhost ___ Python tracker ___

[issue39274] Conversion from fractions.Fraction to bool

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Hi all, I think this issue can be closed right? Saw a successful PR. -- nosy: +Ido Michael ___ Python tracker ___

[issue37404] asyncio sock_recv blocks on ssl sockets.

2020-02-02 Thread Ido Michael
Ido Michael added the comment: Sorry it broke the version, what could I have done to avoid this? Also can we close this issue? -- ___ Python tracker ___

[issue39530] Documentation about comparisons between numeric types is misleading

2020-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: Related SO question: https://stackoverflow.com/questions/60005876/how-does-python-compare-int-to-float-objects -- ___ Python tracker ___

[issue39530] Documentation about comparisons between numeric types is misleading

2020-02-02 Thread Mark Dickinson
New submission from Mark Dickinson : The documentation[1] for comparisons between mixed types says: > [...] when a binary arithmetic operator has operands of different > numeric types, the operand with the "narrower" type is widened to > that of the other, where integer is narrower than

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread Dong-hee Na
Dong-hee Na added the comment: Thanks good catch :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28312] Minor change - more direct hint re: multiple machine sizes and LONG_BIT conflicts

2020-02-02 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +17689 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18313 ___ Python tracker ___

[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 339fd46cb764277cbbdc3e78dcc5b45b156bb6ae by Kyle Stanley in branch 'master': bpo-39349: Add *cancel_futures* to Executor.shutdown() (GH-18057) https://github.com/python/cpython/commit/339fd46cb764277cbbdc3e78dcc5b45b156bb6ae --

[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you very muck, Kyle! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2020-02-02 Thread Michael Felt
Change by Michael Felt : -- versions: +Python 3.8, Python 3.9 -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2020-02-02 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +17688 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18312 ___ Python tracker ___

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: @shihai1991 Good catch! Now fixed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +17687 pull_request: https://github.com/python/cpython/pull/18311 ___ Python tracker ___

[issue39529] Deprecate get_event_loop()

2020-02-02 Thread Andrew Svetlov
New submission from Andrew Svetlov : Yuri proposed it for Python 3.8 but at that time the change was premature. Now we can reconsider it for 3.9 The problem is that asyncio.get_event_loop() not only returns a loop but also creates it on-demand if the thread is main and the loop doesn't exist.

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2020-02-02 Thread Michael Felt
Michael Felt added the comment: This is something from long long ago - time to get it completed. The (remaining) issue is: "c" and "m" may not be shared libraries - so nothing is ever found and the test is "skipped" but reports itself as PASSED. The original issue (fixed for AIX in

[issue39483] Proposial add loop parametr to run in asyncio

2020-02-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread hai shi
hai shi added the comment: Small style question: using 5 spaces in https://github.com/python/cpython/blob/master/Objects/floatobject.c#L655-L664 after PR 18147 merged. Due to bpo don't receive style quesiton, I commented here. -- nosy: +shihai1991

[issue12915] Add inspect.locate and inspect.resolve

2020-02-02 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +17686 pull_request: https://github.com/python/cpython/pull/18310 ___ Python tracker ___

[issue39526] print(text1.get(1.2,1.5))

2020-02-02 Thread SilentGhost
Change by SilentGhost : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39526] print(text1.get(1.2,1.5))

2020-02-02 Thread mlwtc
mlwtc added the comment: ok, I see, Thank U. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39350] Remove deprecated fractions.gcd()

2020-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: Apologies, I think I moved the discussion off-track. The first order of business should be to fix the regression. We can discuss behaviour changes after that. I've opened GH-18309 as a quick fix for the regression. --

[issue39350] Remove deprecated fractions.gcd()

2020-02-02 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +17685 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18309 ___ Python tracker ___

[issue39513] NameError: name 'open' is not defined

2020-02-02 Thread Vinay Sajip
Vinay Sajip added the comment: Well, my comment/request was prompted by whether this issue is a duplicate of bpo-26789, because it's not clear from the OP. If it is, then it can be closed as such. I don't think this is specifically a logging problem, more a case of how things become

[issue39526] print(text1.get(1.2,1.5))

2020-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1.30 is the same as 1.3 in Python. You perhaps want to use '1.30'. -- nosy: +serhiy.storchaka ___ Python tracker ___