[issue38159] PyState_AddModule docs should say that it's not necessary to call it.

2019-11-06 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35381] posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types

2019-11-06 Thread Petr Viktorin
Petr Viktorin added the comment: The module still uses tp_new directly, so it's not limited to only stable ABI, but that's for another issue. Thanks for the contribution! -- nosy: +petr.viktorin resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue38683] Installation failed - no privileges to access directory

2019-11-06 Thread Steve Dower
Steve Dower added the comment: To change the install location to Program Files, you should select the "Install for All Users" option at the top of the page where you modified the install location. This will cause the installer to elevate. Generic access errors should not trigger elevation -

[issue38704] Prevent installation on unsupported Windows versions

2019-11-06 Thread Steve Dower
Steve Dower added the comment: We can, and we probably should, but it's not a high priority. Technically the download page is correct, but updating it to specify Windows Vista as the 3.8 cutoff (and for 3.9, Windows 8.1) won't hurt. -- stage: -> needs patch title: No

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think that's necessary. We should just document that parameters are passed by name to __post_init__. This would have to be a 3.9 feature, since it's not strictly backward compatible. -- versions: +Python 3.9 -Python 3.7

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Should we also be checking for __post_init__ to have positional only arguments / syntax in the signature. I tried a simple fix of f.name + "=" + f.name to pass them as keyword always where current tests and reported example passes but with

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think using named parameters in the call to __post_init__ is reasonable. It's currently positional. -- assignee: -> eric.smith ___ Python tracker

[issue38703] should we expect round(0.95, 1) to be 1.0, instead of 0.9?

