[issue22858] unittest.__init__:main shadows unittest.main

2021-12-11 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22858] unittest.__init__:main shadows unittest.main

2020-03-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-15 Thread Brett Cannon
Brett Cannon added the comment: Ah, I see my misunderstanding; when Antoine said Numba subclasses unittest.main I wasn't thinking and thought he meant something in unitest.main the module, not the unittest.main alias for unittest.main.TestProgram which is exposed as unitest.__init__.main

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-15 Thread Brett Cannon
Brett Cannon added the comment: Or deprecate in 3.5 if Larry will let you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22858 ___ ___

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-14 Thread Robert Collins
Robert Collins added the comment: So unittest.main, the symbol, needs to exist. What currently references unittest.main, the module, today? AFAICT its only accessible vis sys.modules['unittest.main'] because of the shadowing. -- ___ Python tracker

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-14 Thread Brett Cannon
Brett Cannon added the comment: The modules seem to have existed since at least Python 3.2, so I think a proper DeprecationWarning is necessary for just one release. The trick is going to be unittest.main since it seems code in the wild relies on it at least partially existing and Michael

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-13 Thread Robert Collins
Robert Collins added the comment: See also https://github.com/testing-cabal/mock/issues/250 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22858 ___

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-20 Thread Michael Foord
Michael Foord added the comment: One way would be to have an _main.py and have main.py import * (or equivalent) from it. We can't get rid of unittest.main being an alias for TestProgram - that's been around forever. -- ___ Python tracker

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-14 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22858 ___ ___

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-13 Thread Robert Collins
New submission from Robert Collins: This is just an ugly/hygiene thing. Since we've never advertised the submodules as the API, we should be able to fix this by moving main.py to e.g. __main__.py. -- messages: 231101 nosy: rbcollins priority: normal severity: normal status: open title:

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-13 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- components: +Library (Lib) type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22858 ___

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-13 Thread R. David Murray
R. David Murray added the comment: I'm afraid that just because we don't advertise it doesn't mean it isn't used. On the other hand, the split into submodules is relatively recent, so maybe we could get away with it without a deprecation cycle. I'd like other developers opinions on that.

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Numba subclasses unittest.main in order to add custom CLI options. I agree the current unittest scheme is horrible, just we should find a way that's backwards-compatible. -- nosy: +pitrou ___ Python tracker