[issue17457] Unittest discover fails with namespace packages and builtin modules

2014-06-10 Thread Claudiu.Popa
Claudiu.Popa added the comment: Can we close this? The feature already landed in Python 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___

[issue17457] Unittest discover fails with namespace packages and builtin modules

2014-06-10 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___

[issue17457] Unittest discover fails with namespace packages and builtin modules

2014-03-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 57cb8a6e8f10 by R David Murray in branch 'default': whatsnew: unittest discover works on namespace packages (#17457). http://hg.python.org/cpython/rev/57cb8a6e8f10 -- ___ Python tracker

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-25 Thread Claudiu.Popa
Claudiu.Popa added the comment: Sorry for the delay. Here's a minimal doc patch. I don't excel at writing documentation, it's not quite my strong point, so feel free to modify anything you seem fit. -- Added file: http://bugs.python.org/file32842/namespace.patch

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-23 Thread Michael Foord
Michael Foord added the comment: I'm going to commit this so we get it in before the feature freeze. It sounds like the remaining issue is minor and we can resolve it in the betas. Note that if we attempt discovery from a namespace package and fail we should create a ModuleImportError test

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-23 Thread Michael Foord
Michael Foord added the comment: Need doc updates -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___ ___ Python-bugs-list mailing list

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d2e5b74e2d18 by Michael Foord in branch 'default': Issue 17457: extend test discovery to support namespace packages http://hg.python.org/cpython/rev/d2e5b74e2d18 -- nosy: +python-dev ___ Python tracker

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-22 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello! Attached patch which uses ModuleSpec, tested with http://hg.python.org/features/pep-451/ repo. -- Added file: http://bugs.python.org/file32771/unittest_discovery_spec2.patch ___ Python tracker

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-22 Thread Claudiu.Popa
Claudiu.Popa added the comment: Added patch which addresses Eric's comments. It contains a situation which I'm not so happy, mostly due to not knowing in depth (or at least at a comfortable level) the import mechanics: in the AttributeError except handler, if the spec can't be determined and

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-18 Thread Eric Snow
Eric Snow added the comment: I left a review relative to the use of the _path attribute (which shouldn't be used). -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-18 Thread Claudiu.Popa
Claudiu.Popa added the comment: Eric, thank you for your comment! I modified the patch to check for __path__ instead, is this a safe enough check for this use case? Since ModuleSpec isn't landed yet, I didn't use your __spec__ example. -- Added file:

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-18 Thread Eric Snow
Eric Snow added the comment: Sorry for any confusion, Claudiu. the_module.__path__ only indicates that the module is a package. So until you can take advantage of PEP 451, you're stuck with the _path check (or several other unappealing hack) on line 224 of unittest-17457-3.patch. However,

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-17 Thread Claudiu.Popa
Claudiu.Popa added the comment: Attached new patch, which addresses Ezio's comments on Rietveld. -- Added file: http://bugs.python.org/file32664/unittest-17457-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-17 Thread Michael Foord
Michael Foord added the comment: I do want to get this into 3.4. The logic is non-trivial though, so I need to understand it before I can add it to discovery. It certainly *looks* good. -- ___ Python tracker rep...@bugs.python.org

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: I left a couple of comments on rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___ ___

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-10 Thread Claudiu.Popa
Claudiu.Popa added the comment: Michael, is any chance for this to go into Python 3.4? I would love to make any changes necessary in order for this to happen. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-07-10 Thread Michael Foord
Michael Foord added the comment: I'd like to review this properly before committing it. I agree it solves a real problem and your new patch looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-07-09 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. Can I do something to move this issue forward? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, michael.foord stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-23 Thread Michael Foord
Michael Foord added the comment: Thanks for the report and the patch. Good catch! It will need looking over as it's not immediately obvious to me it's correct. In the code that checks the loader path, does it iterate over every member of the namespace path - even directories that aren't in

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-23 Thread Claudiu.Popa
Claudiu.Popa added the comment: Yes, it iterates over every member of the namespace path. The new attached patch fixes this behaviour, by checking that each loader path starts with top_level_dir when set_implicit_top is False (if set_implicit_top is True, top_level_dir is irrelevant,

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-18 Thread Popa Claudiu
New submission from Popa Claudiu: There is a problem with unittest discovering and namespace packages. Given the following folder structure, where a namespace package X lies, the following command fails with the following error: -testbug - flufl (namespace package with some tests in it,

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-18 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___ ___ Python-bugs-list