2019-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: [Steven] py> '%.17f' % 0.95 '0.94996' That's tricky to use correctly: it's not a priori clear how many digits after the point are needed to give you a faithful representation (the "17" in "%.17f" isn't going to be the right thing for most

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there is anything wrong with terms "true" and "false" (I don't know), we should fix this not only in one particular place, but everywhere. If there is nothing wrong with them, there is nothing to "improve". If this depends of the context, we should

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Aaron Ecay
New submission from Aaron Ecay : I have discovered that InitVar's are passed in a surprising way to the __post_init__ method of python dataclasses. The following program illustrates the problem: = from dataclasses import InitVar, dataclass @dataclass class Foo: bar: InitVar[str]

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: I have tried sending this message by email twice, and both times it seems to have disappeared. So I'm commenting via the web, and my apologies in advance if the message shows up later. * > There are almost 500 occurrences of "is true". We can worry

[issue38708] parse_message_id in email module is very buggy / crashy

2019-11-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +email nosy: +barry, maxking, r.david.murray type: -> behavior ___ Python tracker ___

[issue38708] parse_message_id in email module is very buggy / crashy

2019-11-06 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: Yes, issue38698 covers the UnboundLocalError, but doesn't cover inside get_msg_id there is also this gem: def get_msg_id(value): msg_id = MsgID() if value[0] in CFWS_LEADER: It should test value before accessing value[0] like it is

[issue38718] query of global metadata options delivers error messages even when successful

2019-11-06 Thread Arno-Can Uestuensoez
Change by Arno-Can Uestuensoez : -- title: query of global options delivers error messages even when successful -> query of global metadata options delivers error messages even when successful ___ Python tracker

[issue38718] query of global options delivers error messages even when successful

2019-11-06 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez : The 'setup.py' interface offers some global options, which could be queried. For example among numerous others the 'classifiers'. The current implementation displays for example for the following call:: python setup.py --description The result::

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Antoon Pardon
On 5/11/19 19:33, Spencer Du wrote: > Hi > > I want to execute at least two python files at once when imported but I dont > know how to do this. Currently I can only import each file one after another > but what i want is each file to be imported at the same time. Can you help me > write the

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-06 Thread lorb
lorb added the comment: This PR certainly does not turn them into methods. I believe it also doesn't encourage the idea that they would have to be. All it does is preventing __init__ from setting them to None in the case they are defined as methods. Would you consider it more acceptable to

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I pretty strongly dislike 'truthy' and 'falsey'. They look slangy and https://en.wiktionary.org/wiki/truthy gives the main meaning as (US, colloquial) Only superficially true; ... The computer language usage is credited to Javascript here and some other

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Rhodri James
On 06/11/2019 11:42, Rhodri James wrote: On 06/11/2019 09:51, Spencer Du wrote: On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James  wrote: On 05/11/2019 18:33, Spencer Du wrote: I want to execute at least two python files at once when imported but I dont know how to do this. Currently I

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Rhodri James
On 06/11/2019 09:51, Spencer Du wrote: On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James wrote: On 05/11/2019 18:33, Spencer Du wrote: I want to execute at least two python files at once when imported but I dont know how to do this. Currently I can only import each file one after

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-06 Thread Vinay Sajip
Vinay Sajip added the comment: They can be methods, but don't need to be. In my example, I showed how you can set the namer and rotator attributes to methods which do have access to self. I don't want to encourage the idea that namer and rotator *have* to be methods that have to be

[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

2019-11-06 Thread Patrick Schneeweiß
Patrick Schneeweiß added the comment: Sorry guys, it was an issue with the cusotm Splunk Library. They treated the keys Method a little different. Thanks all for the hints. Will close this -- resolution: -> third party stage: -> resolved status: open -> closed

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-06 Thread lorb
lorb added the comment: Thanks for the review and response. I don't understand yet why not to allow the following while keeping the existing functionality. This could also be achieved by turning the namer and rotator into class attributes. I recently created a subclass of the timed rotating

[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

2019-11-06 Thread Patrick Schneeweiß
Patrick Schneeweiß added the comment: Ok in a new sample Script it is working. As I used my normal script in a software called Splunk, I saw they are using a custom class OrderedDict. I will take a look on this first. -- ___ Python tracker

[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

2019-11-06 Thread Patrick Schneeweiß
Patrick Schneeweiß added the comment: Hello all, This is my dict: {'rule': 'WAN-2-Web|unknown (Barracuda Networks CloudGen Firewall)', 'April (2018)': '', 'May (2018)': '', 'June (2018)': '', 'July (2018)': '', 'August (2018)': '', 'April (2019)': '', 'May (2019)': '14', 'June (2019)': '',

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Vinay Sajip
Vinay Sajip added the comment: I also feel that lower case true and false are synonymous with any truthy and falsey values, as I'm sure many others do, so things in this area should in general stay as they are. Certainly -1 for a search-and-replace approach! -- nosy: +vinay.sajip

[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

2019-11-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please attach a sample script to reproduce the behavior difference? With below script a dictionary is passed then dict.keys() supports subtraction over a list to return the difference. I am not sure how you have received a list with

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-06 Thread Vinay Sajip
Vinay Sajip added the comment: The namer and rotator attributes are callables, not methods to be overridden. You can certainly do this with methods and set them accordingly: class MyHandler(BaseRotatingHandler): def __init__(self, *args, **kwargs): super(MyHandler,

[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I guess you try to write not a dict, but an object whose keys() method returns a list. -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker

ANN: psutil 5.6.5 released

2019-11-06 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 5.6.5: https://github.com/giampaolo/psutil About = psutil (process and system utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python. It is

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16583 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17073 ___ Python tracker ___

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James wrote: > On 05/11/2019 18:33, Spencer Du wrote: > > I want to execute at least two python files at once when imported but > > I dont know how to do this. Currently I can only import each file one > > after another but what i want is each

[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

2019-11-06 Thread Patrick Schneeweiß
New submission from Patrick Schneeweiß : I switched over to Python 3.7 and still using my csv DictWriter. No I'm receiving an error when calling the writerow() method. unsupported operand type(s) for -: 'list' and 'list' Digging deeped in the problem I found out, that the internal

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:41:59 UTC+1, Bob Gailer wrote: > On Nov 5, 2019 1:35 PM, "Spencer Du" wrote: > > > > Hi > > > > I want to execute at least two python files at once when imported but I > dont know how to do this. Currently I can only import each file one after > another but what i

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 21:05:02 UTC+1, Terry Reedy wrote: > On 11/5/2019 1:33 PM, Spencer Du wrote: > > > I want to execute at least two python files at once when imported but I > > dont know how to do this. Currently I can only import each file one after > > another but what i want is

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:37:32 UTC+1, Karsten Hilbert wrote: > > I want to execute at least two python files at once when imported but I > > dont know how to do this. > > Currently I can only import each file one after another but what i want is > > each file to be imported > > at the

[issue38708] parse_message_id in email module is very buggy / crashy

2019-11-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to be the same as issue38698. -- nosy: +xtreak ___ Python tracker ___ ___

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Wednesday, 6 November 2019 09:05:42 UTC+1, Christian Gollwitzer wrote: > Am 06.11.19 um 03:59 schrieb Dennis Lee Bieber: > > On Tue, 5 Nov 2019 10:33:20 -0800 (PST), Spencer Du > > declaimed the following: > > > >> Hi > >> > >> I want to execute at least two python files at once when

[issue38698] While parsing email message id: UnboundLocalError

2019-11-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This was also reported in issue38708 with the original code added in issue35805. Commenting out the except clause also doesn't raise any error in test suite so I assume the code path was not tested. Maybe the script could be added as part of the

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-06 Thread lorb
Change by lorb : -- keywords: +patch pull_requests: +16581 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17072 ___ Python tracker ___

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-06 Thread lorb
New submission from lorb : When subclassing the rotating handlers of the logging module and implementing a namer or rotator method they are silently set to None in __init__. This is surprising behaviour and currently the set a specific namer or rotator it is required to create an instance

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2019-11-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It seems that there is a list of files from which the mime types are also added at https://github.com/python/cpython/blob/5c0c325453a175350e3c18ebb10cc10c37f9595c/Lib/mimetypes.py#L42. "video/x-matroska" is not present in CPython repo's list of

[issue38715] Regression in compileall ddir parameter when recursing

2019-11-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are almost 500 occurrences of "is true". -- ___ Python tracker ___ ___ Python-bugs-list

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Christian Gollwitzer
Am 06.11.19 um 03:59 schrieb Dennis Lee Bieber: On Tue, 5 Nov 2019 10:33:20 -0800 (PST), Spencer Du declaimed the following: Hi I want to execute at least two python files at once when imported but I dont know how to do this. Currently I can only import each file one after another but what

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Ammar Askar
Ammar Askar added the comment: I don't think the word "true" is really the issue here. It's the fact that "is" in this context is ambiguous, is it referring to the English "is" or the python operator `is`? -- ___ Python tracker

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not English expert, but traditionally "true" is used as a synonym of a truthy value everywhere in the Python documentation and code. There are almost 2000 occurrences. If it is a wrong word, it should be fixed in all these cases. -- nosy:

<    1   2