[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-07-31 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22932 ___ ___ Python

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-07-31 Thread Robert Collins
Robert Collins added the comment: Applied to 3.4 and up. Thanks for the patch! -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22932

[issue17013] Allow waiting on a mock

2015-07-31 Thread Robert Collins
Robert Collins added the comment: Now at https://github.com/testing-cabal/mock/issues/189 -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17013

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2015-07-30 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch @planet36, however I think this is sufficiently large a change that we should also have a test case for it. I'm also retargeting this to the current open branches for feature work - 3.6. -- nosy: +rbcollins stage: commit review

[issue24758] unittest.mock.Mock's new unsafe feature needs a better error message

2015-07-30 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24758 ___ ___ Python

[issue24758] unittest.mock.Mock's new unsafe feature needs a better error message

2015-07-30 Thread Robert Collins
Robert Collins added the comment: How were you setting/introducing your assertions on the mocks? e.g. could you supply a small sample script showing what used to work? Thanks. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2015-07-30 Thread Robert Collins
Robert Collins added the comment: Bah, wrong stage. patch review. -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12932

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-07-30 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch. Applied to 3.4 through 3.6. -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue21657] pip.get_installed_distributions() Does not return packages in the current working directory

2015-07-30 Thread Robert Collins
Robert Collins added the comment: Yes, Python vendors pip, but is not maintaining it - it should be filed in https://github.com/pypa/pip/issues. -- nosy: +rbcollins resolution: third party - rejected status: pending - closed ___ Python tracker rep

[issue23589] Redundant sentence in FAQ

2015-07-29 Thread Robert Collins
Robert Collins added the comment: @Demian, I agree that there are more improvements we can make. The current patch addresses the specific issue of this bug, and if you wished to make a new issue with further improvements that would be great. I'm going to apply this patch now though

[issue20556] Use specific asserts in threading tests

2015-07-29 Thread Robert Collins
Robert Collins added the comment: ping @serhiy - there's a bug in the patch. Moving back to patch review. -- nosy: +rbcollins stage: commit review - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20556

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2015-07-29 Thread Robert Collins
Robert Collins added the comment: So, I think this is worth applying. The discussion around :ipp etc is irrelevant here: this patch changes large or negative ints to be a valueerror, as non-ints are. The only question is where. I think this is in the category of 'will only break buggy

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2015-07-29 Thread Robert Collins
Robert Collins added the comment: ok, 3.6 only. -- versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20059

[issue23447] Import fails when doing a circular import involving an `import *`

2015-07-29 Thread Robert Collins
Robert Collins added the comment: Yep: The issue has no clear solution , e.g., no agreement on a technical solution or if it is even a problem worth fixing. Brett is saying he doesn't consider this a bug. Steven says he doesn't have time to push it forward. Oh, I see there is a patch

[issue23589] Redundant sentence in FAQ

2015-07-29 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/issue23589

