Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue4153>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Jerdonek:
Works:
>>> p = ArgumentParser(prog='test.py')
>>> p.add_argument('pos')
>>> p.add_argument('remainder', nargs=argparse.REMAINDER)
>>> p.parse_args(['abc', '--def'])
Namespac
Chris Jerdonek added the comment:
See also issue 17050 for a reduced/simple case where argparse.REMAINDER doesn't
work (the case of the first argument being argparse.REMAINDER).
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.py
New submission from Chris Jerdonek:
The _do_discovery() method of unittest.TestProgram:
def _do_discovery(self, argv, Loader=loader.TestLoader):
(from http://hg.python.org/cpython/file/2cf89e2e6247/Lib/unittest/main.py#l222 )
should be using self.testLoader instead of loader.TestLoader
Chris Jerdonek added the comment:
After thinking about this more, it seems this lets you do two orthogonal things:
1. Easily append data to failure messages coming from a block of asserts
2. Continue running a test case after a failure from a block of asserts
Both of these seem independently
Chris Jerdonek added the comment:
I will at least! :) I noticed the issue after trying to use unittest test
discovery with a custom loader. Fortunately, there is at least this
work-around (though it relies on an implementation detail):
class MyTestProgram(unittest.TestProgram
Chris Jerdonek added the comment:
Whichever solution you pick for the "test" issue, I would at least add a code
comment explaining that the test return value needs to be garbage collected and
why, etc. and probably reference this issue.
> If anyone thinks the 'ReapedSuite
Chris Jerdonek added the comment:
>> 1. Easily append data to failure messages coming from a block of asserts
>> 2. Continue running a test case after a failure from a block of asserts
>
>> Both of these seem independently useful and more generally applicable,
>
>
Chris Jerdonek added the comment:
This has already been proposed in issue 15580. By the way, you don't always
want to replace "true" with ``True``. The former has a different
connotation/meaning which is boolean true rather than the object True.
--
nosy: +chris.jerd
Chris Jerdonek added the comment:
> This documentation states that libraries can turn off logging by adding a
> NullHandler:
I don't think that's what the documentation says. It says, "If for some reason
you don’t want these messages printed *in the absence of any loggin
Chris Jerdonek added the comment:
> Yes, I know. I went through all the occurrences one by one, and I tried to
> take that into account.
See issue 4945 for a discussion like this. Might be relevant to what you have
in mind.
--
___
Python t
Chris Jerdonek added the comment:
> This has already been proposed in issue 15580.
By the way, I should have said "something along the same lines." Issue 15580
is about eliminating uses of :const:`None`, etc, whereas this targets a
different case. But it is similar in scop
Chris Jerdonek added the comment:
It might be worth clarifying in the devguide then if True/False/etc shouldn't
be treated differently from other things. The current wording suggests that
links shouldn't be used at all in those cases (e.g. "given that they’re
fundamental to t
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue14037>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue14039>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Have you tried setting the metavar property on the return value of
add_subparsers()? I tried this, and it seems to work.
It looks like the logic for _metavar_formatter() is the same no matter what the
action type (specifically _SubParsersAction in this case
Chris Jerdonek added the comment:
Actually, it looks like add_subparsers() may already support passing a metavar
argument, but it's just not documented?
--
___
Python tracker
<http://bugs.python.org/is
Chris Jerdonek added the comment:
I meant to comment on the patch earlier.
The fix here isn't as simple as I had originally suggested. The patch has to
be constructed more carefully to be more fully backwards compatible. For
example, it shouldn't break code that imports DEBUG fr
Changes by Chris Jerdonek :
--
keywords: -easy
___
Python tracker
<http://bugs.python.org/issue16989>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Jerdonek :
--
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Chris Jerdonek added the comment:
> I am concerned that this feature changes the TestResult API in a backwards
> incompatible way.
My suggestion to add the original TestCase object to TestResult.errors, etc.
instead and add the extra failure data to the longDescription would address
Chris Jerdonek added the comment:
> I've already replied to all this.
You didn't respond to the idea of exposing both features separately after
saying you didn't understand what I meant and saying that they were pointless
and didn't make sense. So I explained and also
Chris Jerdonek added the comment:
Is this a duplicate of issue 13592?
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue17087>
___
___
Pytho
Chris Jerdonek added the comment:
See also issue 17087 which is essentially the same issue but for match objects.
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue13
Chris Jerdonek added the comment:
I would like to request again that these changes be proposed and committed in
smaller chunks.
I have comments of a basic nature that would be much easier to discuss and
address in the context of smaller patches. Otherwise, the discussion isn't
manag
Chris Jerdonek added the comment:
My understanding is that the commits are all or nothing. In other words, they
all need to be reviewed before any are committed. I would like for the patches
to be reviewed and committed individually so the review process is more
manageable and people can
Chris Jerdonek added the comment:
Also, I would be happy to start that process using the work that you have done.
--
___
Python tracker
<http://bugs.python.org/issue14
Chris Jerdonek added the comment:
I see ways that the changes can be proposed and committed incrementally. I can
start proposing those.
--
___
Python tracker
<http://bugs.python.org/issue14
Chris Jerdonek added the comment:
The point is to allow a manageable discussion to take place around points of
contention while making forward commit progress along the way. I have
suggestions right now, but the current massive batch of changes makes it too
unwieldy. The incremental commits
Changes by Chris Jerdonek :
--
nosy: +bethard, chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue17113>
___
___
Python-bugs-list mailing list
Unsub
Chris Jerdonek added the comment:
Never mind :)
--
___
Python tracker
<http://bugs.python.org/issue17109>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
How does the "+" level relate to the convention described here?
http://docs.python.org/devguide/documenting.html#sections
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.o
Chris Jerdonek added the comment:
I see why I was confused. The ~'s are different from -'s. The tilde level
isn't listed in our devguide conventions.
--
___
Python tracker
<http://bugs.pyt
Chris Jerdonek added the comment:
I think the guidance is still helpful. I have referred to it often. It can
just be changed to being a suggestion as opposed to "the convention that we
use."
--
___
Python tracker
<http://bu
Chris Jerdonek added the comment:
See issue 16926 for another issue about using -r with register.
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue17
Chris Jerdonek added the comment:
Danilo, does this work any better?
$ python setup.py sdist register -r local upload
--
___
Python tracker
<http://bugs.python.org/issue17
Chris Jerdonek added the comment:
I'm still opposed to exposing these features only together. Annotating the
failure message with parametrization data is useful in its own right, but what
if there are 500 subtests in a loop and you don't want 500 failures to be
registered for that
Chris Jerdonek added the comment:
Michael, was this implemented correctly? Loader should be a callable (e.g. a
class), but self.testLoader is an instance (it defaults to
loader.defaultTestLoader, which equals loader.TestLoader()):
http://hg.python.org/cpython/file/b53b029895df/Lib/unittest
Chris Jerdonek added the comment:
It seems like the last patch (subtests5.patch) dropped the parameter data from
the failure output as described in the docs. For example, the example in the
docs yields the following:
FAIL: test_even (__main__.NumbersTest)
instead of the documented
Chris Jerdonek added the comment:
+- Issue #17502: unittest discovery should use self.testLoader.
Also, this should read Issue #17052.
--
___
Python tracker
<http://bugs.python.org/issue17
New submission from Chris Withers:
>>> from types import new_class
>>> from datetime import datetime
>>> new_class('tdatetime', (datetime, ), kwds={'foo':'bar'})
Traceback (most recent call last):
File "", line 1, in
File
Chris Jerdonek added the comment:
Thanks a lot for taking care of this issue, Michael.
--
___
Python tracker
<http://bugs.python.org/issue17052>
___
___
Python-bug
Chris Jerdonek added the comment:
>> what if there are 500 subtests in a loop and you don't want 500 failures to
>> be
>> registered for that test case?
>
> Parametered tests have the same issue. In this case you simply don't use
> subtests
> or test
New submission from Chris Withers:
Sticking an issue in at Michael's request...
Older versions of mock had a helper called mocksignature.
In newer versions, create_autospec replaces this, but doesn't get it right
sometimes:
>>> from inspect import getargspec
&
New submission from Chris Withers:
Python 2 had a private but usable way of introspecting and manipulating
registered atexit handlers by way of the atexit._exithandlers.
In Python 3, registering and unregistering are handled, but there is no longer
a way to see what atexit handlers are
New submission from Chris Lambacher:
The use case for this is that when you are in a template and you want to use
the Enum instances in a conditional, then you need to pass the Enum class to
the template or start using someenumvariable.__class__.someenumvalue. Instead
it would be useful to be
Chris Lambacher added the comment:
You are not comparing the same thing. Normally when there is a class parameter,
those are available from instances of the class.
>>> class Test:
...pass
...
>>> Test.this = Test()
>>> Test.that = Test()
>>> Test.
Chris Lambacher added the comment:
For what it's worth, I was confused by the inability to access the class
members from the instance for like 3 or 4 weeks until I realized that the
instances were not actually on the class and the implications of that for class
attribute a
New submission from Chris Adams:
If you use detect_types=sqlite3.PARSE_DECLTYPES with sqlite3 and insert a
timezone-aware datetime instance, you will get a ValueError if you attempt to
read it back out:
File
"/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue17359>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Angelico:
IDLE tries to be helpful, but it errors on something that isn't yet an error.
Pasting in this code works fine:
>>> def a():
def b():
nonlocal q
q+=1
q=1
b()
return q
>>&g
Chris Cooper added the comment:
Here's a patch that focuses on the json module, with a smaller pickle section
including the warning from the pickle docs.
--
nosy: +ChrisCooper
Added file: http://bugs.python.org/file32513/issue18840
___
P
New submission from Chris Angelico:
In an interactive session, typing 'import this' a second time doesn't produce
output (as the module's already imported). Peeking into the module shows a
string and what looks like a translation dictionary, but doing the obvious
thing:
Changes by Chris Calloway :
Removed file: http://bugs.python.org/file30040/issue-15518-1.patch
___
Python tracker
<http://bugs.python.org/issue15518>
___
___
Python-bug
Chris Calloway added the comment:
The promised comments have been added to the patch. The refactoring of the
pre-existing tests is not part of this patch. But I'm uploading this now as the
patch does fix the issue.
--
Added file: http://bugs.python.org/file32960/issue-15518-1.
Changes by Chris Calloway :
Removed file: http://bugs.python.org/file29745/test_filecmp_layouts.rst
___
Python tracker
<http://bugs.python.org/issue15518>
___
___
Pytho
Chris Calloway added the comment:
Reformat the filecmpdata directory layouts diagram.
--
Added file: http://bugs.python.org/file32961/test_filecmp_layouts.rst
___
Python tracker
<http://bugs.python.org/issue15
Changes by Chris Calloway :
Removed file: http://bugs.python.org/file29746/test_filecmp_reports.rst
___
Python tracker
<http://bugs.python.org/issue15518>
___
___
Pytho
Chris Calloway added the comment:
Reformat the filecmp test report matrix.
--
Added file: http://bugs.python.org/file32962/test_filecmp_reports.rst
___
Python tracker
<http://bugs.python.org/issue15
Chris Calloway added the comment:
Formatted test directory layout.
--
Added file: http://bugs.python.org/file32963/layouts.html
___
Python tracker
<http://bugs.python.org/issue15
Chris Calloway added the comment:
Format the martix of test reports.
--
Added file: http://bugs.python.org/file32964/reports.html
___
Python tracker
<http://bugs.python.org/issue15
Chris Withers added the comment:
So, this appears to be the source of some degraded behaviour for me with Python
3.4 versus Python 3.3.
This code, prior to 3.4:
from testfixtures import Comparison as C
class AClass:
def __init__(self,x,y=None):
self.x = x
if y
New submission from Chris Withers:
This code, prior to 3.4:
from testfixtures import Comparison as C
class AClass:
def __init__(self,x,y=None):
self.x = x
if y:
self.y = y
def __repr__(self):
return '<'+self.__cla
Chris Withers added the comment:
Okay, opened [issue21820].
--
___
Python tracker
<http://bugs.python.org/issue18996>
___
___
Python-bugs-list mailing list
Unsub
Chris Withers added the comment:
Agreed, but even for strings, there really should be an API to control this...
--
___
Python tracker
<http://bugs.python.org/issue21
Chris Withers added the comment:
If I worked up a patch that:
- made sure this truncation wasn't used for non-strings
- added a class-attribute control for the truncation
Would it be well received?
--
___
Python tracker
<http://bugs.py
Chris Withers added the comment:
No, it would not be enough.
Please see the report above, the repr of non-strings may be large, but
it's often intended that way and all of the string should be displayed.
It really is a shame that no API was provided to control this behaviour.
I act
Chris Rebert added the comment:
Here's a draft patch against the default branch that updates the json module's
docs accordingly.
Note that under "Implementation Limitations", the statement "This module does
not impose any such limits beyond those of the relevant Pyt
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue10289>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rebert added the comment:
Thanks for the speedy review!
Those NaN-related arguments are already mentioned in the docs (see last 2
sentences of
https://docs.python.org/3/library/json.html#infinite-and-nan-number-values ),
and this patch doesn't touch that subse
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18355>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Bruner:
>From the documentation, I think that argparse should pass the entire
>nargs-long string to the "type=" callable. Instead, it only passes the first
>argument (of nargs), making it impossible within argparse's framework to check
>
New submission from Chris Bruner:
When reading options from a file, argparse should read all values from
each line. Instead, it complains of there not being enough options.
python file:
#!/usr/bin/env python
import argparse
p = argparse.ArgumentParser(description='Reproduce argparse
Chris Bruner added the comment:
Tried the format you gave. Still doesn't work. Same error message:
bernoulli:myclu cwbrune$ argparse_nargs_file_bug.py
usage: argparse_nargs_file_bug.py [-h] [-t N N N]
argparse_nargs_file_bug.py: error: argument -t/--triple: expected 3 argum
Chris Bruner added the comment:
Oops, my mistake: had multiple '-t' in file, but not an "action=append". Your
version works just fine.
Sorry for the confusion, and thank you for the correction!
--
___
Python tracker
<
Chris Bruner added the comment:
Yes, I know. My function just sees '1', but I think it should see '1 2 3' so
that it can figure out what to do. That's impossible (well, impossible without
saving state between calls) when it sees the arguments piecemeal.
Sent from my
Chris Rebert added the comment:
> 1) JSON just support floats
If you read the JSON standards documents, you'll see that this isn't accurate.
Regardless, a general solution for non-built-in numeric types does seem
preferable.
--
___
P
Chris Bruner added the comment:
Just had a chance to try this, and this does exactly what I wanted from
"type=". Thank you!
On Fri, Jul 25, 2014 at 4:17 PM, paul j3 wrote:
>
> paul j3 added the comment:
>
> What you want is a custom Action rather than a custom Type.
>
Chris Rebert added the comment:
So, when might I expect to see this patch merged, since it's now been approved?
--
___
Python tracker
<http://bugs.python.org/is
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue20779>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Angelico added the comment:
Patch applies nicely to current default, and works for me on amd64 Linux. I'm
liking how this is looking.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue22189>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue22276>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue21611>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rose added the comment:
What's the word on this change?
--
___
Python tracker
<http://bugs.python.org/issue20752>
___
___
Python-bugs-list mailing list
Changes by Chris Lasher :
--
nosy: +gotgenes
___
Python tracker
<http://bugs.python.org/issue9951>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Lasher added the comment:
int has int.from_bytes and int.to_bytes.
Currently, bytes has bytes.fromhex. Would the core developers please consider
naming the method "bytes.tohex" instead of "bytes.hex", so there's at least a
modicum of consistency in the method
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue22356>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue22393>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Colbert:
This is how the macro is defined in object.h:
2.7
/* Helper for passing objects to printf and the like */
#define PyObject_REPR(obj) PyString_AS_STRING(PyObject_Repr(obj))
3.4
/* Helper for passing objects to printf and the like */
#define PyObject_REPR(obj
Chris E added the comment:
Whilst in most cases this would be correct, in this case it looks like the
original contributor took a subset of what the original author wrote and put it
into the python libraries.
Until relatively recently the ElementTree.py file included a stanza that
attempted
Chris Adams added the comment:
I agree that making the code match the docs would be preferable – an unexpected
KeyError might be easier to track down that way but it'd still surprise most
developers.
re:pwd docs, the formatting in
https://hg.python.org/cpython/file/8e9df3414185/Doc/li
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue20059>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue20050>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue20078>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue20138>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Adams:
This is a more general version of #10496: os.path.expanduser is documented as
returning the unmodified string if it cannot be expanded
(http://docs.python.org/3/library/os.path.html#os.path.expanduser) but there's
one edge case where this can fail:
Chris Adams added the comment:
Other than hoisting the warnings import to the top (PEP-8) that seems entirely
reasonable to me. The user report which we got was confusing because it was
non-obvious where it came from - a warning or other pointer would have helped
the original reporter get an
New submission from Chris Angelico:
When tests are run from an Upstart job in a minimal environment,
test_posix.test_initgroups fails as it attempts to find the max() of an empty
list of supplementary groups.
Problem sighted with 2.7, 3.3, and 3.x branches. Patch derived from 3.x
(default
Chris Morgan added the comment:
Testing passed on OSX Mavericks.
--
nosy: +drpotato
___
Python tracker
<http://bugs.python.org/issue19974>
___
___
Python-bug
2201 - 2300 of 2758 matches
Mail list logo