[issue25172] Unix-only crypt should not be present on Windows.

2020-01-09 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue25172] Unix-only crypt should not be present on Windows.

2020-01-09 Thread miss-islington
miss-islington added the comment: New changeset 8c08518c255747a06d00479f21087f0c934d0ad6 by Miss Islington (bot) in branch '3.8': bpo-25172: Reduce scope of crypt import tests (GH-17881) https://github.com/python/cpython/commit/8c08518c255747a06d00479f21087f0c934d0ad6 -- __

[issue25172] Unix-only crypt should not be present on Windows.

2020-01-09 Thread Steve Dower
Steve Dower added the comment: New changeset ed367815eeb9329c48a86a8a7fa3186e27a10f2c by Steve Dower in branch 'master': bpo-25172: Reduce scope of crypt import tests (GH-17881) https://github.com/python/cpython/commit/ed367815eeb9329c48a86a8a7fa3186e27a10f2c -- ___

[issue25172] Unix-only crypt should not be present on Windows.

2020-01-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +17330 pull_request: https://github.com/python/cpython/pull/17922 ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2020-01-06 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +17297 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17881 ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2020-01-06 Thread Steve Dower
Steve Dower added the comment: I started creating an example of improving the skip cases, and ended up just making a PR. It should: * expect a helpful error on Windows * work fine on other platforms with crypt * skip all tests on other platforms without crypt --

[issue25172] Unix-only crypt should not be present on Windows.

2020-01-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: @steve.dower - Does this fix need more work for android? @xdegaye says he does not need this for android anymore. -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-12-09 Thread Xavier de Gaye
Change by Xavier de Gaye : -- nosy: -xdegaye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue25172] Unix-only crypt should not be present on Windows.

2019-12-09 Thread Xavier de Gaye
Xavier de Gaye added the comment: Not interested anymore in android stuff. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue25172] Unix-only crypt should not be present on Windows.