[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-07-29 Thread Robert Collins
Robert Collins added the comment: @ezio I think you should commit what you have so far. LGTM. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23144

[issue20557] Use specific asserts in io tests

2015-07-29 Thread Robert Collins
Robert Collins added the comment: @serhiy I think you should apply this: you're a committer, and no committers have objected in over a year. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20557

[issue22227] Simplify tarfile iterator

2015-07-29 Thread Robert Collins
Robert Collins added the comment: @serhiy could you update the patch with the review feedback? Thanks. Moving back to patch review. Lars hasn't commented on this in a year, so I think we should go ahead once the patch is fixed: e.g. you should update the comments and commit it directly

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-07-29 Thread Robert Collins
Robert Collins added the comment: LGTM - lukasz, do you want to commit this, or would you like someone else to if you're too busy? Looks like we should patch this in 3.4/3.5./3.6 at this point. -- nosy: +rbcollins versions: +Python 3.4, Python 3.6

[issue23447] Import fails when doing a circular import involving an `import *`

2015-07-29 Thread Robert Collins
Robert Collins added the comment: reset. -- nosy: +rbcollins resolution: not a bug - stage: - needs patch status: closed - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23447

[issue22141] rlcompleter.Completer matches too much

2015-07-29 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: commit review - patch review status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22141

[issue23254] Document how to close the TCPServer listening socket

2015-07-28 Thread Robert Collins
Robert Collins added the comment: Applied to 2.7/3.4/3.5/3.6. Thanks! -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23254

[issue24651] Mock.assert* API is in user namespace

2015-07-28 Thread Robert Collins
Robert Collins added the comment: I don't mind if this is open or closed: we've now got a clear set of requirements *should* someone want to work on it:: - it would feel as convenient to use as the current API does - it would be possible to be both forward and backwards compatible

[issue23426] run_setup is broken in distutils

2015-07-27 Thread Robert Collins
Robert Collins added the comment: The change in exec doesn't make sense to me (but see lower :)) __file__ should be in globals, not locals, right? Also if it is right, then exec(foo, g) should be equivalent :) The reset of the patch looks ok. But I can see your patch shows this breaking

[issue23426] run_setup is broken in distutils

2015-07-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/issue23426

[issue24740] make patchcheck doesn't detect changes if commit is done first

2015-07-27 Thread Robert Collins
New submission from Robert Collins: ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 0 files Fixing whitespace ... 0 files Fixing C file whitespace ... 0 files Fixing docs whitespace ... 0 files Docs modified ... NO Misc/ACKS updated ... NO Misc

[issue22141] rlcompleter.Completer matches too much

2015-07-27 Thread Robert Collins
Robert Collins added the comment: I'm struggling to understand this bug. I've tried idle and plain cPython and neither exhibit it. I suspect thats due to how readline is itself tokenizing things. Python 3.6.0a0 (default:ef5a2ba9df62, Jul 28 2015, 15:48:19) [GCC 4.9.1] on linux Type help

[issue17527] PATCH as valid request method in wsgiref.validator

2015-07-26 Thread Robert Collins
Robert Collins added the comment: Applied to 2.7/3.4/3.5(for .1)/3.6 -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-07-25 Thread Robert Collins
Robert Collins added the comment: @serhiy - I'm a little confused about the state of this patch. It seems like you need more review? -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989

[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins
Robert Collins added the comment: I know it 'works', I just think its not appropriate here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24710

[issue21750] mock_open data is visible only once for the life of the class

2015-07-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750

[issue2091] file accepts 'rU+' as a mode

2015-07-25 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/issue2091

[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Robert Collins
Robert Collins added the comment: @larry thanks - that was my inclination too. Applied to 3.6 @Serhiy I've not done a warning in 3.4/3.5 because - the behaviour is already broken, this patch just catches it a lot earlier (on open rather than subsequent operations

[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins
Robert Collins added the comment: We can't use from_exception in __init__ because from_exception's job is to look up __traceback__, but the legacy API allows arbitrary tb objects which may not be exc.__traceback__, and modifying exc.__traceback__ or creating a shim object just to be able

[issue10388] spwd returning different value depending on privileges

2015-07-25 Thread Robert Collins
Robert Collins added the comment: Too late for 3.5 for this IMO. -- nosy: +rbcollins versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10388

[issue18787] Misleading error from getspnam function of spwd module

2015-07-25 Thread Robert Collins
Robert Collins added the comment: Sounds like we want something analogous to http://bugs.python.org/file33404/fix_error_message_getspall_v2.patch for this bug. Moving to patch needed. It looks like it would be easily tested too, so I'd like to see a test too please. -- nosy

[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Robert Collins
Robert Collins added the comment: Looks sane to me. Should go in 3.6 if we're going to do this or get closed to remove cognitive overhead in the issue tracker. No point backporting this to older releases. -- nosy: +rbcollins versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5

[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins
Robert Collins added the comment: Oh I see, - different things could have been meant but that application will work. But - please don't use self.from_exception: its a class method, so TracebackException.from_exception(...) is the right spelling

[issue24710] Class name hardcoded in TracebackException.from_exception()

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

[issue24651] Mock.assert* API is in user namespace

2015-07-25 Thread Robert Collins
Robert Collins added the comment: Some great points raised here. Yes, we'd need .calls and .returnvalue and so on all made accessible via another route, and that would be a less direct spelling. e.g. a_mock.returnvalue = 3 - # function set_returnvalue(a_mock, 3) or # separate object to get

[issue24651] Mock.assert* API is in user namespace

2015-07-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651 ___ ___ Python

[issue10388] spwd returning different value depending on privileges

2015-07-25 Thread Robert Collins
Robert Collins added the comment: I'm moving this back to patch review - it needs a test, particularly because of the question I have around setspent. -- stage: commit review - patch review ___ Python tracker rep...@bugs.python.org http

[issue10388] spwd returning different value depending on privileges

2015-07-25 Thread Robert Collins
Robert Collins added the comment: The man page for setspent says this: The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure

[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Robert Collins
Robert Collins added the comment: So, is this specific patch ok to apply, or are we going to reject it? I don't particularly care either way, but having this issue open and stalled just adds cognitive load to working with the bug tracker. FWIW I agree that it should not be backported

[issue24699] TemporaryDirectory is cleaned up twice

2015-07-24 Thread Robert Collins
Robert Collins added the comment: I think you may need to instrument TemporaryDirectory._cleanup to be sure, but it sounds like its being run twice. now, you're not using it like a context manager (at least as far as your code shows), so it must be happening from the weakref. https

[issue21750] mock_open data is visible only once for the life of the class

2015-07-23 Thread Robert Collins
Robert Collins added the comment: @Paul So the problem is that its never been a high fidelity thing in that sense In that: 3.3 - read() is a constant for the thing opened from the mock 3.4 - read() works once and only once across all opened files from the mock 3.5 today - read() works once

[issue21750] mock_open data is visible only once for the life of the class

2015-07-23 Thread Robert Collins
Robert Collins added the comment: Discussed with Michael Foord; we're going to go with the -2 patch - the new behaviour. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750

[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Robert Collins
Robert Collins added the comment: The ordering is deliberate to support folk migrating from tearDown to cleanups - its not a bug. I thought we documented it clearly - https://docs.python.org/dev/library/unittest.html#unittest.TestCase.doCleanups - but if you wanted to submit improvements

[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Robert Collins
Robert Collins added the comment: So yeah - setup + cleanup is LIFO. setup + teardown *can* be LIFO [depends on where you upcall] setup + teardown + cleanup CANNOT be LIFO in all cases: we have to pick one, and either local-first or local-last. So it is ultimately somewhat arbitrary

[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread Robert Collins
Robert Collins added the comment: @Larry - should this go in 3.5, or would you rather it not? -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2091

[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Robert Collins
Robert Collins added the comment: Argh, and my memory had things inverted. Anyhow - the inheritance story was the big thing, and -1 on changing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24694

[issue24695] Don't print traceback header if traceback is None in TracebackException

2015-07-23 Thread Robert Collins
Robert Collins added the comment: Huh,indeed. So clearly we should have a test for that behaviour (and fix it). We're very close to the 3.5 release date, but this is a regression - care to whip up a patch? -- ___ Python tracker rep

[issue2091] file accepts 'rU+' as a mode

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Updated patch. I'm not going to apply right now - giving it a little time to let folk chime on whether this should be applied all the way back to 3.4, or not. My inclination is to only apply it to 3.6. -- nosy: +rbcollins Added file: http

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Robert Collins
Robert Collins added the comment: I've applied this to 3.6. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13938 ___ ___ Python

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Robert Collins
Robert Collins added the comment: So, I don't think I've ever done 2.x stuff with hg here, I'll leave this open till I've looked up the docs and applied it safely. ... unless you'd like to do the 2.7 application ? :) -- ___ Python tracker rep

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2015-07-22 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed stage: commit review - resolved status: open - closed versions: +Python 3.6 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22153

[issue9232] Allow trailing comma in any function argument list.

2015-07-22 Thread Robert Collins
Robert Collins added the comment: FWIW I would like to see this, but I think it does need a PEP given the contention so far. For that, we need a BDFL delegate AIUI. -- nosy: +rbcollins versions: +Python 3.6 -Python 3.5 ___ Python tracker rep

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Thanks for the update, it looks good to me. Applied to 3.4 and up. I'm not applying to 2.7 at this stage. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22153

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Not clear to me either: I figured that after three years the relevance to 2.7 was pretty low, but I can transplant it if you think thats relevant. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 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/issue13938

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

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Moving this back to patch review since I'm 90% sure that the patch won't apply anymore (if I had a little more time I'd pull it down and double check) - but I've hit this myself and would totally commit it if updated. -- nosy: +rbcollins stage: commit

[issue21750] mock_open data is visible only once for the life of the class

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Which part of the docs specifically? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python-bugs

[issue8585] zipimporter.find_module is untested

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Applied to 3.6 only. -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

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

2015-07-21 Thread Robert Collins
Robert Collins added the comment: Ok, so as a doc bug this should still be tracked here - I'm going to reopen it to reflect that, hope thats ok. -- assignee: - docs@python components: +Documentation nosy: +docs@python resolution: not a bug - status: closed - open title

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: So the 1.1.4 behaviour matches that of a VFS most closely. But, see the earlier messages, it does do only and precisely because it breaks regular mock idioms. Thus I think we're better off with the new patch, which addresses the issue with reuse of the mocks

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: Fixup patch. I've tested this with the reported failures and they all work. -- Added file: http://bugs.python.org/file39967/issue-21750-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: But - its worth discussing. Perhaps we should roll this all back, and just say 'use a vfs layer for tests like this'. The problem in doing that, is that the @patch def test_foo... use case is actually pretty common IME, and this conflicts with the @patch

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: @pkoning in Python3.3 == mock 1.0.1, m = mock_open(read_data='f') m().read() 'f' m().read() 'f' x = m() x.read() 'f' x.read() 'f' x = m() y = m() x.read() 'f' y.read() 'f' in 3.4 == mock 1.1.{0,1,2,3}, and 1.2.0 m = mock_open(read_data='f') m

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: Ok, so - good to commit to 3.4 and up? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___ Python

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Robert Collins
New submission from Robert Collins: We had a discussion on the list sparked by the assret checking, and in it I proposed that the API would be cleaner if the asserts were module functions. e.g. rather than:: a_mock.assert_called_with(Foo) assert_called_with(a_mock, Foo) Michael has

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +berker.peksag, kushal.das, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: There are already explicit tests for that, do you want another one? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750

[issue24653] Mock.assert_has_calls([]) incorrectly passes

2015-07-17 Thread Robert Collins
Robert Collins added the comment: This might go back further, haven't checked 3.3, but IIRC we're only doing fixes on 3.4 up anyhow. -- nosy: +berker.peksag, kushal.das, michael.foord versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue24653] Mock.assert_has_calls([]) incorrectly passes

2015-07-17 Thread Robert Collins
New submission from Robert Collins: From https://github.com/testing-cabal/mock/issues/243 from unittest import mock mmock = mock.MagicMock() mmock.foobar(baz) mmock.assert_has_calls([]) # No exception raised. Why?mmock.assert_has_calls(['x']) # Exception raised as expected. --- Traceback

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: The fix for this uncovered more testing / scenarios that folk use mock_open for that were not accounted for. I'm reverting it from mock, and am going to roll-forward for Python: I should have a fix in a day or two and we can fix it more completely

[issue24633] Not a directory: '//anaconda/lib/python2.7/site-packages/readme/__about__.py'

2015-07-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- keywords: +patch Added file: http://bugs.python.org/file39924/issue24633.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24633

[issue24633] Not a directory: '//anaconda/lib/python2.7/site-packages/readme/__about__.py'

2015-07-14 Thread Robert Collins
Robert Collins added the comment: So, README is a valid package name. readme conflicting with README on case insensitive filesystems is a special case, but the general problem remains. We've no particular reason to use README rather than e.g. README.txt, which would open with a much more

[issue21750] mock_open data is visible only once for the life of the class

2015-07-14 Thread Robert Collins
Robert Collins added the comment: This is a regression in 3.5 vs 3.3 I think. It would have worked with the initial mock import. https://github.com/testing-cabal/mock/issues/280 Minimal reproducer case attached (With commentted out bits to switch out the mock for the rolling backport etc

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2015-07-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +rbcollins versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18622

[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

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2015-07-14 Thread Robert Collins
Robert Collins added the comment: Applying this to 3.4 and up with a test. Laurent, it would be good to sign the CLA - since your change here is minimal and Nicola has, I'm just going ahead. -- ___ Python tracker rep...@bugs.python.org http

[issue21750] mock_open data is visible only once for the life of the class

2015-07-14 Thread Robert Collins
Robert Collins added the comment: I think its worth noting that both the original mock_open and the new one are entirely broken for mocking access to multiple files. But, the breakage was not deliberate, and as the mock-280 example shows, folk subclassing a test suite will be surprisingly

[issue21750] mock_open data is visible only once for the life of the class

2015-07-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- keywords: +patch Added file: http://bugs.python.org/file39928/issue-21750.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750

[issue23004] mock_open() should allow reading binary data

2015-07-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +rbcollins versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23004

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2015-07-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- assignee: michael.foord - rbcollins resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18622

[issue21750] mock_open data is visible only once for the life of the class

2015-07-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- assignee: - rbcollins versions: +Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- type: - enhancement versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24629

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread Robert Collins
New submission from Robert Collins: this is a bad practice - it interferes with test discovery and with the use of mock (see https://github.com/testing-cabal/mock/issues/250). We could move main.py to mainmod.py or something -- messages: 246704 nosy: rbcollins priority: normal

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-07-13 Thread Robert Collins
Robert Collins added the comment: Setting some basic design parameters here. Its ok for a test to know if it itself has decided on some status. See e.g. testtools.expectThat for a related design thing. Making some official API within the test itself so code after the failure can take

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - duplicate superseder: - unittest.__init__:main shadows unittest.main ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24629

[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

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-13 Thread Robert Collins
Robert Collins added the comment: This looks fine to me, I'm going to apply it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23661

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-13 Thread Robert Collins
Robert Collins added the comment: Also reported in the mock project as https://github.com/testing-cabal/mock/issues/264 -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23661

[issue24134] assertRaises can behave differently

2015-06-29 Thread Robert Collins
Robert Collins added the comment: Hi, catching up (see my mail to -dev about not getting tracker mail). Deprecations++. Being nice for folk whom consume unittest2 which I backport to everything is important to me :). -- ___ Python tracker rep

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

2015-06-22 Thread Robert Collins
Robert Collins added the comment: Are the module names valid in import statements? it would help if you could perhaps attach a little tar/zip file with an example failure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Robert Collins
Robert Collins added the comment: It would be nice for symmetry. I mean, setUpClass isn't needed either, and we have it ;). however, we actually have two contexts this would be called from - setUpClass and setUpModule; both share their internals. So we probably need a decoupled cleanups

[issue24424] xml.dom.minidom: performance issue with Node.insertBefore()

2015-06-10 Thread Robert Haschke
New submission from Robert Haschke: Node.insertBefore() has a serious performance issue: Using self.childNodes.index(refChild) it searches for the correct index in childNodes where the newChild should be inserted. However, index() is linear in time w.r.t. the size of childNodes. Hence

[issue4753] Faster opcode dispatch on gcc

2015-05-27 Thread Robert Collins
Robert Collins added the comment: FWIW I'm interested and willing to poke at this if more testers/reviewers are needed. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753

[issue9858] Python and C implementations of io are out of sync

2015-05-20 Thread Robert Collins
Robert Collins added the comment: I think ignoring weakref is wrong: it means the two implementations are different. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9858

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-28 Thread Robert Collins
Robert Collins added the comment: Ah the user model? I think the following: If I run 'python -m unittest' in a directory, then I expect to run all of the tests contained within that directory tree, and no others. Does that definition help

<    1   2   3   4   5   6   7   8   9   10   >