[issue5679] cleanUp stack for unittest

2009-04-04 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sat, 2009-04-04 at 22:09 +, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: teardown Why should they? It's only an implementation choice, and not a wise one I would say (precisely because people

[issue5679] cleanUp stack for unittest

2009-04-04 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sat, 2009-04-04 at 23:06 +, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: The main use case for addCleanup is resource allocation in tests. Why does this require clean ups to be executed before

[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sun, 2009-04-05 at 07:25 +, Garrett Cooper wrote: Garrett Cooper yaneg...@gmail.com added the comment: I think some perspective is required on this enhancement request. I originally filed this issue -- http://bugs.python.org

[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sun, 2009-04-05 at 10:15 +, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Our experience in bzr (we use this heavily, and migrated to it incrementally across our 17K fixture suite) is that we

[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sun, 2009-04-05 at 21:31 +, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: So, we are talking about adding a feature that could cause problem whether cleanup is performed before tearDown or after

[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sun, 2009-04-05 at 23:49 +, Michael Foord wrote: As an interesting data point, the Bzr code does clean ups *before* tearDown. No it doesn't: We subclass unittest.TestCase. We also override run() to make tearDown run

[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sun, 2009-04-05 at 23:57 +, Michael Foord wrote: Michael Foord mich...@voidspace.org.uk added the comment: My apologies - the jml code on launchpad runs clean ups before taerDown. http://bazaar.launchpad.net/~jml/testtools

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Robert Collins
New submission from Robert Collins robe...@robertcollins.net: Original mail: JML's testtools has a TestResult subclass with a done() method. The reason for this method is to allow doing things after the last test has run. While a result can infer 'first test' it can't infer 'last test' without

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: Now, some refinements, as usual (for me at least) when considering a feature like this from an upstream perspective, where one's immediate use cases are just special cases not general case, I've come up with some refinements. Firstly

[issue5728] Support telling TestResult objects a test run has finished

2009-04-11 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: I've written up a patch for this; it works with old result classes too. Hopefully the bugtracker will attach it in reply to this mail; if not I'll put in via the webui this evening. -Rob -- keywords: +patch Added file: http

[issue5762] AttributeError: 'NoneType' object has no attribute 'replace'

2009-04-15 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Have you tried this with xml.dom.minidom? -- nosy: +nneonneo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5762

[issue5728] Support telling TestResult objects a test run has finished

2009-04-15 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Wed, 2009-04-15 at 23:19 +, Barry A. Warsaw wrote: Barry A. Warsaw ba...@python.org added the comment: The patch looks fine to me, except that it's missing documentation updates. The feature and names are fine too. Where

[issue5728] Support telling TestResult objects a test run has finished

2009-04-16 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: Updates - docs, and fixes a couple of stubbed out upcalls in the logging result put in while bootsrapping. -- Added file: http://bugs.python.org/file13709/start-stop-TestRun.patch ___ Python

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Skip, it doesn't appear that the ustack helper is getting incorporated into the OS X build anywhere. This rule is obviously wrong (compiling the wrong input file with the wrong flags): Include/phelper.h: $(srcdir)/Include/phelper.d

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Got a bit farther. Adding this stanza to the top of phelper.d gets past the issues in the headers: #ifdef __APPLE__ #define _SYS_TIME_H_ #define _SYS_SELECT_H_ #define __MATH_H__ #define _OS__OSBYTEORDER_H #define _FD_SET #define

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: This is on an Intel Core 2 Duo running OS X 10.5.6. __i386 is defined. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: John, -Z does not appear to help: $ sudo dtrace -Z -n 'pid$target::PyEval_EvalFrameEx:entry' -c python dtrace: description 'pid$target::PyEval_EvalFrameEx:entry' matched 0 probes I'm not sure how that would help. If I'm reading the man

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Skip Perhaps not quite on-topic for this tracker item, but it bugs me that the Skip mere compilation of a D script requires root privileges. It doesn't. dtrace -G and dtrace -h (the only mere compilation that dtrace does) run without root

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Ah, duh, of course. The problem here with PyEval_EvalFrameEx is that I don't have ceval.o on the command line *at all* since OS X's dtrace doesn't support -G. It doesn't appear to accept ceval.o with -h, either, so I suppose that adding

[issue4111] Add DTrace probes

2009-04-22 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Hmm, wait a second. Never mind. The Solaris patches don't have ceval.o on the line for compiling phelper.o, either. If dtrace needs to resolve the symbol PyEval_EvalFrameEx in an object file, how does it know to look in ceval.o

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Is there any interest in my expanding the list of probes? Ruby has quite a few more than function-entry and function-return, to give some examples of what is possible: http://dev.joyent.com/projects/ruby-dtrace/wiki/Ruby+DTrace+probes

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: We could probably merge Apple's and Sun's probes without too much trouble. Apple simply extended function-entry to include the argcount in addition to Sun's (filename, funcname, lineno) arguments. We could use Apple's probe while retaining

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: James McIlree from Apple has informed me on dtrace-discuss that ustack helpers cannot currently be built on OS X. Bummer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue4111] Add DTrace probes

2009-04-24 Thread Robert Kern
Robert Kern robert.k...@gmail.com added the comment: Ah, I misread the Apple function-return probe code. Its extra argument is the type name of the return object or error if an exception was raised, not the returned object itself. Could be useful

[issue5679] cleanUp stack for unittest

2009-04-25 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: On Sat, 2009-04-25 at 23:17 +, Michael Foord wrote: Michael Foord mich...@voidspace.org.uk added the comment: Proper patch and proper issue this time! Not my evening. -- Added file: http://bugs.python.org/file13787

[issue5964] WeakSet cmp methods

2009-05-07 Thread Robert Schuppenies
New submission from Robert Schuppenies robert.schuppen...@gmail.com: Running this code: import weakref class C: pass ... ws = weakref.WeakSet([C]) if ws == 1: ... print(1) ... gives me the following exception: Traceback (most recent call last): File stdin, line 1, in module

[issue5804] Add an 'offset' argument to zlib.decompress

2009-05-10 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: Maybe I'm missing something, but isn't the offset parameter just another way of spelling buffer(input, offset)? I like the avoiding of copying, just wondering if having a magic parameter to get a tuple is really better than (say

[issue5964] WeakSet cmp methods

2009-05-10 Thread Robert Schuppenies
Robert Schuppenies robert.schuppen...@gmail.com added the comment: Here is a patch which will return False instead of TypeError. This is the same behavior a normal set has. Two things though. 1. I don't know wether the 'import _abcoll' statement somehow influences the bootstrap in one way

[issue5804] Add an 'offset' argument to zlib.decompress

2009-05-11 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: Well, I think its relatively uncommon to be doing such a loop with a static buffer anyway - often you'll instead be reading from disk or a network stream; if we could make those cases simpler and avoid copying that would be great

[issue5964] WeakSet cmp methods

2009-05-11 Thread Robert Schuppenies
Robert Schuppenies robert.schuppen...@gmail.com added the comment: Sounds right to me. Here is another patch plus tests. Going through the other tests, I adapted two more tests to actually test WeakSet. Also, I found the following one and think it is a copypaste from test_set which

[issue5964] WeakSet cmp methods

2009-05-11 Thread Robert Schuppenies
Changes by Robert Schuppenies robert.schuppen...@gmail.com: Removed file: http://bugs.python.org/file13955/_weakrefset.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5964

[issue5964] WeakSet cmp methods

2009-05-12 Thread Robert Schuppenies
Changes by Robert Schuppenies robert.schuppen...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5964

[issue6019] Minor typos in ctypes docs

2009-05-14 Thread Robert Lehmann
New submission from Robert Lehmann lehman...@gmail.com: There are a few errors in the ctypes documentation covering function calls using the example of `libc.printf`. It's basically just typos but they are really confusing when trying to understand the examples. Patch to trunk is attached

[issue5964] WeakSet cmp methods

2009-05-14 Thread Robert Schuppenies
Robert Schuppenies robert.schuppen...@gmail.com added the comment: The test passes on my machine, but a quick review would definitely be nice :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5964

[issue5964] WeakSet cmp methods

2009-05-14 Thread Robert Schuppenies
Robert Schuppenies robert.schuppen...@gmail.com added the comment: If that is the right behavior then yes. Is this documented somewhere? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5964

[issue5964] WeakSet cmp methods

2009-05-15 Thread Robert Schuppenies
Robert Schuppenies robert.schuppen...@gmail.com added the comment: Maybe because I take the doc too specfic. It says A rich comparison method may return the singleton NotImplemented if it does not implement the operation for a given pair of arguments. I see the type check of the 'other' object

[issue5964] WeakSet cmp methods

2009-05-17 Thread Robert Schuppenies
Robert Schuppenies robert.schuppen...@gmail.com added the comment: Fixed in r72751. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5964

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-05-22 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I have had this problem with 2.6.1 on windows from multiple _threads_ instead of multiple processes. Is that not supported either? If not, what is the workaround for logging from multiple threads? Shouldn't it be easy to use a semaphore

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-05-22 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I will go through the code and make sure I am not mistaken, but I do believe I have a single process, multiple threads, and only one handler for this file and I'm getting the same types of error messages shown on this page. I'm probably doing

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-26 Thread Robert Lehmann
Robert Lehmann lehman...@gmail.com added the comment: This only seems to be the case with the C implementation of json (_json). json.encoder.c_make_encoder = None json.dumps(OrderedDict(items)) '{one: 1, two: 2, three: 3, four: 4, five: 5}' I think the culprit is encoder_listencode_dict

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I have a small script that reproduces the problem. I couldn't reproduce it until I added some os.system() calls in the threads that were logging. Here's the output using python 2.6.1: Traceback (most recent call last): File C:\Python26

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: P.S. The above script and failure is running on winxp sp3. Also, if you comment out the two os.system() calls, it works just fine. They seem like they should be unrelated to the logging though. You'll also see some errors about access

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: import sys print sys.version 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] I have seen this behavior in older versions as well. Interesting to see it fail in linux as well

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: P.S. Frans - It's good to get these other data points from you. So this is reproducible from another person and on different versions of python AND on different platforms! I wasn't expecting that at all. Thanks Frans. Is there a way we

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: Thanks Lowell - good information. You have many more versions of Python laying around than I do. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I just upgraded to 2.6.2 windows from python.org and it fails as well: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 I hope Vinay can track this down in case it's a race condition that's just moving

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-08 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I didn't care about the os.system() call contention because that's what caused the logging problem and that blah.txt file contention should not cause logging to fail. I also had the join calls originally but took them out to simplify the code

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-09 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: Thanks Vinay. I ran the newest revised script with virus protection turned off and got the same failures as before (see console output below). If you comment out the os.system() calls, everything works just fine. Uncomment them and logging

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-09 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I'll thoroughly look through every piece of software that's running to see if I can turn eveything off that might be causing the problem. Were you able to reproduce the problem with my original script? I'm sure you have all of your virus

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-09 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I turned off anti-virus again as well as file indexing and google desktop too and still got the errors when I disabled the locks around the os.system() calls. Vinay - when the locks aren't around the os.system() calls, do you get the rotating

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-09 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: Vinay - that's great news! Are you going to create a new bug for this issue with a proper title? It would seem to me that the fix for this would be to put locks internal to the os.system() call around where it spawns cmd so multiple spawns

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I changed the script to use subprocess (attached file) and got the same rollover errors as before. I had to change cd and del to be cd.bat and del.bat which contained cd %1 and del %1 respectively since it appears subprocess can't run

[issue1425127] os.remove OSError: [Errno 13] Permission denied

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: Could this problem be associated with issue4749? It was found that something goes wrong when two cmd children processes are spawned from different threads, when the first exits, it is closing file handles shared with the first (or something

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: I found Issue1425127 which may be a different symptom of this core problem. I suggested that we create a bug that documents the core problem here as described by Vinay in msg89174 and links to these two bugs (along with any others we find

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: One more possibly related bug is issue2320 where subprocesses are spawned from multiple threads. They found an interesting workaround that I found seems to help our problem too: on Windows, if close_fds is true then no handles

[issue2320] Race condition in subprocess using stdin

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com added the comment: Could this problem be associated with issue4749? It was found that something goes wrong when two cmd children processes are spawned from different threads, when the first exits, it is closing file handles shared with the first (or something

[issue19746] No introspective way to detect ModuleImportFailure

2013-11-23 Thread Robert Collins
New submission from Robert Collins: https://bugs.launchpad.net/testtools/+bug/1245672 was filed on testtools recently. It would be easier to fix that if there was some way that something loading a test suite could check to see if there were import errors. The current code nicely works

[issue20514] Errno 10013 - ipython notebook

2014-02-04 Thread Robert Copperwhite
New submission from Robert Copperwhite: Hello, I've recently installed ipython (Anaconda) and haven't managed to get up and running. When I execute ipython notebook from the command prompt I get the attached error message, basically: Errno 10013: An attempt was made to access a socket

[issue20687] Change in expectedFailure breaks testtools

2014-02-19 Thread Robert Collins
Robert Collins added the comment: I concur that this is a regression - unittest.expectedFailure() Mark the test as an expected failure. If the test fails when run, the test is not counted as a failure. is in the public docs for the unittest module, and depending on a private

[issue20687] Change in expectedFailure breaks testtools

2014-02-19 Thread Robert Collins
Robert Collins added the comment: Oh! I didn't realise it was due to us looking at a private exception - I haven't been given a traceback to review, just the statement of a problem We shouldn't have done that(and *Definitely* should have filed a bug that we needed to). So - I think

[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-03-25 Thread Robert Kuska
Robert Kuska added the comment: There is ongoing discussion on pip's github tracker [1] about default location where to install user modules. IMO this is something that should be dealt with in Python Interpreter Core [2][3]. I would like to hear some opinion from python devs on this. [1

[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-04-01 Thread Robert Kuska
Robert Kuska added the comment: Ok, I have started a thread at pypa-devs google group. https://groups.google.com/forum/#!topic/pypa-dev/r6qsAmJl9t0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298835

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-02 Thread Robert Snoeberger
New submission from Robert Snoeberger: While embedding the Python interpreter in an application, I have encountered a crash when the built-in function 'super' is invoked with no arguments. The crash occurs during a call to PyObject_Call. A file is attached, super_invoke.c, that reproduces

[issue21563] Segv during call to builtin_execfile in application embedding Python interpreter.

2014-05-23 Thread Robert Snoeberger
New submission from Robert Snoeberger: While embedding the Python 2.7 interpreter in an application, I have encountered a crash when the built-in function 'execfile' is invoked with one argument. A file is attached, execfile_invoke.c, that reproduces the crash. The reproduction steps on my

[issue21563] Segv during call to builtin_execfile in application embedding Python interpreter.

2014-05-26 Thread Robert Snoeberger
Robert Snoeberger added the comment: I created a patch to add a check for NULL globals or locals. The file execfile.patch is attached. A system error is set with the message globals and locals cannot be NULL if either is NULL. An open question I have is how should I create tests

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-05-28 Thread Robert Jordens
New submission from Robert Jordens: According to the documentation the exec a in b, c is equivalent to exec(a, b, c). But in the testcase below the tuple form causes a SyntaxError while the statement form works fine. diff -r e770d8c4291c Lib/test/test_compile.py --- a/Lib/test

[issue21630] List Dict bug?

2014-06-01 Thread Robert w
New submission from Robert w: outer for loop loops n 1 times, when it should loop one time. Variations are possible tht the bug doesn't occur. -- components: Interpreter Core files: bug.py messages: 219513 nosy: Robert.w priority: normal severity: normal status: open title: List Dict

[issue21630] List Dict bug?

2014-06-01 Thread Robert w
Changes by Robert w robert...@googlemail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21630 ___ ___ Python-bugs

[issue21631] List/Dict Combination Bug

2014-06-01 Thread Robert w
New submission from Robert w: outer for loop loops more than one time, which should be impossible. -- components: Interpreter Core files: bug.py messages: 219514 nosy: Robert.w priority: normal severity: normal status: open title: List/Dict Combination Bug type: behavior versions

[issue21631] List/Dict Combination Bug

2014-06-02 Thread Robert w
Robert w added the comment: banner C:\Users\r0b3\files\backuped\own_dropbox\programmierung\raymarcher0C:\Python33\python Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. C:\Users\r0b3

[issue21631] List/Dict Combination Bug

2014-06-02 Thread Robert w
Changes by Robert w robert...@googlemail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21631 ___ ___ Python-bugs

[issue21631] List/Dict Combination Bug

2014-06-02 Thread Robert w
Robert w added the comment: i cutted it down = class EnumSectionContentType(object): DATABYTE = 2 DATADOUBLEWORD = 3 DATAWORD = 4 #LABEL = 0 def _getStringOfElements(elements): objectFileString = elements = [{'type': 2, 'data': {'elements': ['83H', '0FAH', '9AH', '27H

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
New submission from Robert Li: Failing test case: \tboo\n \tghost expected: \tboo\n\tghost returns: \tboo\n \tghost -- components: Library (Lib) messages: 221277 nosy: pitrou, r.david.murray, robertjli, yjchen priority: normal severity: normal status: open title

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
Robert Li added the comment: YJ and I are adding a patch and an additional test. -- hgrepos: +258 versions: -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
Changes by Robert Li li.robertj+pythonb...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35727/cb18733ce8f1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
Changes by Robert Li li.robertj+pyt...@gmail.com: Added file: http://bugs.python.org/file35731/34e88a05562f.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827

[issue21944] Allow copying of CodecInfo objects

2014-07-09 Thread Robert Lehmann
New submission from Robert Lehmann: CodecInfo objects as retrieved from codecs.lookup currently throw an exception when trying to copy or pickle them. I have attached a patch with a fix and tests. -- components: Library (Lib) files: copy_codecinfo.patch keywords: patch messages

[issue21308] PEP 466: backport ssl changes

2014-08-18 Thread Robert Kuska
Robert Kuska added the comment: Hi everyone, I went ahead and I've applied ssl-backport.diff (alex, 2014-08-07 18:49) patch into Python 2.7.8 on Fedora Rawhide (currently only scratch build). My report: Firstly, I've encountered seg fault, I fixed this with patch from http://bugs.python.org

[issue22238] fractions.gcd results in infinite loop when nan or inf given as parameter.

2014-08-20 Thread Robert Snoeberger
New submission from Robert Snoeberger: import fractions fractions.gcd(16, float('inf')) Traceback (most recent call last): File pyshell#1, line 1, in module fractions.gcd(16, float('inf')) File C:\Python34-32bit\lib\fractions.py, line 24, in gcd a, b = b, a%b KeyboardInterrupt

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

2014-08-26 Thread Robert Collins
Robert Collins added the comment: I think we rather need a test that using a load_tests hook to recursively load and transform a subdir works. Hacking on that now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

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

2014-08-26 Thread Robert Collins
Robert Collins added the comment: Ok, implementation I'm happy with is up in https://bitbucket.org/rbtcollins/cpython/commits/bbf2eb26dda8f3538893bf3dc33154089f37f99d -- hgrepos: +269 Added file: http://bugs.python.org/file36482/16662_passing_tests.diff

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

2014-08-27 Thread Robert Collins
Robert Collins added the comment: The doc part of the patch was assuming this would be in 3.4 which it wasn't. Updated to 3.5. Also found a corner case - when packages were imported the _get_module_from_name method was not guarded for un-importable modules. This is strictly a separate issue

[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

[issue19746] No introspective way to detect ModuleImportFailure in unittest

2014-09-08 Thread Robert Collins
Robert Collins added the comment: Here is an implementation. I'm probably missing some finesse in the docs. -- keywords: +patch Added file: http://bugs.python.org/file36577/issue19746.patch ___ Python tracker rep...@bugs.python.org http

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-09-08 Thread Robert Collins
Robert Collins added the comment: I've just put a patch up for the related issue http://bugs.python.org/issue19746 I'll poke at this one briefly now, since I'm across the related code. -- ___ Python tracker rep...@bugs.python.org http

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-09-08 Thread Robert Collins
Robert Collins added the comment: Ok, here is an implementation that I believe covers everything Michael wanted. I examined the other patches, and can rearrange my implementation to be more like them if desired - but at the heart of this this bug really has two requested changes: - deferred

[issue18232] running a suite with no tests is not an error

2014-09-08 Thread Robert Collins
Robert Collins added the comment: @Terry in principle you're right, there are an arbitrary number of things that can go wrong, but in practice what we see is either catastrophic failure where nothing is loaded at all *and* no error is returned or localised failure where the deferred reporting

[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

[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

[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-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

[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

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