Michael Foord mich...@voidspace.org.uk added the comment:
I've uploaded a new patch with additions to the docs. Let me know if it is ok
or if you have any suggested amendments.
--
Added file: http://bugs.python.org/file18049/contextlib_docs.patch
Michael Foord mich...@voidspace.org.uk added the comment:
On Python 2.6.5:
os.path.splitext('.cshrc')
('.cshrc', '')
I believe this can be closed.
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http
unittest2 0.5.0 has just been released. This version of unittest2 has
feature parity with the version of unittest in Python 2.7:
* unittest2 on PyPI http://pypi.python.org/pypi/unittest2
If you want to ensure that your tests run identically under unittest2
and unittest in Python 2.7 you
Michael Foord mich...@voidspace.org.uk added the comment:
I don't particularly mind what the fix is - but at the moment users can
download and install Python from a python.org installer and then have an
(apparently) non functioning IDLE and Tkinter.
At the very least we should advise users
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: -michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7616
___
___
Python-bugs
Michael Foord mich...@voidspace.org.uk added the comment:
which is useful for discovering *if* a program is available (I sorely miss it
on Windows when I don't have cygwin installed). +1 for adding it to shutil.
--
nosy: +michael.foord
___
Python
New submission from Michael Foord mich...@voidspace.org.uk:
After installing Python 2.7 for Mac OS X from the Python.org binary I can't use
Tkinter or IDLE.
I installed the following, on Snow Leopard:
* Python 2.7 PPC/i386/x86-64 Max OS X Installer Disk Image
import Tkinter
Traceback
Michael Foord mich...@voidspace.org.uk added the comment:
As a further oddity, if I run IDLE.app I get an IDLE shell (weird as from the
command line Tkinter can't even be imported) - but I also get an error dialog
that the subprocess can't be connected to and then IDLE shuts down
Michael Foord mich...@voidspace.org.uk added the comment:
Mark Dickinson confirms the problem and offers this diagnosis:
The python.org binary links to Tcl 8.4 (which doesn't seem to have a 64-bit
version).
Perhaps this means having to have a separate installer for OS X 10.6
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 82767. (py3k)
Committed revision 82765. (release27-maint)
Fix could be ported to Python 3.1 as a bugfix as well.
--
resolution: - accepted
stage: patch review - committed/rejected
status: open - closed
Michael Foord mich...@voidspace.org.uk added the comment:
I agree that mentioning contextmanager in the ContextDecorator docs is a good
idea - plus adding something like Nick's example. I'll do that.
--
___
Python tracker rep...@bugs.python.org
http
Changes by Michael Foord mich...@voidspace.org.uk:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9174
___
___
Python-bugs-list mailing list
Michael Foord mich...@voidspace.org.uk added the comment:
I agree that mentioning contextmanager in the ContextDecorator docs is a good
idea - plus adding something like Nick's example. I'll do that.
--
___
Python tracker rep...@bugs.python.org
http
Michael Foord mich...@voidspace.org.uk added the comment:
Hey Jack. The point of ContextDecorator is that when you are implementing a
context manager, which you will usually do as a class anyway, you can just
inherit from it and get the decorator functionality for free.
If you like
Michael Foord mich...@voidspace.org.uk added the comment:
New patch uploaded with (I think) all suggested changes made. I left some text
in the .. versionchanged:: tag for contextmanager as I think this is normal.
--
Added file: http://bugs.python.org/file17808/contextdecorator.2.patch
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 82394.
I left examples of using ContextDecorator with a decorated *and* in a with
statement in the documentation. Feel free to trim the with statement example if
you feel it is redundant.
--
resolution
Michael Foord mich...@voidspace.org.uk added the comment:
Hey Nick,
The tests are pretty much just copied from the previous version, so they aren't
all appropriate. In fact I think that the first two tests (and even the typo
tests) can just go as they really just test Python semantics
New submission from Michael Foord mich...@voidspace.org.uk:
Patch to add a ContextDecorator class to contextlib. This allows context
managers that inherit from ContextDecorator (including using it as a mixin) to
be used as decorators as well as context managers.
Context managers inheriting
Changes by Michael Foord mich...@voidspace.org.uk:
Added file: http://bugs.python.org/file17796/docs.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9110
New submission from Michael Foord mich...@voidspace.org.uk:
When I do a *full test run* of py3k I get a distutils test failure. It doesn't
happen if I run test_distutils on its own:
bigmac:py3k michael$ ./python.exe -m test.regrtest -j12
== CPython 3.2a0 (py3k:82215, Jun 25 2010, 13:59:00
New submission from Michael Foord mich...@voidspace.org.uk:
warnings.filterwarnings is mostly a bunch of asserts, so it doesn't work when
Python is run with -O or -OO. This also means that a bunch of tests fail when
run with -O or -OO.
Two options are skip the tests or fix filterwarnings
Michael Foord mich...@voidspace.org.uk added the comment:
A third (and better) option, but a deeper change, would be to allow the
enabling of asserts on a per-module basis even when Python is run with -O/-OO.
This would be great for testing
Changes by Michael Foord mich...@voidspace.org.uk:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9082
___
___
Python-bugs
,
Michael Foord
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
READ CAREFULLY. By accepting and reading this email you agree, on behalf of your
employer, to release me from all obligations and waivers arising from any and all
NON-NEGOTIATED agreements, licenses, terms
Michael Foord mich...@voidspace.org.uk added the comment:
But I want to execute test from my own patched copy of test_httpservers.py
with whatever python I want. I.e.
C:\Python27\python.exe Z:\python-cgi-tests\test_httpservers.py ...
If you use Python 2.7 then the following at the end
Michael Foord mich...@voidspace.org.uk added the comment:
Right. That code should change. My intention is to go through the whole of the
Python test suite and make them compatible with the new unittest features.
I also intend to add extensions to unittest to allow listing of collecting
tests
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 81875.
Committed revision 81874.
--
resolution: - accepted
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http
Michael Foord mich...@voidspace.org.uk added the comment:
Typo correction in revision 81859. Also needs merging onto py3k.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8948
for matching.
Addition of a setuptools compatible entrypoint for the unit2 test runner
script.
Contributed by Chris Withers.
Tests fixed to be compatible with Python 2.7, where deprecation warnings
are
silenced by default.
Feature parity with unittest in Python 2.7 RC 1.
All the best,
Michael
New submission from Michael Foord mich...@voidspace.org.uk:
Also class / module tearDowns are not executed with TestSuite.debug()
--
assignee: michael.foord
components: Library (Lib)
messages: 107346
nosy: michael.foord
priority: normal
severity: normal
status: open
title: cleanup
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 81853. Still needs porting to py3k (and unittest2).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8948
Michael Foord mich...@voidspace.org.uk added the comment:
Slightly modified version committed revision 81728. (It truncates large diffs
rather than omitting them and allows max_diff to be None - meaning no maximum.)
Needs some extended tests and needs documenting
Michael Foord mich...@voidspace.org.uk added the comment:
Modified again in revision 81739. No longer uses a new argument, but a class
attribute instead. All assert methods that generate failure messages with
difflib truncate messages
Michael Foord mich...@voidspace.org.uk added the comment:
Modified again in revision 81752. Assertion methods now inform you when
omitting an excessively long diff.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
Michael Foord mich...@voidspace.org.uk added the comment:
Still some tests and documentation needed. Leaving issue open until it is done.
(Also needs backporting to unittest2...)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
Note that we also have a bit of a performance issue in prettyprint / difflib
when the diffs are very big. It can spend a minute or more constructing the
diff - only to throw it away because it is too big
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 81760. Needs tests and documentation.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8302
Changes by Michael Foord mich...@voidspace.org.uk:
--
resolution: - accepted
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8302
Changes by Michael Foord mich...@voidspace.org.uk:
--
resolution: - accepted
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 81055.
--
resolution: - accepted
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8303
On 9 May 2010 20:36, Godson Gera godso...@gmail.com wrote:
On Sun, May 9, 2010 at 6:24 PM, Fuzzyman fuzzy...@gmail.com wrote:
On Mar 23, 10:04 pm, geremy condra debat...@gmail.com wrote:
On Tue, Mar 23, 2010 at 1:07 PM, Tim Golden m...@timgolden.me.uk
wrote:
On 23/03/2010 16:55, Jose
Michael Foord mich...@voidspace.org.uk added the comment:
Adapting the setuptools command is a great way to start of course. Please see
my note about using unittest/unittest2 test discovery as a default command if
unitest2 is available and no test_suite is specified. I'm very happy to help
Michael Foord mich...@voidspace.org.uk added the comment:
unittest2 is used for distutils2 development, but *not* a required dependency
for *using* distutils2 (if I understand correctly(.
Well, if there is no test runner and no test suite specified but the test
command is invoked
Michael Foord mich...@voidspace.org.uk added the comment:
Documentation for unittest.TestLoader.discover(...) is at:
http://docs.python.org/dev/library/unittest.html#unittest.TestLoader.discover
--
___
Python tracker rep...@bugs.python.org
http
Michael Foord mich...@voidspace.org.uk added the comment:
Tested in revision 79643. Still needs docs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7780
Changes by Michael Foord mich...@voidspace.org.uk:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7780
___
___
Python-bugs-list mailing list
Michael Foord mich...@voidspace.org.uk added the comment:
Test committed revision 80974.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7780
Michael Foord mich...@voidspace.org.uk added the comment:
Documented revision 80980.
--
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7780
Michael Foord mich...@voidspace.org.uk added the comment:
Docstrings committed revision 80990.
--
stage: unit test needed - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8038
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 80997.
--
resolution: - accepted
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8301
Changes by Michael Foord mich...@voidspace.org.uk:
--
resolution: - accepted
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8547
Michael Foord mich...@voidspace.org.uk added the comment:
Now fixed.
--
resolution: - accepted
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8388
Changes by Michael Foord mich...@voidspace.org.uk:
--
resolution: - wont fix
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8454
Michael Foord mich...@voidspace.org.uk added the comment:
Revision 80708 and revision 80709.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8388
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 80932. Still needs documenting, so leaving open for the
moment.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8547
Michael Foord mich...@voidspace.org.uk added the comment:
Committed again revision 80946 after getting the tests to pass on Windows.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8547
Michael Foord mich...@voidspace.org.uk added the comment:
Changing traceback._some_str to return unicode rather than str seems like a bad
idea.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8313
Changes by Michael Foord mich...@voidspace.org.uk:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8313
___
___
Python-bugs-list mailing list
Michael Foord mich...@voidspace.org.uk added the comment:
I would prefer to try str(...) first and only attempt to convert to unicode and
do the backslash replace if the str(...) call fails.
--
___
Python tracker rep...@bugs.python.org
http
Michael Foord mich...@voidspace.org.uk added the comment:
Sounds like a good solution - I'll look at this, thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8313
Michael Foord mich...@voidspace.org.uk added the comment:
Any idea where this path comes from? I can go spelunking through the code
myself to investigate.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8586
Michael Foord mich...@voidspace.org.uk added the comment:
Ok, so the cause of the bug is 'simple' - not sure what the best fix is.
When I run python from a freshly built py3k I have the following as sys.path:
['', '/dev/null/lib/python32.zip', '/compile/python-trunk3/Lib',
'/compile/python
Michael Foord mich...@voidspace.org.uk added the comment:
On trunk the definition of unlink is:
def unlink(filename):
try:
os.unlink(filename)
except OSError:
pass
:-)
Changing it as you suggest fixes the problem though. Ok to commit
Michael Foord mich...@voidspace.org.uk added the comment:
I get this same failure on Mac OS X 10.6.3 as well.
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8432
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 80771.
--
assignee: michael.foord - barry
resolution: accepted - works for me
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep
Michael Foord mich...@voidspace.org.uk added the comment:
I'm seeing a similar (but not identical) failure on py3k / Windows 7 in
test_marshal. Failure in the same code path in support.py:
==
ERROR: test_floats (__main__
Changes by Michael Foord mich...@voidspace.org.uk:
--
title: test_imp.py test failures on Py3K Mac OS X - test.support errors (py3k)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8586
Michael Foord mich...@voidspace.org.uk added the comment:
Hmm... happens reliably for me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8586
Michael Foord mich...@voidspace.org.uk added the comment:
I still see this failure on Python 3 trunk with Mac OS X 10.6.
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4388
New submission from Michael Foord mich...@voidspace.org.uk:
I get the following failure running test_imp on py3k, Mac OS X 10.6.3.
==
ERROR: test_package___file__ (__main__.PEP3147Tests
New submission from Michael Foord mich...@voidspace.org.uk:
I get the following failures with test_import on Mac OS X 10.6.3:
==
ERROR: test_import (test.test_import.ImportTests
Michael Foord mich...@voidspace.org.uk added the comment:
This is likely related to issue 8586 - the actual failure is very similar (a
bad path in support.py).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8587
Michael Foord mich...@voidspace.org.uk added the comment:
I see similar failures (failing to unlink weird paths from support.py) in:
test_imp.py, test_import.py, test_pydoc.py, test_runpy.py,
--
___
Python tracker rep...@bugs.python.org
http
Michael Foord mich...@voidspace.org.uk added the comment:
So I'm assuming issue 8587 (same failure in test_import.py) is a duplicate of
this. I'll close 8587.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8586
Michael Foord mich...@voidspace.org.uk added the comment:
Assuming this is actually the same problem as issue 8586.
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http
New submission from Michael Foord mich...@voidspace.org.uk:
Failures on py3k, Mac OS X 10.6.3.
==
ERROR: test_proxy_https (__main__.HandlerTests)
--
Traceback
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: - orsenthil
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8588
New submission from Michael Foord mich...@voidspace.org.uk:
If you run test_warnings.py under an ascii terminal (at least on Mac OS X) then
test_warnings.CEnvironmentVariableTests.test_nonascii fails. Perhaps the test
should be skipped
New submission from Michael Foord mich...@voidspace.org.uk:
A failure in test_httpservers.py on 31-maint (not failing in py3k) on Mac OS X
10.6.3:
test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call
last):
File
/private/var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp
Michael Foord mich...@voidspace.org.uk added the comment:
Same failure on 31-maint.
--
versions: +Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8588
Michael Foord mich...@voidspace.org.uk added the comment:
This passes for me in Mac OS X Terminal (a UTF8 terminal) but fails in iTerm
(an ascii terminal) on both 31-maint and py3k.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
What does issue 8522 have to do with it - did you mean a different issue? In
unittest it could catch the UnicodeEncodeError and write the ascii repr instead.
--
___
Python tracker rep
Michael Foord mich...@voidspace.org.uk added the comment:
Sounds like the right approach then. :-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8547
Michael Foord mich...@voidspace.org.uk added the comment:
Looks like a good addition to the documentation to me.
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8564
New submission from Michael Foord mich...@voidspace.org.uk:
When test discovery is invoked on a package on the filesystem which is also
installed in site-packages then importing the tests will look in the installed
version. This causes discovery to run the wrong tests or fail.
We can detect
Changes by Michael Foord mich...@voidspace.org.uk:
--
stage: unit test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2521
Michael Foord mich...@voidspace.org.uk added the comment:
That change would be backwards incompatible with existing scripts calling
main(...) programattically though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8454
Michael Foord mich...@voidspace.org.uk added the comment:
I'm sure that there are many places using the API as it is, inserting a dummy
entry into the argv they pass. Although the fix you propose would solve the
problem for users who are currently using the API wrongly it would break code
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: cjerdonek - michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7559
.
Split out monolithic test module into a package.
BUGFIX: Correct usage message now shown for unit2 scripts.
BUGFIX: ``__unittest`` in module globals trims frames from that module in
reported stacktraces.
All the best,
Michael Foord
--
http://www.ironpythoninaction.com/
http
Michael Foord mich...@voidspace.org.uk added the comment:
If we provide builtin support for parameterized tests it will have to report
each test separately otherwise there is no point. You can already add support
for running tests with multiple parameters yourself - the *only* advantage
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: - michael.foord
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
Michael Foord mich...@voidspace.org.uk added the comment:
I expect the unittest tests will fail with that patch applied however... No
problem with switching to just using StringIO in unittest though - preferably
with a comment as to why
Michael Foord mich...@voidspace.org.uk added the comment:
TestResult creates its StringIO buffers even if they aren't use. I can create
them on first use and use StringIO.StringIO rather than cStringIO. Will fix now.
--
___
Python tracker rep
Michael Foord mich...@voidspace.org.uk added the comment:
Although merely switching to StringIO may not be enough. TestResult objects
keep a reference to sys.stdout when they are instantiated and you can't pickle
that either.
It is preferable for the reference to be taken at instantiation
Michael Foord mich...@voidspace.org.uk added the comment:
Changing unittest.TestResult to use StringIO instead of cStringIO isn't
sufficient. regrtest.py also needs to use StringIO...
--
___
Python tracker rep...@bugs.python.org
http
Michael Foord mich...@voidspace.org.uk added the comment:
I believe this issue to now be fixed on trunk. We can close this when the
buildbots are passing again.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8333
Michael Foord mich...@voidspace.org.uk added the comment:
Green build on Windows XP, trunk.
http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%20trunk/builds/282
--
resolution: - accepted
stage: needs patch - committed/rejected
status: open - closed
New submission from Michael Foord mich...@voidspace.org.uk:
import unittest
class Foo(unittest.TestCase):
... def test_fffd(self): self.assertEqual(u'\ufffd', u'\ufffd\ufffd')
...
unittest.main(exit=False)
F
==
FAIL
Michael Foord mich...@voidspace.org.uk added the comment:
Should default to test discovery if no arguments are supplied.
Valid arguments: testrunner, tests or testsuite.
Default testrunner is unittest of course. tests / testsuite to be of the
form: package.module.suitename (or just
701 - 800 of 1074 matches
Mail list logo