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
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
<http://bugs.python.org/issue21
Changes by Robert Li :
--
keywords: +patch
Added file: http://bugs.python.org/file35727/cb18733ce8f1.diff
___
Python tracker
<http://bugs.python.org/issue21
Changes by Robert Li :
Added file: http://bugs.python.org/file35731/34e88a05562f.diff
___
Python tracker
<http://bugs.python.org/issue21827>
___
___
Python-bugs-list m
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
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.
New submission from Robert Snoeberger:
>>> import fractions
>>> fractions.gcd(16, float('inf'))
Traceback (most recent call last):
File "", line 1, in
fractions.gcd(16, float('inf'))
File "C:\Python34-32bit\lib\fractions.py&
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
<http://bugs.python.org/issue16
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
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
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 i
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 docum
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 a
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 docume
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
<http://bugs.python.org/issue16
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
<http://bugs.python.org/is
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
<http://bugs.py
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
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 repo
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
<http://bugs.python.org/issue7
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
Robert Collins added the comment:
Raced with your comment. Great - and thanks!
--
___
Python tracker
<http://bugs.python.org/issue7559>
___
___
Python-bugs-list m
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
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 < tests/__init__.py
import sys
import os
def load_tests(loader, tests, pattern):
print("H
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 consi
Robert Collins added the comment:
This should fix this issue :)
--
keywords: +patch
Added file: http://bugs.python.org/file36694/issue22457.patch
___
Python tracker
<http://bugs.python.org/issue22
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 trac
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
<http://bugs.python.org/issue16
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
<http://bugs.python.org/issue16
Changes by Robert Collins :
Removed file: http://bugs.python.org/file36713/fix-windows-tests.patch
___
Python tracker
<http://bugs.python.org/issue16662>
___
___
Pytho
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
Robert Collins added the comment:
Updated patch - fixes windows tests for this patch.
--
Added file: http://bugs.python.org/file36716/issue22457.diff
___
Python tracker
<http://bugs.python.org/issue22
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
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 and
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
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 ha
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 qu
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 ma
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
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).
S
Robert Lehmann added the comment:
I composed a list of __future__ features and linked the respective PEPs.
Even though the language reference would be a better place to store such
general information (being PEP'd and all) I found the library
reference's __future__.py documentati
New submission from Robert Kern :
The final 'arg' argument of the sys.settrace() callback is documented to
be None for the 'c_return' and 'c_exception' events, but it appears to
be the function object itself. Additionally, the 'return' event's
argume
New submission from Robert DeVaughn :
When attempting to store a file via FTP, the following error occurs. See
attached code.
Traceback (most recent call last):
File "C:\Documents and
Settings\rdevaughn\Desktop\HTTP\src\FTP_directory.py", line 14, in
ftp.storlines("STO
Robert Lehmann added the comment:
Implemented proposed changes.
Additionally, I'd change line 13 to state either "future statements" or
"`future`:ref:" instead of "future_statements", which does not make
sense in normal, unmarked text.
--
Added fil
Changes by Robert Lehmann :
Added file: http://bugs.python.org/file14886/future.patch
___
Python tracker
<http://bugs.python.org/issue6574>
___
___
Python-bugs-list mailin
New submission from Robert Lehmann :
The documentation for hashlib.hash.digest_size/block_size (notice the
hash) renders as documentation for hashlib.*_size, which does not exist.
Fixed by explicitly declaring membership; patch attached.
--
assignee: georg.brandl
components
New submission from Robert Lehmann :
asynchat.async_chat grew a _collect_incoming and a _get_data method in
2.6. The constructor has been extended to conform to
asyncore.dispatcher's. This should be documented.
Apart from that, fifo and simple_producer have been deprecated
Robert Lehmann added the comment:
Excuse me -- fifo and simple_producer are indeed documented and need a
deprecation notice. New patch attached (plus reworded paragraph about
async_chat.__init__).
--
Added file: http://bugs.python.org/file14889/asynchat-docs.patch
Robert Lehmann added the comment:
I found another bug: async_chat.push still talks about automatically
creating a simple_producer, which is no longer true.
I added a fix to the patch.
--
Added file: http://bugs.python.org/file14893/asynchat-docs.patch
New submission from Robert Lehmann :
The patches in issue1736190 deprecated fifo and simple_producers. These
are safe for removal in Python 3.0.
I attached a patch purging fifo and simple_producers from py3k code and
tests. The docs are mostly trivial as well but also touched by my other
issue
Robert Lehmann added the comment:
If I understand you correctly, your proposal is the following: use
Shelf.cache to cache *all* objects instead of only keeping live
references. Your patch retains the cache forever instead of purging it
on sync. (All these changes only apply with writeback=True
Robert Lehmann added the comment:
I think you're misquoting Python's shelve module documentation in your
first sentence. The documentation says:
"By default modified objects are written only when assigned to the shelf
[...]. If the optional writeback parameter is set to Tr
New submission from Robert Lehmann :
I'm reopening issue5483 by Zhigang Wang (zhigang) as a separate bug.
Shelves that are still open when Python terminates will try to sync. If
writeback=True, this pickles cached items.
In this example, serialization of Test() re-imports __main__, whi
Changes by Robert Lehmann :
--
keywords: +patch
Added file: http://bugs.python.org/file14913/shelve-warning.patch
___
Python tracker
<http://bugs.python.org/issue6
Robert Lehmann added the comment:
I addressed the other bug you were experiencing in issue6932.
--
___
Python tracker
<http://bugs.python.org/issue5483>
___
___
Robert Lehmann added the comment:
I revised the patch for Python 3.1 and added notices to Misc/NEWS and
the range documentation.
(Changing Type to resource usage.)
--
nosy: +lehmannro
type: feature request -> resource usage
Added file: http://bugs.python.org/file14939/range.pa
Robert Lehmann added the comment:
Thanks for your feedback. I added a few tests and changed the bits you
criticized.
--
Added file: http://bugs.python.org/file14945/range.patch
___
Python tracker
<http://bugs.python.org/issue1766
New submission from Robert Szefler :
Trying to .emit() a Unicode string causes an awkward exception to be thrown:
Traceback (most recent call last):
File "/usr/lib/python2.5/logging/handlers.py", line 672, in emit
self.socket.sendto(msg, self.address)
TypeError: sendto() takes
Robert Szefler added the comment:
Fine with me, though problems would arise. Default encoding for example.
If encoding selection is mandatory it would break compatibility. Using
default locale is not such a good idea - local machine's locale would
generally not need to have any correlati
New submission from Robert Collins :
There is a systemic bug in BZ2File where the GIL is released to perform
compression work, and any other thread calling into BZ2File will
deadlock. We noticed in the write method, but inspection of the code
makes it clear that its systemic.
The problem is
Robert Collins added the comment:
On Sun, 2009-10-25 at 22:00 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> Thanks, nice catch.
Yeah :).
> versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2
Python 2.5 is also affected - its what we're runn
Robert Collins added the comment:
On Sun, 2009-10-25 at 22:27 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> > Python 2.5 is also affected - its what we're running on the server that
> > broke :)
>
> Yes, but it doesn't receive any
Robert Collins added the comment:
On Mon, 2009-10-26 at 19:23 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> Here is a patch.
Looks fine to me assuming that the locking functions can be used outside
the GIL.
On the test side, the case I supplied was low noi
Robert Collins added the comment:
On Mon, 2009-10-26 at 21:27 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
> Well, your test case often succeeded here, so I decided on a more
> aggressive variation.
fair enough, if its needed - its needed
Robert Collins added the comment:
Ran into this trying to do some test isolation stuff.
Notwithstanding the questions about 'why', this is a clear limitation
hat can be solved quite simply - is there any harm that will occur if we
fix it?
I've attached a patch, with a test (
Robert Collins added the comment:
This affects 2.7 too.
--
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue1515>
___
___
Python-bugs-list m
Robert Collins added the comment:
@Antoine, I agree that the tests for copy should be a proper unit test;
that seems orthogonal to this patch though :)
I don't have a checkout of 3 at the moment, but do you think the test
failure on 3 is shallow or
Robert Collins added the comment:
Oh man, I looked for a regular unit test - sorry that I missed it. Bah.
I've added a call to the method and moved it into test_copy.
--
Added file: http://bugs.python.org/file15406/issue1515.patch
___
P
New submission from Robert Collins :
With deepcopy fixed, I ran across this little fixable component.
--
components: Library (Lib)
files: deepcopy-works.patch
keywords: patch
messages: 95823
nosy: rbcollins
severity: normal
status: open
title: cleanup now deepcopy copies instance
New submission from Robert Collins :
>>> from copy import deepcopy
>>> from itertools import count
>>> c = count()
>>> c.next()
0
>>> deepcopy(c)
count(0)
>>> c.next()
1
>>> deepcopy(c)
count(0)
>>> c
count(2)
>>>
Changes by Robert Collins :
--
nosy: +rbcollins
___
Python tracker
<http://bugs.python.org/issue2422>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Collins added the comment:
"2) 0 args, e = MyException(), with overridden __str__:
py2.5 : str(e) -> 'ascii' or error; unicode(e) -> u'ascii' or error;
py2.6 : str(e) -> 'ascii' or error; unicode(e) -> u''
desired: st
New submission from Robert Collins :
:!python -m unittest foo.test_suite
Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line
New submission from Robert Collins :
Say I have a test module test_foo, which fails to import with
ImportError. A reason for this might be a misspelt import in that module.
TestLoader().loadTestsFromName swallows the import error and instead
crashes with:
File "/usr/lib/python2.6/unitte
Robert Collins added the comment:
mkdir thing
touch thing/__init__.py
echo "import blert" > thing/test_foo.py
python -m unittest thing.test_fooTraceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
"__main
Robert Collins added the comment:
I'm scratching an itch at the moment, I just noted this in passing ;)
I'm partial to the 'turn it into a fake test case' approach, its what I
would do if I get to it first.
--
___
P
New submission from Robert Xiao :
In the documentation for the namedtuple
(http://docs.python.org/3.1/library/collections.html), the following
phrase is incorrect:
The subclass shown above sets __slots__ to an empty tuple. This keeps
keep memory requirements low by preventing the creation of
Changes by Robert Schuppenies :
--
nosy: +schuppenies
___
Python tracker
<http://bugs.python.org/issue4258>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Luce added the comment:
Thomas, is there any chance of getting your attention for this one?
Deciding whether or not this issue can be fully resolved by applying the
proposed patch would already be sufficient. If it is not, I am willing
to invest more time on resolving this issue
Robert Xiao added the comment:
Frankly, I don't really like that idea; I think it muddles up the RE
syntax to have such a group-modifying operator, and seems rather
unpythonic: the existing way to do this -- use .upper(), .lower() or
.title() to format the groups in a match object as nece
New submission from Robert Xiao :
(tested and verified on Windows and Solaris SPARC)
Running this code in Python 2.4, 2.5 or 2.6 (all minor versions)
produces garbage.
f=open("anyfile","w")
f.write("garbage")
f.readline()
Mac OS X and Linux appear to simply th
Robert Xiao added the comment:
OK, it's not a memory leak, rather, it's something leaking from the
files. However, this still winds up filling the affected file full of
garbage, which is quite undesirable (and, I think, quite likely to be
unwanted behaviour, considering that *some* re
Robert Collins added the comment:
It should run after tearDown so that teardown can do actions that may
require cleanup; because the cleanups run in LIFO you can acquire
resources in setUp and have cleanups clean them up,
--
nosy: +rbcollins
Robert Collins added the comment:
Actually let me phrase that differently.
standard practice for setUp is
super.setUp()
my_setup_code()
and tearDown is
my_teardown_code()
super.tearDown()
because of the LIFO need.
If you imagine that clean ups are being done in the base class teardown,
at
New submission from Robert Collins :
Currently if you alter the way TestSuite iterates one must always
implement countTestCases, run, debug etc. The attached patch would make
this simpler.
If this looks ok I'll write up a test for it.
--
components: Library (Lib)
files: testsuite.
Robert Collins added the comment:
On Sat, 2009-04-04 at 22:09 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> teardown
>
> Why should they? It's only an implementation choice, and not a wise one
> I would say (precisely because people are us
Robert Collins added the comment:
On Sat, 2009-04-04 at 23:06 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> > The main use case for addCleanup is resource allocation in tests. Why
> > does this require clean ups to be executed before tearDown?
&g
Robert Collins added the comment:
On Sun, 2009-04-05 at 07:25 +, Garrett Cooper wrote:
> Garrett Cooper added the comment:
>
> I think some perspective is required on this enhancement request. I
> originally filed this issue -- http://bugs.python.org/issue5538 --
> because
Robert Collins added the comment:
On Sun, 2009-04-05 at 10:15 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> > Our experience in bzr (we use this heavily, and migrated to it
> > incrementally across our 17K fixture suite) is that we rarely need to
&
Robert Collins added the comment:
On Sun, 2009-04-05 at 21:31 +, Antoine Pitrou wrote:
> Antoine Pitrou added the comment:
>
> > So, we are talking about adding a feature that could cause problem whether
> > cleanup is performed before tearDown or after tearD
Robert Collins 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 alway
Robert Collins added the comment:
On Sun, 2009-04-05 at 23:57 +, Michael Foord wrote:
> Michael Foord added the comment:
>
> My apologies - the jml code on launchpad runs clean ups before taerDown.
>
> http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/he
New submission from Robert Collins :
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'
Robert Collins 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, I said you
Robert Collins 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://bugs.
Robert Xiao added the comment:
Have you tried this with xml.dom.minidom?
--
nosy: +nneonneo
___
Python tracker
<http://bugs.python.org/issue5762>
___
___
Pytho
Robert Collins added the comment:
On Wed, 2009-04-15 at 23:19 +, Barry A. Warsaw wrote:
> Barry A. Warsaw added the comment:
>
> The patch looks fine to me, except that it's missing documentation
> updates. The feature and names are fine too.
Where do t
Robert Collins 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 tracker
<h
Robert Kern 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
dtrace -o $@ $(D
Robert Kern 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 __GNUC_VA_LIST
#endif
401 - 500 of 1080 matches
Mail list logo