Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: -michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7900
___
___
Python-bugs
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: -michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10228
___
___
Python
Michael Foord mich...@voidspace.org.uk added the comment:
It's fixed in release31-maint as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10353
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10360
___
___
Python-bugs
New submission from Michael Foord mich...@voidspace.org.uk:
In Python 2.7 a change was introduced to TestCase which involves storing a
dictionary of method objects on TestCase instances. This makes them
unpickleable.
unittest2 stores strings (method names) instead of method objects (a fix
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file19483/static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file19484/test_static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Michael Foord mich...@voidspace.org.uk added the comment:
Further updated implementation. Now handles data descriptors correctly but
removes the code that resolves the builtin descriptors (calling __get__ on slot
and attribute descriptors).
As it was resolving some descriptors but not all
Changes by Michael Foord mich...@voidspace.org.uk:
Added file: http://bugs.python.org/file19490/test_static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Michael Foord mich...@voidspace.org.uk added the comment:
assertElementCountEqual is good name and I like your implementation suggestion.
I'll put this in. I think the implementation fix can go into 2.7 as well but
not the rename/aliasing
Michael Foord mich...@voidspace.org.uk added the comment:
Renaming and aliasing methods has a cost. It confuses users of the old names
(including future users - the current API is now baked into django 1.3 unless I
can get an update done in time for them to change the version they're using
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file18699/static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file18701/test_static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Michael Foord mich...@voidspace.org.uk added the comment:
Updated implementation that handles instances with inherited __slots__ members
and attributes from C descriptors correctly.
I think is both good enough and useful enough to add to inspect. (The
remaining constraints are rare
Changes by Michael Foord mich...@voidspace.org.uk:
Added file: http://bugs.python.org/file19484/test_static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: -michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6058
___
___
Python-bugs
Michael Foord mich...@voidspace.org.uk added the comment:
@Ezio
Good catch. Even though several of us (including myself) prefer assertRegex
over assertRegexp it is probably better to have consistent APIs otherwise
people will never remember which methods have the 'p' and which don't
Michael Foord mich...@voidspace.org.uk added the comment:
+1
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10278
Michael Foord mich...@voidspace.org.uk added the comment:
Committed to py3k in revision 86101. Needs porting to Python 2.7 (and
unittest2).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9926
Michael Foord mich...@voidspace.org.uk added the comment:
Committed to release27-maint in revision 86104.
--
resolution: - accepted
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
On Python-dev Nick Coghlan suggests a fix for the fast-path that would allow us
to keep it whilst fixing this bug (not tested yet but adding this note not to
lose it). The issue of the name of this method is in 10273.
Looking
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: rhettinger - michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10242
Michael Foord mich...@voidspace.org.uk added the comment:
As this has been released in 2.7 (and unittest2) I don't think it can be just
removed in 3.2 - it would make porting code from Python 2 to 3 more painful.
Very happy for you to fix in Python 2.7. Please let me know when it goes in so
Michael Foord mich...@voidspace.org.uk added the comment:
David - would you get a good approximation of what you want simply with:
self.assertEqual(ascii(first), ascii(second))
(This actually returns b'first' b'second' so you may want a convenience
function that chops the leading
Michael Foord mich...@voidspace.org.uk added the comment:
In general *none* of this should be done until there is clear consensus on
Python-dev and it isn't clear that this is the case.
* On the deocumenting: barry warsaw objects to public apis that aren't
documented and gregory smith asserts
Michael Foord mich...@voidspace.org.uk added the comment:
I intend to.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7911
___
___
Python-bugs
Michael Foord mich...@voidspace.org.uk added the comment:
Although this is still a real issue for other users of unittest. If I get time
to think about it properly I may reopen.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
+1
Looks like a reasonable use case.
--
nosy: +michael.foord, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10049
Michael Foord mich...@voidspace.org.uk added the comment:
Patch is missing tests and documentation.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10049
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9969
___
___
Python-bugs
Michael Foord mich...@voidspace.org.uk added the comment:
Note from Nick Coghlan from the Python-dev discussion:
A very quick scan of _tokenize suggests it is designed to support
detect_encoding returning None to indicate the line iterator will
return already decoded lines. This is confirmed
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: - michael.foord
components: +Library (Lib)
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9977
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: - michael.foord
components: +Library (Lib)
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9976
Michael Foord mich...@voidspace.org.uk added the comment:
When I run with -OO I get 42 test failures. Most of them look like they are due
to missing docstrings but some are likely to be due to missing asserts.
42 tests failed:
test_bisect test_cmd test_code test_collections test_compileall
Michael Foord mich...@voidspace.org.uk added the comment:
Most of those failures look like they have a similar cause (not all of them
though) related to running doctests. When issue 6292 was closed all tests
passed with -OO, so this is a regression. I'm raising a separate issue
New submission from Michael Foord mich...@voidspace.org.uk:
When I run the test suite (py3k branch) with -OO I get 42 failures. Most of
these look like they are caused by the same (or a similar) problem (attempting
to run doctests from now-non-existent docstrings).
The tests that fail
Michael Foord mich...@voidspace.org.uk added the comment:
Cool - although I *do* see failures under -O; test_import for example. That one
is a __pycache__ test, so barry's fault I think.
I'll detail the failures in issue 9964 as I think *most* of them are caused by
a problem with pdb.py
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file19035/pdb.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9082
Michael Foord mich...@voidspace.org.uk added the comment:
Oops. The patch should go to issue 9964. Sorry for all this noise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9082
Michael Foord mich...@voidspace.org.uk added the comment:
Most of the failures are caused by a problem in pdb.
In fact, if you run Python with -OO you can't even *import* pdb.
The attached patch fixes that problem (a hasty and untested patch though), and
that reduces the number of failures
Michael Foord mich...@voidspace.org.uk added the comment:
The attached patch fixes the issue (I think...) by tagging the result object.
It removes the need for _wrapped_result altogether. The test fails without the
change to TestSuite and passes with the change.
This could be applied to 2.7
Michael Foord mich...@voidspace.org.uk added the comment:
Ok, so here is an idea that could remove the need for TestSuite._wrapped_run.
TestSuite.run could tag the result object (set an attribute). Nested
TestSuites would see an already tagged suite and do nothing (beyond running
tests
Michael Foord mich...@voidspace.org.uk added the comment:
On 24/09/2010 19:23, Martin v. Löwis wrote:
Martin v. Löwismar...@v.loewis.de added the comment:
Perhaps slightly ironically (for this particular bug report) is that
the change was introduced to support class and module level setUp
Michael Foord mich...@voidspace.org.uk added the comment:
unittest *can't* know which setUp methods have already been called if an error
occurs in one of them (because they are called explicitly by the sub-classes
and not by unittest itself). Given this, the specific fix suggested seems good
Michael Foord mich...@voidspace.org.uk added the comment:
Destructors are special cased in many languages and tearDown is not a
destructor. More importantly though the change you suggest would be backwards
incompatible.
The 'correct' way to do this in new code is to use cleanUp functions
Michael Foord mich...@voidspace.org.uk added the comment:
Right, _wrapped_run is private and not intended to be overridden.
Perhaps slightly ironically (for this particular bug report) is that the change
was introduced to support class and module level setUp and tearDown (similar to
the use
Michael Foord mich...@voidspace.org.uk added the comment:
Hmmm... 2.7 has already been released and has the same issue, so 'drastic'
changes (like renaming BaseTestSuite back to TestSuite) are probably out.
--
components: +Library (Lib)
versions: +Python 2.7
Michael Foord mich...@voidspace.org.uk added the comment:
It is relevant and would be *possible* to implement. I'm not 100% convinced it
is a good *enough* idea to make it worth adding though. I'd like to leave the
issue open for the moment in case other people want to comment
Michael Foord mich...@voidspace.org.uk added the comment:
Interesting use case.
If the test has not yet failed this is fine. The problem is that if an
exception has *already* been raised then it will already have been added to the
result - so by then skipping is meaningless (or contradictory
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: -michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9831
___
___
Python-bugs
Michael Foord mich...@voidspace.org.uk added the comment:
This has been on my 'todo list' for a long time. Feel free to get to it before
me. Please *don't* include the now deprecated assert* methods in the table. I'd
like to move all the deprecated methods to a separate section
Michael Foord mich...@voidspace.org.uk added the comment:
+1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9754
___
___
Python-bugs-list
Michael Foord mich...@voidspace.org.uk added the comment:
(Note that in general I am against extending the TestCase API with more asserts
given how wide it is and how much it has expanded in recent versions. I've
written warning checking code enough times for third party projects that I
think
Michael Foord mich...@voidspace.org.uk added the comment:
Why not accepting a tuple of warnings? That doesn't make sense for
assertWarnsRegexp of course.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9754
New submission from Michael Foord mich...@voidspace.org.uk:
As discussed on python-dev, a version of getattr that does static lookups -
bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial
implementation by Nick Coghlan, amended and tests added by me.
Phillip Eby
Michael Foord mich...@voidspace.org.uk added the comment:
Tests require Python 3. Implementation works with Python 2 as well.
--
Added file: http://bugs.python.org/file18700/test_static.py
___
Python tracker rep...@bugs.python.org
http
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file18700/test_static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Changes by Michael Foord mich...@voidspace.org.uk:
--
Removed message: http://bugs.python.org/msg115297
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Michael Foord mich...@voidspace.org.uk added the comment:
Tests require Python 3. Implementation works with Python 2 as well.
--
Added file: http://bugs.python.org/file18701/test_static.py
___
Python tracker rep...@bugs.python.org
http
Changes by Michael Foord mich...@voidspace.org.uk:
--
Removed message: http://bugs.python.org/msg115296
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
Michael Foord mich...@voidspace.org.uk added the comment:
(Reposted as text was entirely duplicated - oops.)
As discussed on python-dev, a version of getattr that does static lookups -
bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial
implementation by Nick Coghlan
Michael Foord mich...@voidspace.org.uk added the comment:
Since the addition of __dir__, dir(obj) can return arbitrary values. Typically
(I guess) this will be used to add dynamically created attributes that this
function will fail to find - so it is *more* likely that we will fail to find
Michael Foord mich...@voidspace.org.uk added the comment:
(Or vice versa - getattr_static may succeed in finding members - like
descriptors that raise AttributeError when fetched - when getattr fails.)
--
___
Python tracker rep...@bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
Well, it was misdiagnosed yes - but asking for python -m unittest ... support
in Python 2.6 is still a feature request and not a bug report. (So
unfortunately it can't be fixed in 2.6 which is bugfix only. The solution is to
use
Michael Foord mich...@voidspace.org.uk added the comment:
Providing access to the exception on the context manager was *precisely* to
meet the use case of wanting to make assertions about the exception. I tend to
agree with Guido that having one of the asserts return something is a bit odd
Michael Foord mich...@voidspace.org.uk added the comment:
The None error message *looks* to me like the result of a failed assertion.
That may not be correct of course...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7219
Michael Foord mich...@voidspace.org.uk added the comment:
Sorry, it's a reopened bug requesting a feature that has already been
considered and rejected previously. Yes I was abrupt, my apologies - I'm trying
to clear my backlog before I go away
Michael Foord mich...@voidspace.org.uk added the comment:
It would be nice to settle this.
Personally I would like to see the defaults being:
Linux: ~/.pythonx.y
Mac OS X: ~/.pythonx.y with a fallback of ~/Library/Preferences/.pythonx.y
Windows: ~/pythonx.y perhaps with a backup of AppData
Michael Foord mich...@voidspace.org.uk added the comment:
Well, there is *some* value in stylistic consistency. If it didn't matter at
all then Guido wouldn't have instigated the deprecation of assertEquals and
assert_ and standardised on assertEqual (which he did during the sprints at
PyCon
Michael Foord mich...@voidspace.org.uk added the comment:
Output below, first without DISTUTILS_DEBUG (showing the not very useful
default message) and second with. (The actual exception is Access to the path
'C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py' is denied
Michael Foord mich...@voidspace.org.uk added the comment:
We aren't talking about *removing* these methods from unittest - but now that
we have standardised on assertEqual for the Python test suite it is annoying
(particularly for Ezio who changes) when *new* tests are checked in using
Changes by Michael Foord mich...@voidspace.org.uk:
--
title: deprecate unittest.TestCase.assertEquals - Disable
unittest.TestCase.assertEquals and assert_ during a regrtest run
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
I'd still like to see this fixed. Some of the features of regrtest will need to
be implemented as plugins for unittest (but not many - a lot of the features of
regrtest are already obsolete
Michael Foord mich...@voidspace.org.uk added the comment:
+1 for deprecation. Nobody *should* be using ConfigParser anyway, and of those
who are 99% either wouldn't notice or would have bugs in their code *fixed* by
the rename, so I can't see much of a downside
Michael Foord mich...@voidspace.org.uk added the comment:
I'd be happy with aliasing SafeConfigParser to ConfigParser in 3.2. Can we just
do this without a deprecation process?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
Sorry - I misunderstood your earlier suggestion Fred.
configparser.ConfigParser is the *natural* name for SafeConfigParser. I'm
strongly +1 on moving towards that. (I doubt there would *actually* be any real
code breakage if we did
Michael Foord mich...@voidspace.org.uk added the comment:
By the way, given that deprecation warnings are silent I am strongly -1 on
removing the ConfigParser name altogether. That would cause far more breakage.
As ConfigParser should not be used at all, and SafeConfigParser provides its
Michael Foord mich...@voidspace.org.uk added the comment:
Getting *rid* of the name ConfigParser would be annoying and cause *gratuitous*
code breakage.
If we are going to keep the name but get rid of the unsafe version then we
can only replace it with what is now SafeConfigParser
Michael Foord mich...@voidspace.org.uk added the comment:
If we merge the functionality in a single class with a new name then I guess
that is fine as it will simplify the documentation rather than complexify it
(good word hey). We still need to *mention* the old names so that people
finding
Michael Foord mich...@voidspace.org.uk added the comment:
Yep:
test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call
last):
File
/private/var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp-/tmp3KtUFW/cgi-bin/file2.py,
line 2, in module
import cgi
File /compile
Michael Foord mich...@voidspace.org.uk added the comment:
As a (mainly ex) windows user I would hate to have user editable data in
APPDATA as it is not a location the user ever expects to visit. The home
directory, or a subdirectory thereof, for user editable app specific data is
more usual
Michael Foord mich...@voidspace.org.uk added the comment:
I still think that user editable configuration data, at least on windows, is
different from application data. It would definitely seem weird to me to have a
config file in the %APPDATA% directory.
%APPDATA% would be fine for a cache
Michael Foord mich...@voidspace.org.uk added the comment:
Seems good to me (the feature - and also the patch after a cursory read
through).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9411
Michael Foord mich...@voidspace.org.uk added the comment:
Yup, still active:
$ ./python.exe
Python 2.7.0+ (release27-maint:83247, Jul 30 2010, 00:41:50)
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type help, copyright, credits or license for more information.
import sys
[35067 refs]
sys
New submission from Michael Foord mich...@voidspace.org.uk:
Now that deprecations are silent by default it would be much less intrusive to
deprecate unittest.TestCase.assertEqual
We have a persistent issue in the Python test suite of developers using
assertEquals when we have standardised
Michael Foord mich...@voidspace.org.uk added the comment:
As in ConfigParser you are always accessing a section and value I'm happy with
tuple indexing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5412
Michael Foord mich...@voidspace.org.uk added the comment:
The winning argument in my opinion is user convenience
Well yes, for me too - as the user will always be operating on (section, key)
pairs the extra level of indirection seems pointless
Michael Foord mich...@voidspace.org.uk added the comment:
I'm sympathetic to the feature request. I think that the way tests identify
themselves will change (improve) to accommodate the new extension machinery. I
would like to leave this feature request open for the moment and revisit
Michael Foord mich...@voidspace.org.uk added the comment:
Patch doesn't apply cleanly to 3.1 or earlier. As it is *arguably* a new
feature rather than a bugfix I'm closing the issue.
I certainly wouldn't argue against someone else backporting though...
--
stage: commit review
Michael Foord mich...@voidspace.org.uk added the comment:
This would change the format of config files that configparser supports. Should
there be some discussion of this on python-dev first?
The patch for the docs is against the latex docs, so definitely needs updating.
--
nosy
Michael Foord mich...@voidspace.org.uk added the comment:
There are no docs or tests in the patch. I like the functionality though and
doubt it will be controversial. The current api is a bit arcane. So +1 from
me.
--
nosy: +michael.foord
Michael Foord mich...@voidspace.org.uk added the comment:
This should just be applied. I'll do it shortly unless there is an objection.
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6517
Michael Foord mich...@voidspace.org.uk added the comment:
+1 to improving the message and improving the help message too.
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9362
Michael Foord mich...@voidspace.org.uk added the comment:
It is (very) unfortunate that configparser.ConfigParser should *not* be used
and that configparser.SafeConfigParser is the correct class instead.
I would be *in favour* of deprecating ConfigParser and eventually renaming
Michael Foord mich...@voidspace.org.uk added the comment:
Note that the patch doesn't apply cleanly. Łukasz Langa is going to update it.
There is still discussion as to whether we should *also* deprecate ConfigParser
(well - PendingDeprecation in 3.2, Deprecation in 3.3 and in 3.4 making
Changes by Michael Foord mich...@voidspace.org.uk:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1524825
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 83150.
Still needs backporting to 3.1, 2.7 and possibly even 2.6.
--
assignee: - michael.foord
resolution: - accepted
stage: patch review - commit review
versions: +Python 2.6
Michael Foord mich...@voidspace.org.uk added the comment:
No, assertIn is for testing for membership in a container. If you pass it
something that isn't a container then it indicates an error in the test (or
misuse of the assert!).
--
___
Python
Michael Foord mich...@voidspace.org.uk added the comment:
The API on TestCase is already too wide without adding more methods. This is
easy enough to do in a TestCase subclass for those who want it.
--
resolution: - wont fix
status: pending - closed
Michael Foord mich...@voidspace.org.uk added the comment:
I am in the process of creating an extension mechanism for unittest which will
make adding this sort of use case to unittest much easier. *Even* if it is
added to the core it should be in the form of an extension (plugin) so please
601 - 700 of 1074 matches
Mail list logo