[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-03-02 Thread Matt Bachmann
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 patch when I saw how

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-01-17 Thread Matt Bachmann
New submission from Matt Bachmann: PEP 3131 changed the definition of valid identifiers to match this pattern XID_Start XID_Continue* . 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

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-06-29 Thread Matt Bachmann
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 stdin, line 1, in module File /usr/local/Cellar/python3/3.4.1/Frameworks

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-06-29 Thread Matt Bachmann
Changes by Matt Bachmann bachmann.m...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35805/error_message.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21883

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-06-29 Thread Matt Bachmann
Changes by Matt Bachmann bachmann.m...@gmail.com: Removed file: http://bugs.python.org/file35805/error_message.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21883

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-06-29 Thread Matt Bachmann
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 rep...@bugs.python.org http://bugs.python.org

[issue21343] os.path.relpath returns inconsistent types

2014-05-25 Thread Matt Bachmann
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 unicode and I get back

[issue21343] os.path.relpath returns inconsistent types

2014-05-25 Thread Matt Bachmann
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' os.path.relpath(u'test_srcl.txt

[issue21343] os.path.relpath returns inconsistent types

2014-05-25 Thread Matt Bachmann
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

[issue21343] os.path.relpath returns inconsistent types

2014-05-14 Thread Matt Bachmann
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

[issue21343] os.path.relpath returns inconsistent types

2014-04-24 Thread Matt Bachmann
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

[issue17451] Test to splitdoc in pydoc.py

2013-03-18 Thread Matt Bachmann
Changes by Matt Bachmann bachmann.m...@gmail.com: Added file: http://bugs.python.org/file29444/acks.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17451

[issue17451] Test to splitdoc in pydoc.py

2013-03-18 Thread Matt Bachmann
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 rep...@bugs.python.org http://bugs.python.org

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Changes by Matt Bachmann bachmann.m...@gmail.com: -- components: +Tests type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17464

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
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

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: Sure thing, ill make the improvements and upload a new patch. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17464

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
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

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
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

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
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

[issue17476] Pydoc allmethods does not return all methods

2013-03-18 Thread Matt Bachmann
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

[issue17476] Pydoc allmethods does not return all methods

2013-03-18 Thread Matt Bachmann
Changes by Matt Bachmann bachmann.m...@gmail.com: Removed file: http://bugs.python.org/file29472/pydoc_tests_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17476

[issue17476] Pydoc allmethods does not return all methods

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: Yes! Sorry. -- Added file: http://bugs.python.org/file29474/fix_is_some_method.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17476

[issue17451] Test to splitdoc in pydoc.py

2013-03-17 Thread Matt Bachmann
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