[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-07 Thread Kubilay Kocak
Change by Kubilay Kocak : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-07 Thread Michael Felt
Michael Felt added the comment: On 06/06/2019 19:08, Steve Dower wrote: > Steve Dower added the comment: > > Changing our policy here (from "no policy" to "here's a recommendation") > probably deserves a python-dev discussion first. I can rejoin the list - to follow the discussion, should one

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-06 Thread Steve Dower
Steve Dower added the comment: Changing our policy here (from "no policy" to "here's a recommendation") probably deserves a python-dev discussion first. -- ___ Python tracker ___

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-06 Thread Michael Felt
Michael Felt added the comment: On 06/06/2019 14:14, Tal Einat wrote: > Tal Einat added the comment: > > Steve's suggestion sounds reasonable. > > Should we just add this to the devguide, then? Well, as I said before - it was never about THIS being the solution. While that would have been nic

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-06 Thread Tal Einat
Tal Einat added the comment: Steve's suggestion sounds reasonable. Should we just add this to the devguide, then? -- ___ Python tracker ___ __

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-05 Thread Steve Dower
Steve Dower added the comment: The reason I'd prefer sys.platform in most cases is because it's a compile-time constant, based on the one that includes/excludes APIs near completely, and most of our tests ought to be switching on these. I personally don't see any need to switch on os.name, e

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-05 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-05 Thread Michael Felt
Michael Felt added the comment: On 05/06/2019 07:07, Tal Einat wrote: > Tal Einat added the comment: > > Michael, your willingness to help, and the work on this issue and PR, are > greatly appreciated! > > Reading through the discussion here again, and the one referenced by Ned, I > tend to

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-04 Thread Tal Einat
Tal Einat added the comment: Michael, your willingness to help, and the work on this issue and PR, are greatly appreciated! Reading through the discussion here again, and the one referenced by Ned, I tend to agree with the point that having *yet another* spelling for OS checking is perhaps

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-05-29 Thread Michael Felt
Michael Felt added the comment: On 29/05/2019 16:36, Ned Deily wrote: > Ned Deily added the comment: > > FWIW, my opinion on making this kind of wholesale change has not changed: see > the discussion in PR 7800. I had actually read through that before I started on this. Your closing comment

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-05-29 Thread Ned Deily
Ned Deily added the comment: FWIW, my opinion on making this kind of wholesale change has not changed: see the discussion in PR 7800. I think the changes made there were not an improvement for all the reasons stated, primarily because this now requires people reading the code base to learn

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-05-29 Thread Tal Einat
Tal Einat added the comment: There a cleanly rebased PR up at GH-13648. I'd like to get opinions from additional people about this now that the PR is ready. Steve? Victor? Some discussion which happened in PR comments: Andrew Svetlov approved the changes for the asyncio tests. Stefan Krah

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-05-29 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +13542 pull_request: https://github.com/python/cpython/pull/13648 ___ Python tracker ___ ___

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-25 Thread Michael Felt
Michael Felt added the comment: On 23/04/2019 17:53, Steve Dower wrote: > Steve Dower added the comment: > >> Being 'runtime' rather than 'buildtime' seemed more precise - tests that >> are not meant to be build-time dependent use run-time status while >> leaving sys.platform for concerns that

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-23 Thread Steve Dower
Steve Dower added the comment: > Being 'runtime' rather than 'buildtime' seemed more precise - tests that > are not meant to be build-time dependent use run-time status while > leaving sys.platform for concerns that are directly related to builds This is a good point - perhaps we need both? M

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-23 Thread Michael Felt
Michael Felt added the comment: On 22/04/2019 21:14, Steve Dower wrote: > Steve Dower added the comment: > > I like this, though I don't like using the platform module here and would > prefer sys.platform to be canonical (until there's a need to differentiate - > e.g. some tests coming for W

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-22 Thread Steve Dower
Steve Dower added the comment: I like this, though I don't like using the platform module here and would prefer sys.platform to be canonical (until there's a need to differentiate - e.g. some tests coming for Windows ARM32 will need to be more specific). In general, I'd like fewer tests to b

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-16 Thread Michael Felt
Michael Felt added the comment: Never mind - typos in the files I did work on. iow, I found a way to get the filename, and am cleaning up the errors. -- ___ Python tracker __

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-16 Thread Michael Felt
Michael Felt added the comment: OK. I have been chewing my bone. I hope not too much indigestion. Who has a pointer for the antacid? Getting base branch for PR ... origin/master Getting the list of files that have been added/changed ... 72 files Fixing Python file whitespace ... Traceback (mo

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-15 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +12768 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-15 Thread Michael Felt
Michael Felt added the comment: On 15/04/2019 11:50, STINNER Victor wrote: > STINNER Victor added the comment: > > support.is_android has two flaws: > > * it's a constant: it must be spelled as UPPER CASE > * I dislike "is_" prefix: "MS_WINDOWS" constant is commonly used, and it > doesn't sta

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-15 Thread STINNER Victor
STINNER Victor added the comment: support.is_android has two flaws: * it's a constant: it must be spelled as UPPER CASE * I dislike "is_" prefix: "MS_WINDOWS" constant is commonly used, and it doesn't start with "is_". In my PR, I used support.ANDROID. -- __

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-15 Thread STINNER Victor
STINNER Victor added the comment: My previous attempt was: https://github.com/python/cpython/pull/7800 Serhiy Storchaka and Ned Deily were unable about this change: * https://github.com/python/cpython/pull/7800#issuecomment-398688441 * https://github.com/python/cpython/pull/7800#issuecomment-

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-14 Thread Michael Felt
Michael Felt added the comment: On 14/04/2019 18:04, Michael Felt wrote: > Is this a good way to get started? So, as an example - seems to be many attributes in test/support/__init__.py diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 5bd15a2..e20567f 100644 --- a

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-14 Thread Michael Felt
Michael Felt added the comment: I took a peak at test.support. a) I see that while many tests import test.support, or from test.support import - not all tests use this. b) I see that only 35 .py files in Lib/test have the string sys.platform.startswith, and there are 76 files that have sys

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-13 Thread STINNER Victor
STINNER Victor added the comment: I tried to add constants to test.support once to identify operating systems, nbut I had to revert the change. I am not sure that there is any problem here. Leaving the code unchanged is also fine :-) -- nosy: +vstinner __

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-13 Thread Michael Felt
New submission from Michael Felt : Back in 2012 (issue12326 and issue12795), and just recently (issue36588) sys.platform has been modified (and documented) to not return the platform version. Additionally, the recommendation is to use the form sys.platform.startswith() - to continue to be ba