2019-11-19 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker ___ ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-11-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: test_crypt fails on android following last changes made at 243a73deee4ac61fe06602b7ed56b6df01e19f27. The android libc does not have a crypt() function and the _crypt module is not built. generic_x86_64:/data/local/tmp/python $ python Python 3.9.0a0 (heads/a

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Thank you Steve for accepting my pull requests. I was surprised to see the methods in the class and its decorators getting evaluated and causing the failures initially, but I then realized that the code is parsed before execution and that's when I was s

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset e7ec9e04c82be72aef621fdfba03f41cbd8599aa by Miss Islington (bot) in branch '3.8': bpo-25172: Add test for crypt ImportError on Windows (GH-15252) https://github.com/python/cpython/commit/e7ec9e04c82be72aef621fdfba03f41cbd8599aa -- ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Steve Dower
Steve Dower added the comment: Thanks for the patches, Srinivas! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset 7f7f74734acd729d1f82b7cf672e064c9525fced by Miss Islington (bot) in branch '3.8': bpo-25172: Raise appropriate ImportError msg when crypt module used on Windows (GH-15149) https://github.com/python/cpython/commit/7f7f74734acd729d1f82b7cf672e064

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +14982 pull_request: https://github.com/python/cpython/pull/15263 ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Steve Dower
Steve Dower added the comment: New changeset 243a73deee4ac61fe06602b7ed56b6df01e19f27 by Steve Dower (shireenrao) in branch 'master': bpo-25172: Add test for crypt ImportError on Windows (GH-15252) https://github.com/python/cpython/commit/243a73deee4ac61fe06602b7ed56b6df01e19f27 --

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Thank you @paul.moore -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Paul Moore
Paul Moore added the comment: To clarify, I think adding the label needs core dev (or maybe triager) rights on github, so I don't think it's something you can do yourself. -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Paul Moore
Paul Moore added the comment: I added the label for you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: I submitted a new PR for the Windows test case. Please take a look. Also how do I attach the label "skip news" to this new PR? -- ___ Python tracker ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Srinivas Nyayapati
Change by Srinivas Nyayapati : -- pull_requests: +14973 pull_request: https://github.com/python/cpython/pull/15252 ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: When I try to put the skipUnless decorator on CryptTestCase, I am still seeing a failure when I try to run this. The error is - File "C:\Users\srao\projects\cpython\lib\test\test_crypt.py", line 59, in CryptTestCase @unittest.skipUnless(crypt.METHOD_S

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Steve Dower
Steve Dower added the comment: Sure. You can post a new PR with the same bug number (and it won't need a NEWS file this time). -- ___ Python tracker ___ _

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Can I have a go at it? Do I need to open a new issue to post a new PR? -- ___ Python tracker ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Steve Dower
Steve Dower added the comment: Yes. support.import_module is going to raise a skip when the module can't be imported, but we want to handle ImportError differently. -- ___ Python tracker ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Are you suggesting using the try/except block instead of import_module in test_crypt.py -- ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Steve Dower
Steve Dower added the comment: Or better yet (since my last suggestion was bad), add a second test class to test_crypt try: import crypt IMPORT_ERROR = None except ImportError as ex: crypt = None IMPORT_ERROR = str(ex) @skipIf(crypt) class TestWhyCryptDidNotImport(TestCase):

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Steve Dower
Steve Dower added the comment: > The alternative would be, if there was a "Windows-specific tests" test > module, we could have put a test for this situation in there Maybe test___all__? -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Paul Moore
Paul Moore added the comment: That's where I decided it was too complex for now :-) The whole test_crypt.py file is skipped if you can't import crypt, via the use of the test.support.import_module() function. To be able to write a test for a platform where the whole point is that you can't i

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: I am curious how one would create a test for this? Would this be a new test script? The new script would skip if platform not win32 and the test case would be to import the crypt module and check for "not supported" string in the ImportError? --

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Paul Moore
Paul Moore added the comment: On reflection, adding a test for the Windows-specific behaviour looks like it could be more complex than I'd anticipated, so I'm happy for this to go in without an extra test. I'll look at adding a test in a follow-up PR (or if someone else wants to, that's fine

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread Paul Moore
Paul Moore added the comment: New changeset f4e725f224b864bf9bf405ff7f863cda46fca1cd by Paul Moore (shireenrao) in branch 'master': bpo-25172: Raise appropriate ImportError msg when crypt module used on Windows (GH-15149) https://github.com/python/cpython/commit/f4e725f224b864bf9bf405ff7f863

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +14914 pull_request: https://github.com/python/cpython/pull/15182 ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with Paul about the wording. Note that the proposed platform-specific catch and raise are for crypt.py, not test_crypt.py. If a test module should be skipped entirely, import_module is correct. For more refinement, test_idle has, for example, tk =

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: How do I write tests which only run for a given platform? Looking at test_crypt.py, I see that the crypt module is imported using test.support module so the exception will be raised even before the tests run. Is there a way to test imports? --

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Paul Moore
Paul Moore added the comment: It might be worth adding a test (running only on Windows) to confirm that if you try to import crypt you get an import error with a message that includes the phrase "not supported". That will ensure that we don't get regressions here in future, while still not t

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Sorry, I should have waited 1 day after submitting the CLA before submitting the PR. The system is waiting for my CLA to be cleared. -- ___ Python tracker _

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Change by Srinivas Nyayapati : -- keywords: +patch pull_requests: +14884 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15149 ___ Python tracker __

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Paul Moore
Paul Moore added the comment: The proposed wording seems good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Steve Dower
Steve Dower added the comment: > Can I submit my PR now? Sure, though if others want to weigh in on wording they should feel free to do it here. > I forgot to ask about tests? I see there is test_crypt.py under Lib\test. Do > you have any thoughts on how to test this? It should continue to

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: I forgot to ask about tests? I see there is test_crypt.py under Lib\test. Do you have any thoughts on how to test this? -- ___ Python tracker __

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Sounds good. Can I submit my PR now? -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Steve Dower
Steve Dower added the comment: `sys.platform` is the value that reflects how Python was compiled - `sys.platform == 'win32'` means compiled for Windows. And since this issue is related to compilation, it makes the most sense to use sys. (`os.name` is also based on compilation, but it really

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: What is the recommended way to check for platform in cpython? Is it using the sys module or os module? As for the error messages I couldn't think of anything better then what you suggested :). win32: raise ImportError("The crypt module is not supported

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Steve Dower
Steve Dower added the comment: That sounds good to me, though you may want to propose the error message here first so we can get the wording right - probably not everyone will be watching github PR. It probably makes sense to raise a different error message on platforms where we do expect i

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-05 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Hello I would like to work on this issue. First time contributor here. Would putting the import _crypt statement on line 3 in crypt.py inside a try/except block and checking to see if platform is windows then give an appropriate message be a good fix? T

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-02 Thread Steve Dower
Steve Dower added the comment: Marking this easy/newcomer friendly. This should catch the ModuleNotFoundError raised when _crypt is missing and raise a more informative ImportError saying that crypt is unsupported. All the other modules that are missing are native extension modules that are

[issue25172] Unix-only crypt should not be present on Windows.

2017-10-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> needs patch type: -> behavior versions: +Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker ___ __

[issue25172] Unix-only crypt should not be present on Windows.

2015-09-18 Thread Terry J. Reedy
New submission from Terry J. Reedy: Except for crypt, all the modules labeled 'Unix' or 'Linux' on the module index https://docs.python.org/3/py-modindex.html are absent from /Lib on Windows. 'import xyz' fails with "ImportError: no module named 'zyz'". (I presume the same is true on unix fo