[issue19645] decouple unittest assertions from the TestCase class

2019-07-09 Thread Robert Collins
Robert Collins added the comment: Oh, I didn't mean to imply that these are the only options I'd support - just that these are the things I've thought through and that I think will all work well... I'm sure there are more options available

[issue19645] decouple unittest assertions from the TestCase class

2019-07-09 Thread Robert Collins
Change by Robert Collins : -- versions: +Python 3.9 -Python 3.5 ___ Python tracker <https://bugs.python.org/issue19645> ___ ___ Python-bugs-list mailin

[issue19645] decouple unittest assertions from the TestCase class

2019-07-09 Thread Robert Collins
Robert Collins added the comment: Ok so design wise - there is state on the TestCase that influences assertions; in potentially two ways. The first way is formatting - the amount of detail shown in long list comparisons etc. The second way I don't think we have at the moment

[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Robert Collins
Robert Collins added the comment: Right now that attribute could be set by each test separately, or even varied within a test. TBH I'm not sure that the attribute really should be supported; perhaps thinking about breaking the API is worth doing. But - what are we solving for here. The OP

[issue37262] Make unittest assertions staticmethods/classmethods

2019-06-13 Thread Robert Collins
Robert Collins added the comment: I think this is strictly redundant with that other ticket and I'm going to close it. That said, they need access to self.failureException. https://docs.python.org/3/library/unittest.html#unittest.TestCase.failureException -- stage: -> resol

[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Robert Collins
Robert Collins added the comment: Sorry for the slow reply here; There are API breaks involved in any decoupling that involves the exception raising because of the failureException attribute. Something with signalling that can be adapted by other test suites etc might have merit, but I

[issue36656] Please add race-free os.link and os.symlink wrapper / helper

2019-06-07 Thread Robert Collins
Robert Collins added the comment: Thank you @Eryk -- ___ Python tracker <https://bugs.python.org/issue36656> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36656] Please add race-free os.link and os.symlink wrapper / helper

2019-06-03 Thread Robert Collins
Robert Collins added the comment: I'd like to add a few notes; please do consider Windows interactions here - Windows does not have the same model for inode replacement that Posix has. Secondly, I note that the thread model discussed here hasn't been particular well articulated

[issue36994] Missing tests for CALL_FUNCTION_EX opcode profiling method_descriptor

2019-05-22 Thread Robert Collins
Robert Collins added the comment: New changeset b892d3ea468101d35e2fb081002fa693bd86eca9 by Robert Collins (Jeroen Demeyer) in branch 'master': bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461) https://github.com/python/cpython/commit

[issue34125] Profiling depends on whether **kwargs is given

2019-05-22 Thread Robert Collins
Robert Collins added the comment: New changeset b892d3ea468101d35e2fb081002fa693bd86eca9 by Robert Collins (Jeroen Demeyer) in branch 'master': bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461) https://github.com/python/cpython/commit

[issue24653] Mock.assert_has_calls([]) is surprising for users

2019-05-22 Thread Robert Collins
Robert Collins added the comment: I'm reopening this because I don't agree. I opened the bug because we have evidence that users find the current documentation confusing. Saying that its not confusing to us doesn't fix the confusion. Why should we mention the special case of an empty set

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2019-04-17 Thread Robert Collins
Robert Collins added the comment: This is now showing up in end user tools like black: https://github.com/ambv/black/issues/564 -- nosy: +rbcollins versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.

[issue24412] setUpClass equivalent for addCleanup

2018-09-27 Thread Robert Collins
Robert Collins added the comment: Serhiy, thats not a design flaw, its a feature. in a class hierarchy, setup and teardown ordering is undefined: implementors can choose whatever order they want to execute in. e.g. class A(TestCase): def setUp(self): super().setUp() acquire1() class B

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2018-06-02 Thread Robert Collins
Robert Collins added the comment: So, I think we're in a local minima here. As I said earlier, neither the old nor new names really grab me, and I think everyone has aknowledged that the new name is -at best- confusing. We don't need *any more discussion* about that. The question is how

