New submission from Matt Bachmann:
I noticed an issue passing in unicode to os.path.relpath.
Specifically that in some cases when passing in unicode I would get back
unicode and others I would get back a string. Below I demonstrate the issue. I
also attached a patch.
Is this an issue or am I
Matt Bachmann added the comment:
Can you help me understand why not?
If I give it two unicode strings it sometimes gives me back a unicode and
sometimes gives me back a string.
In python3 this does what I expect.
In python27 I now have to check the type I get back because I cannot be sure
Matt Bachmann added the comment:
There is a difference! '.' is a bytes string and u'.' is a unicode one!
I found this problem because I work on a project that supports both python2 and
python3.
In python3 I pass in unicode I get back unicode. In python2.7 I pass in unico
Matt Bachmann added the comment:
Perhaps this is the bug I should be filing but here is why this comes up for
me.
I get different output from this function if I pass in two types.
On my machine:
os.path.relpath(u'test_srcl.txt', u'.') returns u'test_src.txt'
o
Matt Bachmann added the comment:
Looking into the project im working on I discovered why relpath was acting
strangely.
It is because the project mocks get_cwd but not get_cwdu. Your request helped
me track that down :-)
So that is not an issue. However, the issue described in the original
New submission from Matt Bachmann:
Howdy!
I encountered this error when accidently passing in mixed types to reldir
>>> import os
>>> os.path.relpath('/Users/bachmann', b'.')
Traceback (most recent call last):
File "", line 1, in
F
Changes by Matt Bachmann :
--
keywords: +patch
Added file: http://bugs.python.org/file35805/error_message.patch
___
Python tracker
<http://bugs.python.org/issue21
Changes by Matt Bachmann :
Removed file: http://bugs.python.org/file35805/error_message.patch
___
Python tracker
<http://bugs.python.org/issue21883>
___
___
Python-bug
Matt Bachmann added the comment:
Includes change and tests.
The test is similar so I just broke out the logic
--
Added file: http://bugs.python.org/file35806/error_message.patch
___
Python tracker
<http://bugs.python.org/issue21
New submission from Matt Bachmann:
Found a line in splitdoc that was not being exercised.
I added a test for it.
--
components: Library (Lib)
files: splitdoc_description_test.patch
keywords: patch
messages: 184427
nosy: Matt.Bachmann
priority: normal
severity: normal
status: open
title
Changes by Matt Bachmann :
Added file: http://bugs.python.org/file29444/acks.patch
___
Python tracker
<http://bugs.python.org/issue17451>
___
___
Python-bugs-list mailin
Matt Bachmann added the comment:
This has the test in the wrong place and I am actively expanding it. I will
reopen later today.
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Matt Bachmann :
--
components: +Tests
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue17464>
___
___
Python-bugs-list mai
New submission from Matt Bachmann:
Adds some test coverage to pydoc.
--
files: pydoctests.patch
keywords: patch
messages: 184486
nosy: Matt.Bachmann
priority: normal
severity: normal
status: open
title: Improve Test Coverage Of Pydoc
versions: Python 3.5
Added file: http
Matt Bachmann added the comment:
Sure thing, ill make the improvements and upload a new patch. Thanks!
--
___
Python tracker
<http://bugs.python.org/issue17
Matt Bachmann added the comment:
--Changes assertequals to assertequal
--Removes maxdiff as it should not really be there in the first place
--Creates an explicit testdir, and cleans it up
--Last patch did not actually apply cleanly... I reverted and applied this one
and this seems to work
Matt Bachmann added the comment:
Thanks for the feedback :-D
Changes:
Utilize test.support.temp_cwd()
Removed imports that this made unnecessary
Awesome trick!
Cut line length down. Don't worry about nitpicking. Anything to get this to be
as good as possible.
I added an explanation t
Matt Bachmann added the comment:
Eh, sorry... I tried to do a less fragile way of generating the configuration
dict. Tried a few things but it very quickly got messy and even worse started
to smell like testing the method with... the method being tested.
I am open to ideas though
New submission from Matt Bachmann:
Somewhere between python 2.7 and now the definition of a method changed causing
this helper method in pydoc to break. This was discovered in
http://bugs.python.org/issue17464 by r.david.murray when he found it curious
that a test I wrote was passing. I had
Changes by Matt Bachmann :
Removed file: http://bugs.python.org/file29472/pydoc_tests_v3.patch
___
Python tracker
<http://bugs.python.org/issue17476>
___
___
Python-bug
Matt Bachmann added the comment:
Yes! Sorry.
--
Added file: http://bugs.python.org/file29474/fix_is_some_method.patch
___
Python tracker
<http://bugs.python.org/issue17
New submission from Matt Bachmann:
PEP 3131 changed the definition of valid identifiers to match this pattern
* .
Currently if you have an invalid character in an identifier you get this error
☺ = 4
SyntaxError: invalid character in identifier
This is fine in most cases. But in some cases
Matt Bachmann added the comment:
Alrighty. I'll investigate and see if I can cut down the code some. If I can't
significantly I'll let the issue die quietly. I agree that it's a pretty
nitpick ticket.
I noticed it while doing some research into unicode and made the p
23 matches
Mail list logo