[issue22273] abort when passing certain structs by value using ctypes

2019-05-12 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___

[issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature

2019-05-12 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : >From bpo-36886, IT is unclear the FunctionTypes, CodeTypes ... etc are not stable between python versions, and the recent addition of `:=` change some of the signatures. This suggest 2 things: - A CYA sentence in types.rst "These types are

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-12 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Thanks for the update to the what's new Pablo. > let's open a new issue for the notice in types.rst to keep the discussion > isolated. See bpo-36896 -- ___ Python tracker

[issue36807] IDLE doesn't call os.fsync()

2019-05-12 Thread Dan Halbert
Dan Halbert added the comment: Fix tested and works! Comment from PR duplicated here. I tested this fix by editing the 3.7.3 IDLE code by hand, and editing this test program as code.py on a CIRCUITPY drive on Windows 10: import time i = 0 while True: print(i) i += 1 print("""\

[issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability

2019-05-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: @eric.smith Can you take a look at this when you get a chance? Thanks! -- nosy: +cheryl.sabella ___ Python tracker ___

[issue36894] test_multiprocessing_spawn regression on Windows

2019-05-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Indeed, this is failing as well in all buildbots but has not been reported because fails in the setUp and therefore is counted as "RUN NO TESTS". Example: https://buildbot.python.org/all/#/builders/58/builds/2368/steps/3/logs/stdio -- nosy:

[issue13474] Mention of "-m" Flag Missing From Doc on Execution Model

2019-05-12 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +cheryl.sabella ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22964] dbm.open(..., "x")

2019-05-12 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 5d23e282af69d404a3430bb95aefe371112817b3 by Pablo Galindo in branch 'master': bpo-36886: Document changes in code object in What's new section (GH-13255) https://github.com/python/cpython/commit/5d23e282af69d404a3430bb95aefe371112817b3

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36689] docs: os.path.commonpath raises ValueError for different drives

2019-05-12 Thread Windson Yang
Windson Yang added the comment: An easy fix would be "Raise ValueError if paths contain (note: use contain instead of contains) both absolute and relative pathnames or the path are on the different drives." -- nosy: +Windson Yang ___ Python

[issue36807] IDLE doesn't call os.fsync()

2019-05-12 Thread Guido van Rossum
Guido van Rossum added the comment: @Terry please see my comment on the PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36897] shlex doesn't differentiate escaped characters in output

2019-05-12 Thread Matthew Gamble
New submission from Matthew Gamble : The output of the following invocations are exactly the same: list(shlex.shlex('a ; b', posix=True, punctuation_chars=True)) list(shlex.shlex('a \; b', posix=True, punctuation_chars=True)) They both output the following: ['a', ';', 'b'] This makes it

[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: I saw the PR before the bug comment. merged. if we find a _good_ reason to delay this removal a cycle during the 3.8 betas we can bring it back. thanks for staying on top of the removal plan! -- resolution: -> fixed stage: patch review ->

[issue23896] lib2to3 doesn't provide a grammar where exec is a function

2019-05-12 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +13178 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue32832] doctest should support custom ps1/ps2 prompts

2019-05-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you for the suggestion, but per the discussion with Tim, I am closing as rejected. -- nosy: +cheryl.sabella resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-12 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +13176 stage: -> patch review ___ Python tracker ___ ___

[issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature

2019-05-12 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +13177 stage: -> patch review ___ Python tracker ___ ___

[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-12 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > If we find a _good_ reason to delay this removal a cycle during the 3.8 betas > we can bring it back. > thanks for staying on top of the removal plan! Thanks to you for the quick integration; I'm happy if we need to bring it back, but at least having

[issue36728] Remove PyEval_ReInitThreads() from the public C API

2019-05-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw - i agree that this can be removed. it has no reason to ever be called directly. i double checked in our massive internal codebase at work and found no calls other than python interpreters themselves. -- nosy: +gregory.p.smith

[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset e2500610c62673f42371b54fb0e4de83e4b33146 by Gregory P. Smith (Matthias Bussonnier) in branch 'master': bpo-36895: remove time.clock() as per removal notice. (GH-13270)

[issue22964] dbm.open(..., "x")

2019-05-12 Thread Batuhan
Batuhan added the comment: Python directly passes flags to gdbm (or whatever the dbm interface is). gdbm_open((char *)file, 0, flags, mode, NULL)) # _gdbmmodule.c:76 I dont think it is good idea to wrap gdbm for just a flag. -- nosy: +BTaskaya

[issue33303] ElementTree Comment text isn't escaped

2019-05-12 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: I backed-out the Processing Instruction changes. -- ___ Python tracker ___ ___

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-05-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I have created a PR for this. My approach is that when mock_thing.assert_has_calls(mock.call.method1(1, 2)) is made the assert_has_calls is made against mock_thing whose spec_signature (constructor signature) is always used. But there is

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-12 Thread Big Stone
Big Stone added the comment: I found a third project that is impacted https://github.com/microsoft/python-language-server/issues/1070. -- ___ Python tracker ___

Testing the data type of a value

2019-05-12 Thread binoythomas1108
When I run the following code, I get the following output: >>> print(type(5)) class 'int' Next, I try to compare the data-type of 5 with the earlier output, I get no output: >>> if type(5) == "": print("Integer") Why isn't this working? Advance thanks for your time. and regards from

[issue33303] ElementTree Comment text isn't escaped

2019-05-12 Thread Stefan Behnel
Stefan Behnel added the comment: I'm really sorry again, but I only consulted the XML spec on this now (and also the way libxml2 does it), and I found that XML comment text actually does not get escaped. It's not character data, and, in fact, "--" is not even allowed at all inside of

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-05-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +13171 stage: needs patch -> patch review ___ Python tracker ___

Re: Testing the data type of a value

2019-05-12 Thread Luuk
On 12-5-2019 09:27, binoythomas1...@gmail.com wrote: When I run the following code, I get the following output: print(type(5)) class 'int' Next, I try to compare the data-type of 5 with the earlier output, I get no output: if type(5) == "": print("Integer") Why isn't this

[issue36867] Make semaphore_tracker track other system resources

2019-05-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Since the commit there is a warning in CI and locally while running tests. Travis CI : * https://travis-ci.org/python/cpython/jobs/531304357#L2099 (test_multiprocessing_forkserver) * https://travis-ci.org/python/cpython/jobs/531304357#L2296

[issue30464] gammavariate has a wrong comment

2019-05-12 Thread SilentGhost
SilentGhost added the comment: Does "a difference stream" in PR 1934 (news entry): > It does however produce a difference stream of random variables than it used > to. make some sense? Sentence doesn't seem grammatical. -- nosy: +SilentGhost resolution: -> fixed

[issue36791] sum() relies on C signed overflow behaviour

2019-05-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +13172 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-05-12 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +lisroach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36791] sum() relies on C signed overflow behaviour

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

[issue36791] sum() relies on C signed overflow behaviour

2019-05-12 Thread miss-islington
miss-islington added the comment: New changeset b7e483b6d07081d5f81860258e95785975a7cbf8 by Miss Islington (bot) in branch '3.7': bpo-36791: Safer detection of integer overflow in sum(). (GH-13080) https://github.com/python/cpython/commit/b7e483b6d07081d5f81860258e95785975a7cbf8 --

[issue30464] gammavariate has a wrong comment

2019-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: That should clearly have been "different stream" rather than "difference stream". -- ___ Python tracker ___

[issue35996] Optional modulus argument for new math.prod() function

2019-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: Put me down for a -1, too. > One would also be able to things like prod(range(1, n), n) == n - 1 for > Wilson's primality test. That's not the most convincing use-case, since that's a _horribly_ inefficient way to do a primality test in the first place

[issue36893] email.headerregistry.Address blocks Unicode local part addr_spec accepted elsewhere

2019-05-12 Thread Matthew
New submission from Matthew : The parser for passing an addr_spec to email.headerregistry.Address does not allow non-ASCII local parts, but the rest of the email package handles them fine, either straight (with explicit references to RFC6532 and SMTPUTF8), or encoding as expected. Apologies

[issue30464] gammavariate has a wrong comment

2019-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: This was fixed in PRs GH-1798 and GH-1934. Closing. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue36791] sum() relies on C signed overflow behaviour

2019-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: Can this be closed, or does the fix need to be backported? -- ___ Python tracker ___ ___

[issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do

2019-05-12 Thread SilentGhost
Change by SilentGhost : -- nosy: +berker.peksag versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___

Re: Testing the data type of a value

2019-05-12 Thread Ben Bacarisse
binoythomas1...@gmail.com writes: > When I run the following code, I get the following output: print(type(5)) > class 'int' > > Next, I try to compare the data-type of 5 with the earlier output, I > get no output: if type(5) == "": > print("Integer") > > Why isn't this working?

[issue35431] Add a function for computing binomial coefficients to the math module

2019-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: @kellerfuchs @FR4NKESTI3N We seem to have two open PRs for this feature, both with some review comments. Which is the one true PR? Can we close the other one? -- ___ Python tracker

[issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do

2019-05-12 Thread Berker Peksag
Berker Peksag added the comment: Thank you for the report and the PR! I think accepting 'rt' mode is a good idea. However, it's a new feature and it can only go into 3.8. It seems to me that the root cause of the issue is that the fileinput module wasn't properly converted to support

Re: Python 2 EOL; what about P2 packages

2019-05-12 Thread Chris Angelico
On Mon, May 13, 2019 at 12:41 AM GerritM wrote: > > I had missed the End-of-Life announcement of Python 2 for 2020. When > installing a missing package on my new laptop, pip did warn me about this > upcoming event. > > I have been reading up on the conversion. Unfortunately, I can find no >

Re: Python 2 EOL; what about P2 packages

2019-05-12 Thread Dietmar Schwertberger
On 12.05.2019 16:38, GerritM wrote: Any suggestions how to port to Python 3, when using Python 2 only packages? You need to decide for each package whether to port it or to replace it. HTMLgen is probably a pure Python package. It should not be too hard to port it to Python 3 yourself. At

[issue14353] Proper gettext support in locale module

2019-05-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 24ff9a44ac5f0653df4c1d92c2a99fab286fcc15 by Benjamin Peterson (Toshio Kuratomi) in branch '2.7': [2.7] closes bpo-14353: Fix detection of bind_textdomain_codeset in libintl. (GH-13265)

[issue35924] curses segfault resizing window

2019-05-12 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Hi Josiah, I've tested my sample program and it looks like the segmentation fault is fixed with ncurses-6.1-20190511: http://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00013.html Are you able to give that a try and see whether it resolves the issue

[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-12 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : Deprecation message in `timemodule.c` says: > "time.clock has been deprecated in Python 3.3 and will be removed from Python > 3.8: use time.perf_counter or time.process_time instead" Should be bumped to 3.9 – or time.clock should be removed.

[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-12 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Vstiner, added you as you added the deprecation notice. I'm happy to take care of the removal and/or update the deprecation warning to 3.9. -- nosy: +vstinner ___ Python tracker

[issue22135] allow to break into pdb with Ctrl-C for all the commands that resume execution

2019-05-12 Thread Chun-Yu Tseng
Change by Chun-Yu Tseng : -- pull_requests: +13175 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14353] Proper gettext support in locale module

2019-05-12 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- pull_requests: +13173 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36027] Support negative exponents in pow() where a modulus is specified.

2019-05-12 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +13174 stage: -> patch review ___ Python tracker ___ ___

[issue36027] Support negative exponents in pow() where a modulus is specified.

2019-05-12 Thread Mark Dickinson
Change by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Automate extract domain

2019-05-12 Thread Birdep
I am trying to extract domain name from a adblock rule , so what pattern should i used to extract domain name only? import re domains = ['ru', ' fr' ,'eu', 'com'] with open('easylist.txt', 'r') as f: a=f.read() result=re.findall(r'[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+',a) unique_result =

Re: Automate extract domain

2019-05-12 Thread Jon Ribbens via Python-list
On 2019-05-12, Birdep wrote: > I am trying to extract domain name from a adblock rule , so what > pattern should i used to extract domain name only? > > import re > domains = ['ru', ' fr' ,'eu', 'com'] with open('easylist.txt', 'r') as f: > a=f.read()

[issue36894] test_multiprocessing_spawn regression on Windows

2019-05-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : After bpo-36867, test_multiprocessing_spawn fails running any test on Windows (but it isn't noticed as a fail build). https://ci.appveyor.com/project/python/cpython/builds/24485897#L1264 0:04:05 load avg: 5.39 [389/421] test_multiprocessing_spawn run no

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Jake for your contribution! -- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4959c33d2555b89b494c678d99be81a65ee864b0 by Antoine Pitrou (Jake Tesler) in branch 'master': bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)

Re: Testing the data type of a value

2019-05-12 Thread Luuk
On 12-5-2019 10:16, Luuk wrote: On 12-5-2019 09:27, binoythomas1...@gmail.com wrote: When I run the following code, I get the following output: print(type(5)) class 'int' Next, I try to compare the data-type of 5 with the earlier output, I get no output: if type(5) == "":

[issue36893] email.headerregistry.Address blocks Unicode local part addr_spec accepted elsewhere

2019-05-12 Thread R. David Murray
R. David Murray added the comment: In order to legitimately have a non-ascii localpart, you *must* be using RFC6532 and RFC6531. In the email package you do this by using policy=SMTPUTF8, or setting utf8=True in your custom Policy. In smtplib you do this by specifying smtputf8 in the

[issue20044] gettext.install() ignores previous call to locale.setlocale()

2019-05-12 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I tested a small C program and found that setlocale takes precedence for LC_ALL, LC_MESSAGES, and LANG but not for LANGUAGE. int main(int argc, char **argv) { char *message1; //setlocale (LC_ALL, ""); setlocale (LC_ALL, "pt_BR.utf-8");

[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2019-05-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Should wait_on_exit be True only on application exit? Do application exit means interpreter shutdown (sys.is_finalizing() == True)? -- nosy: +asvetlov ___ Python tracker

Python 2 EOL; what about P2 packages

2019-05-12 Thread GerritM
I had missed the End-of-Life announcement of Python 2 for 2020. When installing a missing package on my new laptop, pip did warn me about this upcoming event. I have been reading up on the conversion. Unfortunately, I can find no information yet on coping with Python 2 only packages. So far, I

[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2019-05-12 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: @asvetlov The idea of the new flag is to disable any subsequent waiting for futures after ThreadPoolExecutor.shutdown(wait=False) returns. Currently the additional waiting is implemented using "atexit", so I assumed it referred to process exit. (The

Re: Testing the data type of a value

2019-05-12 Thread Kushal Kumaran
Luuk writes: > On 12-5-2019 16:07, Piet van Oostrum wrote: >> Luuk writes: >> >>> After thinking about this, (i am prettry new to python), i was doing this: >>> >> print(type(5),type(int),type(5)==type(int),type(5)==int) >>> False True >>> >>> Can someone explain why type(5)==int

[issue35431] Add a function for computing binomial coefficients to the math module

2019-05-12 Thread Yash Aggarwal
Yash Aggarwal added the comment: @mark.dickinson both pr's are more or less same. Keller was offline for some time so I made the new issue. They were merged later. Only difference is in unittests. I'd say it's up to you to decide which one to keep. --

Re: Testing the data type of a value

2019-05-12 Thread Piet van Oostrum
Luuk writes: > > After thinking about this, (i am prettry new to python), i was doing this: > print(type(5),type(int),type(5)==type(int),type(5)==int) > False True > > Can someone explain why type(5)==int evaluates to True ? > >>> print(int) The value of int is the class int,

Re: Testing the data type of a value

2019-05-12 Thread Luuk
On 12-5-2019 16:07, Piet van Oostrum wrote: Luuk writes: After thinking about this, (i am prettry new to python), i was doing this: print(type(5),type(int),type(5)==type(int),type(5)==int) False True Can someone explain why type(5)==int evaluates to True ? print(int) The

[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2019-05-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: As documentation reader I have a mental problem to figure out when use non-default `wait_at_exit=False` flag and when don't. The rule like: "if you tried to call `executor.shutdown(wait=False)` and it still hangs try `executor.shutdown(wait=False,