[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Robert Collins
Robert Collins <robe...@robertcollins.net> added the comment: Whats the use for *unittest* - a tool to help folk develop - to run a test which is only present in sourceless form? -- ___ Python tracker <rep...@bugs.python.or

[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Robert Collins
Robert Collins <robe...@robertcollins.net> added the comment: Oh, and why look for __init__ - in part, because it predates namespace packages, but also because unlike regular imports unittest will do negative things like reading the entire filesystem oth

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-19 Thread Robert Collins
Robert Collins <robe...@robertcollins.net> added the comment: Re: backporting this. I think backporting to 3.6/3.7 makes a lot of sense - bugfix and prerelease respectively. For 2.7, this bug has been around for ages, the patch is small, and I have no objection - but the RM has alread

[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Robert Collins
Robert Collins added the comment: We've now spent more time debating the deprecation that we would have saved if it had been deprecated. Deprecations cost user good will. Whilst I very much want to delete all assertions in favour of matchers, which would allow composed symmetry rather than

[issue9216] FIPS support for hashlib

2017-01-17 Thread Robert Collins
Robert Collins added the comment: @doug - I don't see how a separate fips module *wouldn't* solve it: - code that uses md5 in security contexts wouldn't be able to call it from the fips module, which is the needed outcome - code that uses md5 and isn't fips compliant would be importing from

[issue9216] FIPS support for hashlib

2017-01-16 Thread Robert Collins
Robert Collins added the comment: A few thoughts; usedforsecurity=xxx seems awkward: I wouldn't want, as a user of hashlib, to have to put that in literally every use I make of it. If I understand the situation correctly, the goal is for both linters, and at runtime, identification

[issue17188] Document 'from None' in raise statement doc.

2016-09-22 Thread Robert Collins
Changes by Robert Collins <robe...@robertcollins.net>: -- nosy: +rbcollins ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17188> ___

[issue22431] Change format of test runner output

2016-09-20 Thread Robert Collins
Robert Collins added the comment: +1 to changing the UI for 3.7 - just noting that if you're machine processing the output, the TUI isn't an appropriate channel. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2016-09-12 Thread Robert Collins
Robert Collins added the comment: Ok, so we need to figure out whether the tests are wrong, or the 'fix' is wrong. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2016-09-12 Thread Robert Collins
Robert Collins added the comment: I think the patch should either be rejected, or also handle trailing spaces: if we're taking the RFC definition of whitespace not being structural then we should also eat trailing space, which will change the check for extra data in decode to just checking

[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2016-09-12 Thread Robert Collins
Robert Collins added the comment: I find details like this extremely useful in the main docs, so please do add there. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2016-09-12 Thread Robert Collins
Robert Collins added the comment: @Chris - I don't like the idea of making new classes on the fly like that, it seems more likely to provoke bugs (as type(case) != SomeSpecificClass) anymore after that, vs just not relying on __str__ directly. Going back to Michael's proposal of short

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Robert Collins
Robert Collins added the comment: Please add the reproducer as a test case (in test_dict.py I think) - even though it needs elementree to trigger it is a dict bug :). I also wonder if there are similar cases lying under other C collections like list, tuple and set. E.g. list.find() calls obj

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2016-09-12 Thread Robert Collins
Robert Collins added the comment: Given two (or more) parameters where one is unicode and one is not, upcasting will occur multiples times in path.join on windows: - '\\' is str and will cast up safely in all codecs - the other str (or bytes) parameter will be upcast using

[issue26240] Docstring of the subprocess module should be cleaned up

2016-09-12 Thread Robert Collins
Changes by Robert Collins <robe...@robertcollins.net>: -- nosy: +rbcollins ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26240> ___

[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2016-09-12 Thread Robert Collins
Robert Collins added the comment: It is a bugfix, but we should document when it started working using the version added segment IMO. I think addding this to 3.6 now would be ok. -- nosy: +rbcollins ___ Python tracker <rep...@bugs.python.org>

[issue21254] PropertyMock refuses to raise AttributeErrror as a side effect

2016-09-11 Thread Robert Collins
Robert Collins added the comment: I could imagine doing some complex things to let you get at the AttributeError in this case but *not* when a different descriptor was added to type(a_mock), but I think it would confusing overall. This might be worth a doc tweak to cover it? -- stage

[issue21254] PropertyMock refuses to raise AttributeErrror as a side effect

2016-09-11 Thread Robert Collins
Robert Collins added the comment: We're poking at this at the kiwipycon sprints -- nosy: +rbcollins ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28087] macOS 12 poll syscall returns prematurely

2016-09-11 Thread Robert Collins
Robert Collins added the comment: @Ned - any objection to my committing this at this point? -- nosy: +rbcollins ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28087] macOS 12 poll syscall returns prematurely

2016-09-11 Thread Robert Collins
Changes by Robert Collins <robe...@robertcollins.net>: -- stage: patch review -> commit review ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2016-09-11 Thread Robert Collins
Robert Collins added the comment: So I think its fine to have a __len__ reporting 4. tuple(..) works via the iter() call, but thats really just a thunk to keep existing code working, and so __len__ for the same reason makes sense. On the documentation issue, yes, updating the docs

[issue24412] setUpClass equivalent for addCleanup

2016-09-11 Thread Robert Collins
Robert Collins added the comment: Btw some things to be aware of in addressing this: - we will need tests that catchable exceptions raised from a setUpModule or setUpClass cause cleanups already registered to run - if (and I'd need to check this) setUpModule or setUpClass can nest - I think

[issue24412] setUpClass equivalent for addCleanup

2016-09-11 Thread Robert Collins
Robert Collins added the comment: So, thank you for the patch. However - there's no need for a metaclass here, and its actively harmful to comprehending the code. As I suggested earlier, please decouple the cleanups implementation and then consume it from the two places that it will be needed

[issue27213] Rework CALL_FUNCTION* opcodes

2016-09-11 Thread Robert Collins
Robert Collins added the comment: See http://bugs.python.org/issue28086 - this introduced a regression in the test suite. -- nosy: +rbcollins ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28086] test.test_getargs2.TupleSubclass test failure

2016-09-11 Thread Robert Collins
New submission from Robert Collins: The test.test_getargs2.TupleSubclass test is failing in master. I suspect its a fastcall fallout. -- messages: 275879 nosy: rbcollins, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: test.test_getargs2

[issue27348] traceback (and threading) drops exception message

2016-06-29 Thread Robert Collins
Robert Collins added the comment: hmm, can you give me a change to page this in? I'm pretty sure I saw breakage in external libraries prompting me to add the test and fix. I'd rather not recause that. -- ___ Python tracker <rep...@bugs.python.

[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-21 Thread Robert Collins
Robert Collins added the comment: Chris, I suggested altering assertAlmostEqual in http://bugs.python.org/issue27198#msg267187 :) - I took your agreement with that as a good thing and didn't reply because I had nothing more to add. IMO the status of this issue is as you indicated: you needed

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Robert Collins
Robert Collins added the comment: There are two related things here. Firstly, the generator's body will run without the patch (because the wrapping function has try: return decorated(..) finally: unpwatch() Secondly, the wrapping function is itself not a generator, and anything

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Robert Collins
Robert Collins added the comment: Once fixed in CPython, we'll put the backport in mock, for folk using older Python's. -- versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-03 Thread Robert Collins
Robert Collins added the comment: Future direction: hamcrest style matchers. You can read more about them in the context of unittest https://rbtcollins.wordpress.com/2010/05/10/maintainable-pyunit-test-suites/ and http://testtools.readthedocs.io/en/latest/for-test-authors.html#matchers

[issue27152] Additional assert methods for unittest

2016-06-03 Thread Robert Collins
Robert Collins added the comment: I'm fine with these as a mixin - they are all very generic and unambiguously named. I'd marginally prefer the opt-in mixin over adding them to the base class. Ideally they'd be matchers, but since I haven't ported that upstream yet, thats asking for more

[issue27197] mock.patch interactions with "from" imports

2016-06-03 Thread Robert Collins
Robert Collins added the comment: So its a feature of mock that it can mock a module that doesn't exist. And the semantics of the import system are designed to be very cheap when a module is already imported - so when 'patchbug.a' is in sys.modules, import will correctly return it rather than

[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-03 Thread Robert Collins
Robert Collins added the comment: Thanks for proposing this. I really don't want to add new assertions to unittest, and I certainly don't want to add narrow usage ones like this, nor ones that are confusingly named (this has nothing to do with files, but 'close' is a verb for files, just like

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-22 Thread Robert Collins
Robert Collins added the comment: I don't particularly like either name FWIW :) - but sure, we can add a different name and deprecate assertCountEqual - but before we do anything lets look up the previous issue where the rename was done

[issue27063] Some unittest loader tests are silently skipped by mistake

2016-05-20 Thread Robert Collins
Robert Collins added the comment: LGTM too -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27063> ___ ___ Python-bugs-list

[issue26807] mock_open()().readline() fails at EOF

2016-05-15 Thread Robert Collins
Robert Collins added the comment: I've committed a minimal variation - thanks for the patches. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http

[issue26807] mock_open()().readline() fails at EOF

2016-05-12 Thread Robert Collins
Robert Collins added the comment: So something like for line in _state[0]: yield line while True: yield '' Will probably do it just fine. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26807] mock_open()().readline() fails at EOF

2016-05-11 Thread Robert Collins
Robert Collins added the comment: Actually, further inspection and a teddybear with Angus Lees uncovers this: diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py

[issue26807] mock_open()().readline() fails at EOF

2016-05-11 Thread Robert Collins
Robert Collins added the comment: ./python Lib/unittest/test/testmock/testmock.py ..s. -- Ran 80 tests in 0.180s OK (skipped=1) So thats great. I am

[issue26859] unittest fails with "Start directory is not importable"

2016-04-28 Thread Robert Collins
Robert Collins added the comment: Could you please add a test case. -- nosy: +rbcollins stage: patch review -> test needed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue26807] mock_open()().readline() fails at EOF

2016-04-25 Thread Robert Collins
Robert Collins added the comment: You're changing _mock_call but readline is actually implemented in _readline_side_effect - just changing that should be all thats needed (to deal with StopIteration). You will however need to fixup the return values since the test I added is a bit wider than

[issue26807] mock_open()().readline() fails at EOF

2016-04-25 Thread Robert Collins
Robert Collins added the comment: Thanks Yolanda. I've touched up the test a little and run a full test run (make test) - sadly it fails: there is an explicit test that StopIteration gets raised if you set it as a side effect

[issue26807] mock_open()().readline() fails at EOF

2016-04-22 Thread Robert Collins
Robert Collins added the comment: Thanks Yolanda, that looks sane - could you perhaps add a test for this in Lib/unittest/tests/test_mock/ ? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26807] mock_open()().readline() fails at EOF

2016-04-20 Thread Robert Collins
New submission from Robert Collins: >>> import unittest.mock >>> o = unittest.mock.mock_open(read_data="fred") >>> f = o() >>> f.read() 'fred' >>> f.read() '' >>> f.readlines() [] >>> f.readline() Traceback (most recent

[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2016-03-19 Thread Robert Collins
Changes by Robert Collins <robe...@robertcollins.net>: -- stage: needs patch -> test needed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue24959] unittest swallows par t of stack trace when raising AssertionError in a TestCase

2016-03-19 Thread Robert Collins
Robert Collins added the comment: I'm fairly sure its eating the stack frames because the calling frames are annotated __unittest__ - its technically a feature :/. -- title: unittest swallows part of stack trace when raising AssertionError in a TestCase -> unittest swallows pa

[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2016-03-19 Thread Robert Collins
Robert Collins added the comment: Yes, it is... ish. The frame skipping code occurs when we serialise exceptions, and we pass a limit in. The limit is calculated on the main exception only. If the cause has a longer exception than the limit we calculated, you'd see this behaviour. Probably

[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2016-03-15 Thread Robert Collins
Robert Collins added the comment: I think this is a valid mock bug; it likely needs some thoughtful exhaustive testing, and obviously support added for it. -- stage: -> test needed title: unittest.mock does not wrap dict objects correctly -> unittest.mock does not wrap dunder m

[issue25894] unittest subTest failure causes result to be omitted from listing

2016-03-15 Thread Robert Collins
Robert Collins added the comment: The basic model is this: - a test can have a single outcome [yes, the api is ambiguous, but there it is] - subtests let you identify multiple variations of a single test (note the id tweak etc) and *may* be reported differently We certainly must not report

[issue24263] unittest cannot load module whose name starts with Unicode

2016-03-15 Thread Robert Collins
Robert Collins added the comment: sih4sing5hong5 - I think we do need a test in fact - it can be done using mocks, but right now I think the patch has a bug - it looks for isidentifier on $thing.py, but not on just $thing (which we need to do to handle packages, vs modules

[issue25320] unittest loader.py TypeError when code directory contains a socket

2016-03-14 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch; the test may be redundant but not enough to matter for now - and the bug really doth need fixing, so I've applied it as-is. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Robert Collins
Robert Collins added the comment: So this test script is making a 65K entry dict, and each item is a new, separate 65K string. The strings are allocated in single chunks, so we should expect couple hundred reference count writes total. AIUI involuntary context switches occur when

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-03-14 Thread Robert Collins
Robert Collins added the comment: @serhiy, how is that different to what I said? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue23890] assertRaises increases reference counter

2016-03-13 Thread Robert Collins
Robert Collins added the comment: I don't think we make any guarantees for or against references, but - we attempt to free references already (see how we call clear_frames), so this is a bug, pure and simple. -- ___ Python tracker <

[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Hmm, this is a little surprising, but - why are you raising AssertionError like that - thats what assertRaises is for. -- stage: -> needs patch ___ Python tracker <rep...@bugs.python.org> <http://bug

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-03-13 Thread Robert Collins
Robert Collins added the comment: The context manager errors if *nothing* matches, not if *everything* matches, which is very different to catch_warnings because the filters are used to *exclude* warnings, and excess warnings are errors there. Because of that, there's little if any reason

[issue20556] Use specific asserts in threading tests

2016-03-13 Thread Robert Collins
Robert Collins added the comment: @Serhiy care to commit it? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20556> ___ ___ Pyth

[issue25520] unittest load_tests protocol not working as documented

2016-03-13 Thread Robert Collins
Robert Collins added the comment: What version of python are you testing with? unittest 2.7 has a number of bugs vis-a-vis namespaces and discovery. If you're testing with less than 3.5, or perhaps 3.6, please try with unittest2, which has the same fixes as the stdlib unittest

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Can we just stop running the test suite directly? python -m unittest test.test_traceback should work fine and as quickly, ... I'd like to delete all the __main__ in the test suite as cruft TBH. The patch would be ok if ugly, its a bit of a magic number

[issue25690] Replacement for unittest.mock.mock_open

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Hmm, I haven't looked closely, but some high level thoughts. I'm worried about making mock too complex here. We already say folk should use a VFS for complex file based tests, and there's quite a chunk of code you're adding - perhaps better to just use a VFS

[issue24780] unittest assertEqual difference output foiled by newlines

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch; reviewed in rietvald. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue19217] Calling assertEquals for moderately long list takes too long

2016-03-13 Thread Robert Collins
Robert Collins added the comment: The new output seems ok to me? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19217> ___ ___

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2016-03-13 Thread Robert Collins
Robert Collins added the comment: I think we should close this again: if you subclass something you need to implement the full public API. raw has been in that API since 2010!. It's a shame that folk have been implementing just-enough, rather than the actual API, but I don't see that has all

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2016-03-13 Thread Robert Collins
Robert Collins added the comment: @mbussonn - I don't see an updated non-tty-checking patch from you? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26481] unittest discovery process not working without .py source files

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Sorry, I missed the little footnote on case 4 about still supporting source-less distributions. I guess in that context we do still need to support this. However - please check that this does indeed happen on Python master - 3.6. unittest does evolve

[issue26481] unittest discovery process not working without .py source files

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Python has stopped supporting .pyc-only distributions - see https://www.python.org/dev/peps/pep-3147/#case-3-pycache-foo-magic-pyc-with-no-source - and so, while what you are seeing is inconsistent with import in some older python's, it is not a bug in newer

[issue25900] unittest ignores the first ctrl-c when it shouldn't

2016-03-13 Thread Robert Collins
Robert Collins added the comment: I'd rather make this super simple: just terminate the test run immediately. We can catch KeyBoardInterrupt in the UI layer to still permit outputting summary information. That removes one more source of global state that makes testing fragile

[issue22625] When cross-compiling, don’t try to execute binaries

2016-03-13 Thread Robert Collins
Robert Collins added the comment: So in general: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/System-Type.html#System-Type and https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html There are three platforms in play

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-11-29 Thread Robert Collins
Robert Collins added the comment: @Martin I was wrong re: the defs - they only cover function vs data, not return codes. So it looks fine to me. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2015-11-27 Thread Robert Collins
Robert Collins added the comment: @Serhiy, EXIT_FAILURE is used in Python's C code itself (just once admittedly, and then we use 0 sometimes for success and sometimes for errors, and then 1 for errors... aiee.) FWIW to the extent that folk want to write posix code in Python, I'm all

[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-11 Thread Robert Collins
Robert Collins added the comment: The fix is appropriate (we might want to think about symlinks in the future). I'd very much like a test for it (in Lib/unittest/test/test_discovery.py) and it should be applied to 3.5, master - older versions had this wrapped up in simpler code and won't fail

[issue25111] Broken compatibility in FrameSummary equality

2015-09-29 Thread Robert Collins
Robert Collins added the comment: LGTM too. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25111> ___ ___ Python-bugs-list

[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Robert Collins
Robert Collins added the comment: wouldn't changing walk_stack to add one more f_back be better? Seems odd to work around it... -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Robert Collins
Robert Collins added the comment: Hmm, I think we can fix this. Its leaking due to the use of a helper I think. So - we should just fix this [and add a test, since clearly the test coverage is insufficient] -- ___ Python tracker <

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-30 Thread Robert Collins
Robert Collins added the comment: It seems to me that how, and when, Python exits the process is important to folk who will never ever touch the C API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5319

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-27 Thread Robert Collins
Robert Collins added the comment: 2.7 is sufficiently different that I haven't backported this there - plus the report said it was introduced in 3.4. If someone can show this doesn't work in 2.7 and also supply a patch, we could apply

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-27 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21112

[issue2786] Names in function call exception should have class names, if they're methods

2015-08-27 Thread Robert Collins
Robert Collins added the comment: Here are some options. a) Don't make the new thing public - instead export within Python.exe the existing private symbol _...withNames. Pros: no change to public API. Cons: extension modules using the public API cannot make these sorts of errors clearer. b

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-26 Thread Robert Collins
Robert Collins added the comment: def main(): try: thing() except SomethingChanged: exit(1) except BinaryDiff: exit(2) except: exit(3) This is the sort of pattern e.g. 'diff' has. Should exit(3) there become exit(1) ? exit(1) means 'succeeded

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-26 Thread Robert Collins
Robert Collins added the comment: Right. So I think one could also propose that the default exception handling should also change to this new number, but it is a different situation - programs don't conflict with that - they allow it to bubble up, but this situation is outside its control

[issue22936] traceback module has no way to show locals

2015-08-25 Thread Robert Collins
Robert Collins added the comment: This itself is fixed. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22936

[issue23552] Have timeit warn about runs that are not independent of each other

2015-08-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed stage: patch review - resolved status: open - closed versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23552

[issue23183] timeit CLI best of 3: undocumented output format

2015-08-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23183

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21112

[issue24193] Make LOGGING_FORMAT of assertLogs configurable

2015-08-24 Thread Robert Collins
Robert Collins added the comment: I don't know if or when it was moved, but right now: ./python -m pydoc unittest.case.TestCase.assertLogs ... the docs for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24193

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-24 Thread Robert Collins
Robert Collins added the comment: Hi, just to say - I'm happy to help steer this through. I think its an important ecosystem fixup. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24294

  1   2   3   4   5   6   >