[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-12 Thread Robert Collins
Robert Collins added the comment: w.r.t. a new linecache interface, it looks like we need two attributes from f_globals: __name__ and __loader__, so that we can eventually call __loader__.get_source(__name__). One small change (to let me focus on traceback) would be to add another kw

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2015-01-09 Thread Robert Kuska
Robert Kuska added the comment: This commit (probably) breaks aarch64 python build. See https://bugzilla.redhat.com/show_bug.cgi?id=1174037 Build was done with libffi 3.1.6, I have also tried with latest upstream libffi version with same result. (gdb) b ReturnRect Function ReturnRect

[issue12681] unittest expectedFailure could take a message argument like skip does

2015-01-02 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12681 ___ ___ Python-bugs

[issue23110] Document if argument to Py_SetPath requires static storage.

2014-12-24 Thread Robert Snoeberger
New submission from Robert Snoeberger: The documentation for the Py_SetPath API does not indicate if the argument should point to a wide character array in static storage. However, the documentation for Py_GetPath says, The returned string points into static storage; the caller should

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2014-11-27 Thread Robert Collins
Robert Collins added the comment: I'll put something together. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-11-25 Thread Robert Kuska
Robert Kuska added the comment: FYI fedora (rawhide) has SSLv3 disabled in SSLv23 method of openssl package. http://pkgs.fedoraproject.org/cgit/openssl.git/commit/?id=80b5477597e9f0d9fababd854adfb4988b37efd5 This looks like the same approach as in attached issue22638.diff. -- nosy

[issue22936] traceback module has no way to show locals

2014-11-24 Thread Robert Collins
New submission from Robert Collins: From https://github.com/testing-cabal/testtools/issues/111 - any code that is data dependent can be hard to diagnose from a backtrace alone. Many unittest and server environments address this by doing custom tracebacks that include locals. To address

[issue22936] traceback module has no way to show locals

2014-11-24 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22936 ___ ___ Python

[issue22937] unittest errors can't show locals

2014-11-24 Thread Robert Collins
New submission from Robert Collins: From https://github.com/testing-cabal/testtools/issues/111 - any code that is data dependent can be hard to diagnose from a backtrace alone. Many unittest and server environments address this by doing custom tracebacks that include locals. To address

[issue22936] traceback module has no way to show locals

2014-11-24 Thread Robert Collins
Robert Collins added the comment: See http://bugs.python.org/issue22936 for the unittest aspect of this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22936

[issue22886] TestProgram leaves defaultTestLoader.errors dirty

2014-11-16 Thread Robert Collins
New submission from Robert Collins: TestProgram leaves defaultTestLoader.errors dirty. This primarily affects tests but it would be good hygiene to clear it at the end of TestProgram. -- components: Library (Lib) messages: 231261 nosy: rbcollins priority: normal severity: normal status

[issue22431] Change format of test runner output

2014-11-13 Thread Robert Collins
Robert Collins added the comment: Yes, making customising the output easier is a good thing. One way is to use e.g. subunit.run (which can work with all unittest versions since 2.6) and write a custom filter. Or a custom TestResult and TextTestRunner can work too

[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

[issue22859] unittest.TestProgram.usageExit no longer invoked

2014-11-13 Thread Robert Collins
New submission from Robert Collins: Before the argparse migration usageExit was invoked and could be extended via subclasses, but it no longer is. We could delete it (and document it being no longer accessible) or put some glue in to reinstate it. I think deleting it is fine, as long as we

[issue22859] unittest.TestProgram.usageExit no longer invoked

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/issue22859

[issue22860] unittest TestProgram hard to extend

2014-11-13 Thread Robert Collins
New submission from Robert Collins: Some users of TestProgram would like to add options (e.g. testtools.run adds --list and --load-list) but there isn't a clean point to add them without bulk copying the implementation around. We likely need some extra extension points as well - one

[issue21724] resetwarnings doesn't reset warnings registry

2014-11-10 Thread Robert Muil
Changes by Robert Muil robertm...@gmail.com: -- nosy: +robertmuil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21724 ___ ___ Python-bugs-list

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-11-07 Thread Robert Collins
Robert Collins added the comment: https://code.google.com/p/unittest-ext/issues/detail?id=11 I think that the hamcrest inspired matchers stuff may help make this a reality too. OTOH if we had a clean patch now for the existing asserts that would be fine too

[issue22812] Documentation of unittest -p usage wrong on windows.

2014-11-07 Thread Robert Collins
New submission from Robert Collins: From https://code.google.com/p/unittest-ext/issues/detail?id=13 The following is incorrect on Windows: python -m unittest discover -p '*.py' It should be without the single quotes around the .py: python -m unittest discover -p *.py This needs

[issue22813] No facility for test randomisation

2014-11-07 Thread Robert Collins
New submission from Robert Collins: Unittest doesn't support a test randomisation feature. Such a feature should support: - passing in a seed (to allow reproducing the order for debugging) - preserving the suite hierarchy, to preserve class and module setUp performance optimisations

[issue22814] TestProgram loading fails when a script is used

2014-11-07 Thread Robert Collins
New submission from Robert Collins: If someone has a TestProgram script - e.g. the unit2 script in unittest2, loading a module in cwd will fail, because the PYTHONPATH doesn't include '.'. We might want to consider adding cwd to the PYTHONPATH in TestProgram. From https://code.google.com/p

[issue22815] unexpected successes are not output

2014-11-07 Thread Robert Collins
New submission from Robert Collins: Unexpected successes cause failures, but we don't output details about them at the end of the run. From https://code.google.com/p/unittest-ext/issues/detail?id=22 A complicating factor is that we don't have a backtrace to show - but we may have captured

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-11-07 Thread Robert Collins
Robert Collins added the comment: See also https://code.google.com/p/unittest-ext/issues/detail?id=27 Sorry, wrong wording of the bug. I tested this on IronPython 2.6.1 and 2.7.b1. I see the same result as you and I consider the following wrong or at least misleading: - [1, Decimal(1

[issue10611] sys.exit() in a test causes a test run to die

2014-11-07 Thread Robert Collins
Robert Collins added the comment: Hmm, so testtools went in a different direction here - the same unification stuff, but see https://github.com/testing-cabal/testtools/commit/18bc5741cf277f7a0d601568be6dccacc7b0783c tl;dr - I think unittest should not prevent this causing the process to exit

[issue10548] document (lack of) interaction between @expectedException on a test_method and setUp

2014-11-07 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- title: Error in setUp not reported as expectedFailure (unittest) - document (lack of) interaction between @expectedException on a test_method and setUp ___ Python tracker rep...@bugs.python.org

[issue22431] Change format of test runner output

2014-11-07 Thread Robert Collins
Robert Collins added the comment: I don't consider the console output of unittest to be a stable interface. Michael - do you? Things that want to process unittest should be using the API. -- nosy: +rbcollins ___ Python tracker rep

[issue22812] Documentation of unittest -p usage wrong on windows.

2014-11-07 Thread Robert Collins
Robert Collins added the comment: I agree. IIRC the windows shell passes the argument as '*.py' rather than as *.py, so when we glob it we get no files, as no python files end with an apostrophe. -- ___ Python tracker rep...@bugs.python.org http

[issue19645] decouple unittest assertions from the TestCase class

2014-11-07 Thread Robert Collins
Robert Collins added the comment: Hi, I'm glad you're interested in this. I very much want to see a matcher/hamcrest approach rather than a library of assertions per se - because match-or-except makes layering things harder. -- ___ Python tracker

[issue11664] Add patch method to unittest.TestCase

2014-11-07 Thread Robert Collins
Robert Collins added the comment: +1 on a plain function or context manager. w.r.t. addCleanUp taking a context manager, that could be interesting - perhaps we'd want a thing where you pass it the context manager, it __enter__'s the manager and then calls addCleanUp for you

[issue22813] No facility for test randomisation

2014-11-07 Thread Robert Collins
Robert Collins added the comment: b) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22813 ___ ___ Python-bugs-list mailing list Unsubscribe

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-11-06 Thread Robert Collins
Robert Collins added the comment: Its backported in unittest2 0.8.0 which is available on pypi for 2.6+ and 3.2+. The changes are large enough that I'd hesitate to backport them in cPython itself. -- ___ Python tracker rep...@bugs.python.org http

[issue22811] _top_level_dir state leaks on defaultTestLoader

2014-11-06 Thread Robert Collins
New submission from Robert Collins: TestProgram uses defaultTestLoader to load tests. Calling discover() on a TestLoader sets _top_level_dir. Calling discover with no top_level_dir implictly sets _top_level_dir but only the first time: the second time it is called with a different start_dir

[issue22811] _top_level_dir state leaks on defaultTestLoader

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

[issue22794] missing test for issue 22457 regression commit

2014-11-04 Thread Robert Collins
New submission from Robert Collins: I did a brownbag fix for my change to issue22457 which exposed a untested corner case - this issue is for me to come back and add a regression test for it. -- messages: 230628 nosy: rbcollins priority: normal severity: normal status: open title

[issue22680] unittest discovery is fragile

2014-11-04 Thread Robert Collins
Robert Collins added the comment: This was reported as https://code.google.com/p/unittest-ext/issues/detail?id=71 a while back. I think blacklisting FunctionTestCase in TestLoader is entirely reasonable. -- ___ Python tracker rep...@bugs.python.org

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-11-03 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: Added file: http://bugs.python.org/file37118/issue22457.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
New submission from Robert Collins: test_assertRaises_frames_survival (unittest2.test.test_assertions.Test_Assertions Depends on refcount behaviour to pass - adding a gc.collect() before the weakref checks is sufficient to fix things on pypy. test_no_exception_leak (unittest2

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Robert Collins added the comment: Herewith a patch. Applied to unittest2 for backport to unbreak its tests on pypy. -- keywords: +patch Added file: http://bugs.python.org/file37072/issue22764.patch ___ Python tracker rep...@bugs.python.org http

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22764 ___ ___ Python-bugs

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Robert Collins added the comment: Hmm? I must have misunderstood the test. Here's my understanding: the test is testing that a an object ref only held in the traceback object of the exception is cleaned up such that it can be collected. In a refcount system that collection is immediate

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Robert Collins added the comment: I've done some experimentation. Yes, the updated test passes when the clear_frames call is removed in cPython 3.5 But the original test also passes when clear_frames is not called if one drops into pdb and steps through, which still fits the symptoms

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: Added file: http://bugs.python.org/file37080/issue22764.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22764

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

2014-10-30 Thread Robert Collins
Robert Collins added the comment: I'll apply the patch monday if there are no further comments before then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22153

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-30 Thread Robert Collins
Robert Collins added the comment: (Pinging for reviews - I'm going to time out and land this early next week if I can't get a review on it, since this is actually a fairly significant oversight and I don't want unittest2 to run ahead of the stdlib - that way leads unmaintainable madness

[issue22153] There is no standard TestCase.runTest implementation

2014-10-29 Thread Robert Collins
Robert Collins added the comment: Oh, one thought - in testtools we split out 'docs for test writers' and 'docs for framework folk'. That would facilitate getting runTest out of test writers face while still documenting it appropriately. Related to that is my ongoing push to split

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

2014-10-29 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- title: There is no standard TestCase.runTest implementation - Documentation of TestCase.runTest is incorrect and confusing ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue22763] load_tests chaining into discover from non-discover entry point gets top_level_dir wrong

2014-10-29 Thread Robert Collins
New submission from Robert Collins: The following trivial chain-into-discover load_tests: def load_tests(loader, tests, pattern): import os.path # top level directory cached on loader instance this_dir = os.path.dirname(__file__) return loader.discover(start_dir=this_dir, pattern

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-29 Thread Robert Collins
Robert Collins added the comment: Updated patch, after other recent conflicting changes. -- Added file: http://bugs.python.org/file37071/issue22457.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-29 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue22153] There is no standard TestCase.runTest implementation

2014-10-28 Thread Robert Collins
Robert Collins added the comment: runTest is part of the current API. I think if we're going to hide it we should do so as part of a deprecation path. (I'm +1 on hiding it). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue21820] unittest: unhelpful truncating of long strings.

2014-10-28 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21820 ___ ___ Python-bugs

[issue22153] There is no standard TestCase.runTest implementation

2014-10-28 Thread Robert Collins
Robert Collins added the comment: Constructing test case objects directly is part of the protocol, and its needed for framework and extension authors. I've seen folk use runTest, but rarely enough that I think we could deprecate it. My argument is that while its supported we should be clear

[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-28 Thread Robert Collins
New submission from Robert Collins: found while backporting unittest fixes. The current test fails like so: == FAIL: testAssertEqualSingleLine (unittest2.test.test_case.Test_TestCase

[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-28 Thread Robert Collins
Robert Collins added the comment: There's comments in the test above about 'not testing ourself with ourselves' - but we're testing the rendering of an error case, so its entirely legitimate to use the same method's success path to check equality

[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-28 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- keywords: +patch Added file: http://bugs.python.org/file37057/issue22756.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22756

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-27 Thread Robert Collins
Robert Collins added the comment: I've updated the patch to try and address the niggling clarity issues from the review. Please let me know what you think (and if I hear nothing I'll commit it as-is since the review was still ok). -- Added file: http://bugs.python.org/file37045

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-27 Thread Robert Collins
Robert Collins added the comment: assertions in setUp are fine IMO. But here's the thing. WHat should this code do? class Demo(unittest.TestCase): def setUp(self): raise Exception('hi') def test_normal(self): # this should NOT be covered by expectedFailure

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

2014-10-23 Thread Robert Collins
Robert Collins added the comment: A few thoughts. Adding a new public symbol seems inappropriate here: this is a performance issue that is well predictable and we should cater for that (given difflibs current performance). I'll note in passing that both bzr and hg have much higher

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-23 Thread Robert Collins
Robert Collins added the comment: Just to note that unittest2 tip (unreleased)had michaels proposed fix, which is different to that here. I'm going to back that out before doing a release, because they should be harmonisious. -- nosy: +rbcollins

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-23 Thread Robert Collins
Robert Collins added the comment: My take on this, FWIW, is that any methods in the under-test API - setUp, tearDown, test_* and anything registered via addCleanup should all support the same protocol as much as possible, whatever it is. That is, raising a skip in setUp should skip the test

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-23 Thread Robert Collins
Robert Collins added the comment: I'd argue for - An error - its not covered by the decorator. - An error - the last two are not covered by the decorator. - An error - the last two are not covered by the decorator. - An error - the exception isn't a 'failure' [today - we should revisit

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

2014-10-23 Thread Robert Collins
Robert Collins added the comment: Oh, I got a profile from the test case for my own interest. 6615 seconds .. some highlights that jumped out at me 200010.1270.000 6610.0250.330 difflib.py:868(compare) which means we're basically using ndiff, which is cubic rather than

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-23 Thread Robert Collins
Robert Collins added the comment: Thanks for the review, updated patch here - I'll let this sit for a day or two for more comments then commit it Monday. -- Added file: http://bugs.python.org/file37002/issue7559.patch ___ Python tracker rep

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-10-20 Thread Robert Collins
Robert Collins added the comment: Yeah thats nicer. I'll apply that later unless you can. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17401

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-10-20 Thread Robert Collins
Robert Collins added the comment: Showing it only when False would have higher cognitive load. Showing it always is simple and clear. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17401

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-19 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: Removed file: http://bugs.python.org/file36716/issue22457.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-19 Thread Robert Collins
Robert Collins added the comment: Updated patch. -- Added file: http://bugs.python.org/file36973/issue22457.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-10-19 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17401

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-19 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: Added file: http://bugs.python.org/file36974/issue7559.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-19 Thread Robert Collins
Robert Collins added the comment: Patch polished up and updated - ready for review IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559

[issue22673] Incorrect fileno for CONOUT$ / stdout

2014-10-19 Thread Robert Collins
Robert Collins added the comment: I think its worth a note that the stdio streams are constructed specially, even with the repr improvements. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22673

[issue16662] load_tests not invoked in package/__init__.py

2014-10-17 Thread Robert Collins
Robert Collins added the comment: Closing as the fix to the test suite is applied. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

[issue22663] patchcheck alters content of .png files

2014-10-17 Thread Robert Collins
New submission from Robert Collins: cpython.hg$ make patchcheck ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 448 files Fixing whitespace ... 0 files Fixing C file whitespace ... 5 files: Include/patchlevel.h Modules/_ctypes/callbacks.c

[issue16079] list duplicate test names with patchcheck

2014-10-17 Thread Robert Collins
Robert Collins added the comment: FWIW testtools rejects test suites with duplicate test ids; I'm considering adding that feature into unittest itself. We'd need an option to make it warn rather than error I think, but if we did that we wouldn't need a separate script at all. -- nosy

[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Robert Collins
Robert Collins added the comment: FWIW I'd really like to be reducing the TestCase API not extending it - particularly since there are lots of good convenient ways of doing this already (not least mock.patch/mock.patch.object). So I'm -0.5 on adding this, as I don't see it adding value

[issue22264] Add wsgiref.util.dump_wsgistr load_wsgistr

2014-09-25 Thread Robert Collins
Robert Collins added the comment: So this looks like its going to instantly create bugs in programs that use it. HTTP/1.1 headers are one of: latin1 MIME encoded (RFC2047) invalid and working only by accident HTTP/2 doesn't change this. An API that encourages folk to encode into utf8

[issue21472] Fix wsgiref handling of absolute HTTP Request-URI

2014-09-25 Thread Robert Collins
Robert Collins added the comment: FWIW we probably need to capture the original unaltered URL somewhere, but also ensure that PATH_INFO is always a relative path. One should be able to implement a proxy in WSGI (because thats just another specialised app), and doing that today requires

[issue21472] Fix wsgiref handling of absolute HTTP Request-URI

2014-09-25 Thread Robert Collins
Robert Collins added the comment: Oh, also - while its tempting to say that it doesn't matter whether we take the urls host portion, or the host header or the server name - it does. Deployments that look like: LB/Firewall - backend container - WSGI app are likely to have assumptions within

[issue22264] Add wsgiref.util.dump_wsgistr load_wsgistr

2014-09-25 Thread Robert Collins
Robert Collins added the comment: So I guess the API concern I have is that there are two cases: - common spec compliant - US-ASCII + RFC2047 - dealing with exceptions - UTF8 or otherwise The former totally makes sense as a codec, though the current email implementation of it isn't quite

[issue16662] load_tests not invoked in package/__init__.py

2014-09-24 Thread Robert Collins
Robert Collins added the comment: Fix up the tests patch - tested on windows 7. -- Added file: http://bugs.python.org/file36713/fix-windows-tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

[issue16662] load_tests not invoked in package/__init__.py

2014-09-24 Thread Robert Collins
Robert Collins added the comment: bah, wrong extension to trigger review code :) -- Added file: http://bugs.python.org/file36714/fix-windows-tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

[issue16662] load_tests not invoked in package/__init__.py

2014-09-24 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: Removed file: http://bugs.python.org/file36713/fix-windows-tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

[issue22489] .gitignore file

2014-09-24 Thread Robert Collins
New submission from Robert Collins: The .gitignore file was missing some build products on windows. The attached patch makes the tree be clean after doing a debug build. -- files: windows-git-ignore.diff keywords: patch messages: 227498 nosy: rbcollins priority: normal severity: normal

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-09-24 Thread Robert Collins
Robert Collins added the comment: Updated patch - fixes windows tests for this patch. -- Added file: http://bugs.python.org/file36716/issue22457.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue19746] No introspective way to detect ModuleImportFailure in unittest

2014-09-24 Thread Robert Collins
Robert Collins added the comment: Right: the existing code stringifies the original exception and creates an exception object and a closure def test_thing(self): raise exception_obj but that has the stringified original exception. -- ___ Python

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-09-23 Thread Robert Collins
Robert Collins added the comment: This should fix this issue :) -- keywords: +patch Added file: http://bugs.python.org/file36694/issue22457.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457

[issue16662] load_tests not invoked in package/__init__.py

2014-09-23 Thread Robert Collins
Robert Collins added the comment: I've managed to get a windows setup working. Its my mini-vfs which needs to be Windows aware (because the abs path of /foo is C:\\foo). I'll work up a patch tomorrowish. -- ___ Python tracker rep...@bugs.python.org

[issue19746] No introspective way to detect ModuleImportFailure in unittest

2014-09-22 Thread Robert Collins
Robert Collins added the comment: I can certainly write the reporter glue to work with either a string or a full reference. Note that the existing late-reporting glue captures the import error into a string, and then raises an exception containing that string - so what I've done is consistent

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-09-21 Thread Robert Collins
New submission from Robert Collins: python -m unittest discover -t . foo where foo is a package will not trigger load_tests in foo/__init__.py. To reproduce: mkdir -p demo/tests cd demo cat EOF tests/__init__.py import sys import os def load_tests(loader, tests, pattern): print(HI WE

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-09-09 Thread Robert Collins
Robert Collins added the comment: You may need to apply the patch from http://bugs.python.org/issue19746 first as well - I was testing with both applied. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-09-09 Thread Robert Collins
Robert Collins added the comment: This is what I see in my tree: E == ERROR: test_os (unittest.loader.ModuleImportFailure) -- Traceback (most recent call last

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-09-09 Thread Robert Collins
Robert Collins added the comment: Raced with your comment. Great - and thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559

[issue19746] No introspective way to detect ModuleImportFailure in unittest

2014-09-09 Thread Robert Collins
Robert Collins added the comment: Thanks; I'm still learning how to get the system here to jump appropriately :). I thought I'd told hg to reset me to trunk... You are right about the docs. Reading that, I thought it was saying that errors would have a list of the errors that show up

[issue21929] Rounding properly

2014-09-08 Thread Robert
Robert added the comment: I'm not sure if this is related or not, but on 3.4.1 I get the following: print(round(float(3/2))) 2 (as expected) print(round(float(5/2))) 2 (expected 3, as float should round .5 up) -- nosy: +fenofonts ___ Python

[issue16662] load_tests not invoked in package/__init__.py

2014-09-08 Thread Robert Collins
Robert Collins added the comment: Thanks for landing this barry, there's a couple quirks with your improvements - loadTestsFromModule(mod, foo, bar) will raise a TypeError but not warn about foo the way loadTestsFromModule(mod, foo) will. Secondly, the TypeError has an off-by-one error in its

[issue16662] load_tests not invoked in package/__init__.py

2014-09-08 Thread Robert Collins
Robert Collins added the comment: OH! One more thing I just spotted, which is that this change causes non-'discover' unittest test loading to invoke load_tests. IMO this is the Right Thing - its what I intended when I described the protocol a few years back, but we should document

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-09-08 Thread Robert Collins
Robert Collins added the comment: Its more than just a docs issue - AFAICT it isn't possible to tell if closefd is set after the object is created. The presence of the parameter in the signature is there, but it isn't documented *where the bulk of the FileIO parameters are* - there are docs

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-09-08 Thread Robert Collins
Robert Collins added the comment: Oh - the the 'open' function docs are fine - they are just a pointer. I was specifically referring to the class docs around line 513 of Doc/library/io.rst. Attached is a patch that changes repr to show this attribute and extends the docs to document

[issue16662] load_tests not invoked in package/__init__.py

2014-09-08 Thread Robert Collins
Robert Collins added the comment: @michael - ah I think I inverted the sense of the old parameter. It was defaulting True. So - no need to document anything extra:) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

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