New submission from Chris Jerdonek:
The following page:
http://docs.python.org/dev/distutils/uploading.html
says, "Other upload options include --repository= or --repository= where url..."
I haven't looked into what the correct wording is meant to be.
--
assign
New submission from Chris Jerdonek:
In argparse, positional arguments with nargs='*' default to [] rather None,
even if default=None is passed explicitly. The documentation says otherwise:
"The default keyword argument of add_argument(), whose value defaults to None,
speci
Chris Jerdonek added the comment:
Sure, I'd be happy to do that. I'll prepare the patch for the other issue.
--
___
Python tracker
<http://bugs.python.o
Chris Jerdonek added the comment:
I'm submitting a patch for this independent of issue 16799 on Serhiy's request.
--
dependencies: -start using argparse.Namespace in regrtest
keywords: +patch
Added file: http://bugs.python.org/file28598/issue-16
Chris Jerdonek added the comment:
I agree it would be very likely to break working code. Can you elaborate on
your point about 'append' though? I'm not sure I see it.
Aside from consistency, I'm wondering if there is ever a case where it would
help to return None for
Chris Jerdonek added the comment:
I was referring to the fact that optionals have an additional case that
positionals don't have: "Note that for optional arguments, there is an
additional case -- the option string is present but not followed by a
command-line argument.&qu
New submission from Chris Jerdonek:
Starting in 3.2, the logging module no longer outputs the following message
when logging and no handlers are configured for the root logger:
log = logging.getLogger()
log.error('test')
'No handlers could be found for logger "root
Chris Jerdonek added the comment:
Thanks a lot, Vinay. By the way, I noticed that the "PLEASE NOTE" reformatting
can also be applied to 2.7.
--
___
Python tracker
<http://bugs.python.o
Chris Jerdonek added the comment:
Attached is a doc patch. I also improved some other aspects of the *default*
section while I was there.
We should probably make sure a test exists for the newly-documented behavior
(i.e. for passing no arguments for a positional argument with nargs='*
Changes by Chris Jerdonek :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Chris Jerdonek:
In certain situations (e.g. when logging while using unittest), log messages
can start in the middle of a line, for example:
log: [INFO] foo
..
It was trickier than I thought it needed
Chris Jerdonek added the comment:
> >>> import test.test_xxx as t; t.test_main()
As long as the module has "import unittest", you could also do the following,
which has just 5 more characters :)
>>> import test.test_xxx as t; t.unittest.main(t)
-
Chris Jerdonek added the comment:
FYI, the fix for issue 16854 committed most of this patch, so the patch should
be updated before reviewing.
--
___
Python tracker
<http://bugs.python.org/issue16
Chris Jerdonek added the comment:
One more. Since unittest imports strings, you can also do:
>>> import unittest as u; u.main("test.test_xxx")
--
___
Python tracker
<http://bugs
Chris Jerdonek added the comment:
This can happen with any standard logging configuration when there are writes
to sys.stderr that don't end with "\n". I'm using Mac OS X 10.7. A minimal
script:
import logging, unittest
log = logging.getLogger()
class Test(unittes
Chris Jerdonek added the comment:
Thanks!
--
___
Python tracker
<http://bugs.python.org/issue16884>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Ezio, the use case is to add to the existing test output additional diagnostic
logging. In particular, you might want to run tests even with verbosity=2 in
addition to the log messages.
--
___
Python tracker
Chris Jerdonek added the comment:
Yes, it's primarily for easier scanning/reading as well as aesthetic. With -v
I get the following output though:
test1 (test_logging.Test) ... INFO:root:setting up
ok
test2 (test_logging.Test) ... INFO:root:setting
Chris Jerdonek added the comment:
> and perhaps something could be added to test.support.
Also, just to clarify, I had in mind outside projects and the larger community
for this request rather than CPython development, so I'm not sure test.support
would be the right
Chris Jerdonek added the comment:
> Also, it may be possible to add unittest discovery hooks to the stubs that
> *are* in Lib/test.
The load_tests protocol (2.7, 3.2+) seems like the right approach for this:
http://docs.python.org/dev/library/unittest.html#load-tests-pr
Chris Jerdonek added the comment:
For the record, we do have tutorial-like documentation and document more than
one way to do things in multiple places throughout the devguide. For example:
http://docs.python.org/devguide/faq.html#how-do-i-list-the-files-in-conflict-after-a-merge
Unlike the
Chris Jerdonek added the comment:
Since this patch is on the longer side, would it be possible to use the "Remote
hg repo" feature so Rietveld will work? I assume this is possible for devguide
patches.
Regarding the FAQ, it seems preferable to me to keep all questions in the FAQ
Chris Jerdonek added the comment:
> I'm not sure the remote hg repo supports non-cpython repos.
Can you try? I would be surprised if it didn't.
> What I was doing was converting the current prose in smaller FAQ-like sections
Okay, then it sounds like they're more like s
Changes by Chris Jerdonek :
--
hgrepos: +168
___
Python tracker
<http://bugs.python.org/issue14468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Jerdonek :
--
hgrepos: -168
___
Python tracker
<http://bugs.python.org/issue14468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Jerdonek :
--
hgrepos: +169
___
Python tracker
<http://bugs.python.org/issue14468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Sorry, my apologies for the mess-ups!
--
hgrepos: +170
___
Python tracker
<http://bugs.python.org/issue14468>
___
___
Python-bug
Changes by Chris Jerdonek :
--
hgrepos: -169
___
Python tracker
<http://bugs.python.org/issue14468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Okay, it looks like you can't do it. It failed with a "repository is
unrelated" error.
--
___
Python tracker
<http://bugs.pyt
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue16903>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Attached is a proposed patch.
--
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file28663/issue-16406-1.patch
___
Python tracker
<http://bugs.python.org/issu
Chris Jerdonek added the comment:
It turns out that there is already a test case:
http://hg.python.org/cpython/file/05183ce544be/Lib/test/test_argparse.py#l799
(at the line "('', NS(foo=[])),")
I've updated the patch with a note to reflect this.
--
Added fil
Chris Jerdonek added the comment:
+1 to the feature.
A closely-related use case is customizing the message displayed by error(),
which is normally the usage string followed by the error message. I wanted to
append instructions on how to invoke --help, and implemented it this way for
Chris Jerdonek added the comment:
Updating patch with use of the :orphan: directive (so that the old page can be
excluded from the table of contents/toctree without issuing a Sphinx warning).
--
Added file: http://bugs.python.org/file28665/issue-16406-2.patch
New submission from Chris Jerdonek:
$ python setup.py --dry-run register --repository
http://testpypi.python.org/pypi
...
Registering Foo to http://pypi.python.org/pypi
Server response (200): OK
This is with a .pypirc file with a [server-login] section.
It seems like this can cause unintended
Chris Jerdonek added the comment:
I did before and double-checked again. I searched for "setup repository" and
"register repository," for example. Issue 16926 seemed the most similar, but
appears to be different.
--
___
P
Chris Jerdonek added the comment:
This is in part because register.run() calls self._set_config() after calling
self.finalize_options():
http://hg.python.org/cpython/file/680a855ec91e/Lib/distutils/command/register.py#l43
And _set_config() doesn't seem to look at already-finalized op
Chris Jerdonek added the comment:
> Issue 16926 seemed the most similar, but appears to be different.
I meant issue 13615. It is different but is also about --repository.
--
___
Python tracker
<http://bugs.python.org/issu
Chris Jerdonek added the comment:
I will take care of this (formatting issue).
--
assignee: eric.araujo -> chris.jerdonek
___
Python tracker
<http://bugs.python.org/issu
Chris Jerdonek added the comment:
I asked on the Mercurial tracker about suppressing git-style diffs when git is
configured on, and there is a work-around:
http://bz.selenic.com/show_bug.cgi?id=3761
We could mention this in the devguide somewhere (e.g. in a FAQ about how to use
Rietveld with
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue16851>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
There are lots of modules to change here. I wonder if some or most of this
couldn't be automated.
For example, is there any reason we couldn't write a script to check for the
type of test duplication fixed documentation-wise in issue 16835? We
Chris Jerdonek added the comment:
The attached patch applies to all branches.
--
Added file: http://bugs.python.org/file28684/issue-16874-1-27.patch
___
Python tracker
<http://bugs.python.org/issue16
Changes by Chris Jerdonek :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Chris Jerdonek:
Some spurious e-mails are sent to python-checkins, e.g.
Subject: [Python-checkins] Cron /home/docs/build-devguide
From: Cron Daemon root at python.org
To: d...@dinsdale.python.org
/home/docs/devguide/documenting.rst:766: WARNING: term not in glossary
Chris Jerdonek added the comment:
I went ahead and committed this if that's okay. I wasn't sensing any strong
objection but -0 from some and +1 or +0 from others. To compensate for the
extra six words, I went ahead and first made the current language more concise
here:
http://hg.
Chris Jerdonek added the comment:
Great, thank you! :)
--
___
Python tracker
<http://bugs.python.org/issue16928>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Jerdonek:
In various places, the devguide recommends `hg graft`, but it appears it might
not be possible to use on some systems or in certain situations. For example,
when I tried grafting a trivial change from 2.7 to 3.2 on Mac OS X, I got the
following fatal error
New submission from Chris Jerdonek:
This issue is to mention in the devguide how to create diffs with the changeset
number when --git is configured on. Perhaps this can be done via a FAQ like:
"How can I get Rietveld to work with a 2.7 patch?"
Background: Currently, the devguide
Chris Jerdonek added the comment:
I created issue 16931 to document a way to use Rietveld for 2.7 patches, while
still keeping the Mercurial configuration we advise.
--
___
Python tracker
<http://bugs.python.org/issue13
Chris Jerdonek added the comment:
As suggested in the previous comment, here is simple code to find candidates
for test duplication (TestCase subclasses subclassing other TestCase classes):
def find_dupes(mod):
objects = [getattr(mod, name) for name in sorted(dir(mod))]
classes = [obj
Chris Jerdonek added the comment:
+1. By the way, I included a couple fixes similar to these in a patch posted
to issue 16878.
--
nosy: +bethard, chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue16
Changes by Chris Jerdonek :
--
stage: -> needs patch
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4
___
Python tracker
<http://bugs.python.org/issu
Chris Jerdonek added the comment:
Patch attached.
--
assignee: -> docs@python
components: +Documentation
keywords: +easy, patch
nosy: +docs@python
stage: needs patch -> patch review
Added file: http://bugs.python.org/file28698/issue-16933-1
Chris Jerdonek added the comment:
To clarify my original comment, I got an error about
ConfigParser.py/configparser.py even when that file was not part of the change.
--
___
Python tracker
<http://bugs.python.org/issue16
Chris Jerdonek added the comment:
Thanks for reporting the suggestion, Thomas. And thanks for looking over the
patch, Terry.
--
resolution: -> fixed
stage: commit review -> committed/rejected
status: open -> closed
___
Python track
Chris Jerdonek added the comment:
Issue 16933 improved the "choices" examples.
--
___
Python tracker
<http://bugs.python.org/issue11176>
___
___
Python-b
Chris Jerdonek added the comment:
I admit that I'm used to the alphabetical listing, but I like the idea for this
organization. In fact, it's similar to how the Built-in Types page is
organized: grouped by similarity rather than listed alphabetically.
Also just a note: strictl
Chris Jerdonek added the comment:
Updated the last patch by moving the "PyPI package display" to beneath the
"Registering Packages" section (since only the register command affects the
package display).
Éric, does this look okay to you? I didn't change the tex
Chris Jerdonek added the comment:
I just talked to Ezio on IRC about this. I think it will be a lot easier to
review and see what's going on with these changes if they are put forth in
smaller, bite-sized pieces and committed incrementally. It's harder to
understand and have
Chris Jerdonek added the comment:
I think it could cause confusion to have FAQs spread across two different files
because then we'll have to distinguish between two FAQs in our hyperlinks, and
it won't be obvious which FAQ page contains which questions.
I would recommend crea
Chris Jerdonek added the comment:
Without the proposed enhancement, you could also combine Éric's approach with
the original patch by doing something like:
try:
support.import_module(module)
except SkipTest:
module = None
def setUpModule():
if module is None:
Chris Jerdonek added the comment:
Should be: "module = support.import_module('module')"
--
___
Python tracker
<http://bugs.python.org/issue16935>
___
_
Chris Jerdonek added the comment:
> Also, I'm of the opinion that we'll end up with a higher quality result doing
> things by hand anyway.
Automation doesn't (and shouldn't) preclude careful review and modifications by
hand. My point was that it seems like it mig
Chris Jerdonek added the comment:
Okay, well the title of this issue is "Make CPython test package discoverable,"
so as part of that we should be confirming that test discovery finds the same
tests that test_main() runs (and if not, to understand why and/or make them
Chris Jerdonek added the comment:
If you want to get the same cleanup logic working with unittest discovery, you
could try using the load_tests protocol, and wrapping the functions that
actually run the tests there (which may simply mean wrapping the tests passed
to load_tests, which I
Chris Jerdonek added the comment:
By the way, I think this process of using unittest (i.e. dog-fooding) is a good
exercise in part because it helps us understand better where unittest could use
improvement (e.g. the SkipTest during import issue, and the decorator issue
raised here
Chris Jerdonek added the comment:
Adding a failing test. I will supply a patch shortly.
--
keywords: +patch
stage: -> needs patch
Added file: http://bugs.python.org/file28731/issue-16468-1.patch
___
Python tracker
<http://bugs.pyth
Chris Jerdonek added the comment:
Attaching patch. With this patch, passing a non-iterable choices argument to
parser.add_argument() raises (for example):
Traceback (most recent call last):
...
File ".../Lib/argparse.py", line 558, in _metavar_formatter
choice_strs = [str(c
Chris Jerdonek added the comment:
Slight doc tweak: s/container/sequence/.
--
Added file: http://bugs.python.org/file28735/issue-16468-3.patch
___
Python tracker
<http://bugs.python.org/issue16
New submission from Chris Jerdonek:
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo', nargs='a')
...
File ".../Lib/argparse.py", line 1333, in add_argument
raise ValueError("length of metavar tuple does not match
Chris Jerdonek added the comment:
Sounds fine. Does that mean a test should still be added for the message? I
was never clear on this because on the one hand we want to be sure we use the
right message (and that we're actually fixing the issue), but on the other hand
we don'
Chris Jerdonek added the comment:
I guess another option would be to mark the test CPython-only.
--
___
Python tracker
<http://bugs.python.org/issue16468>
___
___
Chris Jerdonek added the comment:
I don't disagree that this feature could be useful. I'm just not sure it
should go into a maintenance release. It feels like an enhancement to me
because to use this feature, the user will have to use the API in a way they
haven't befo
Chris Jerdonek added the comment:
Note that we would also have to deal with not just the error text but also the
usage string. From the docs:
>>> parser.parse_args('11'.split())
usage: PROG [-h] {5,6,7,8,9}
PROG: error: argument foo: invalid choice: 11 (choose
New submission from Chris Jerdonek:
When passing a string for the choices argument, argparse's usage and error
messages differ from its behavior:
>>> p = argparse.ArgumentParser()
>>> p.add_argument('a', choices='abc')
>>> p.parse_args([
Chris Jerdonek added the comment:
I forgot to mention that argparse uses such cases as examples in its
documentation (one of which was replaced in bddbaaf332d7).
--
___
Python tracker
<http://bugs.python.org/issue16
Chris Jerdonek added the comment:
> argparse does not require that choices be iterable, as it *does* use 'in', as
> it should. Line 2274:
>if action.choices is not None and value not in action.choices:
There are cases where it's incorrect for argparse to bein
Chris Jerdonek added the comment:
This wasn't just in the documentation. It was the *first* example of how to
use the choices argument out of the two examples in that section (from the time
Python first adopted argparse and before):
16.4.3.7. choices
Some command-line arguments s
Chris Jerdonek added the comment:
Thanks for the patch. I will take a look. And good observation re: PARSER.
Can you open a separate documentation issue for that where it can be discussed?
--
___
Python tracker
<http://bugs.python.org/issue16
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue16988>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Jerdonek:
This issue is to allow distutils's debug mode [1] to be enabled more easily
(e.g. programmatically).
Currently, for example, distutils.core does the following:
from distutils.debug import DEBUG
(from http://hg.python.org/cpython/file/cb297930d2c
Chris Jerdonek added the comment:
I have a new suggestion that I hope will satisfy Terry.
After looking at the code more, I noticed that add_argument() does currently
work for non-iterable choices provided that metavar is passed. This was also
noted in the report for the duplicate issue
Chris Jerdonek added the comment:
Actually, let me relax (1). We can just use what the argparse code calls the
"default_metavar" in that case (which it constructs from the argument name).
The important thing for me is not displaying the str/repr when it might not be
Chris Jerdonek added the comment:
I added some Rietveld comments.
--
___
Python tracker
<http://bugs.python.org/issue16970>
___
___
Python-bugs-list mailin
Chris Jerdonek added the comment:
This was fixed a year and a half ago by issue 12351. For example, see:
http://docs.python.org/3/library/crypto.html
--
nosy: +chris.jerdonek
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
superseder: ->
Chris Jerdonek added the comment:
There are also test cases with a string being passed for choices.
--
___
Python tracker
<http://bugs.python.org/issue16
Chris Jerdonek added the comment:
Here is a patch for discussion that allows non-iterable choices with or without
metavar. It refactors as suggested. However, the patch does not yet have
tests.
> Does the test suite already have a testcase already for non-iterable choices
> + metava
Chris Jerdonek added the comment:
See issue 16468 for why that won't work in general.
--
___
Python tracker
<http://bugs.python.org/issue16977>
___
___
Pytho
Chris Jerdonek added the comment:
When choices isn't iterable but supports the "in" operator, e.g.
class MyChoices(object):
def __contains__(self, item):
return True
--
___
Python tracker
<http://bugs.pyt
Chris Jerdonek added the comment:
Nice/elegant idea. A couple comments:
(1) What will be the semantics of TestCase/subtest failures? Currently, it
looks like each subtest failure registers as an additional failure, meaning
that the number of test failures can exceed the number of test cases
Chris Jerdonek added the comment:
Either way, something isn't right about how it's integrated now. With
the patch, this:
@unittest.expectedFailure
def test(self):
with self.subTest():
self.assertEqual(0, 1)
gives: FAILED (failures=1, unexpected success
New submission from Chris Jerdonek:
Here are some suggestions of things to clarify in the logging documentation
after consulting it as an end-user:
1. Clarify in Logger.filter(), Handler.filter(), and probably also in the
Filter section that the case of more than filter behaves as follows
Chris Jerdonek added the comment:
Great, that looks a lot better. Thanks!
A couple comments though:
+ .. note:: If you attach a handler to several loggers, it may emit the same
+ record multiple times. In general, you should not need to attach a
+ handler to more than one logger
Chris Jerdonek added the comment:
>> It might be better if the revision link was separate from the
>> description text.
> I did the opposite -- I left the revision link there and created a separated
> link to the issue at the end of the description.
Some downsides of the sel
Chris Jerdonek added the comment:
I looked into this a bit. It seems like this is because with the patch, the
call to "loader.loadTestsFromModule(the_module)" inside regrtest comes before
the try-finally:
http://hg.python.org/cpython/file/fcdb35b114ab/Lib/test/regrtest.py#l1277
wh
Chris Jerdonek added the comment:
I confirmed the above by changing regrtest as follows in the patch (moving the
decorator from load_tests()), and trying both placements of the
loadTestsFromModule() line. One gives the warning and one does not:
if test_runner is None:
loader
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue9253>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Okay, I think I understand the issue better now. The threading._dangling
warning happens because when leaving the saved_test_environment context manager
in regrtest:
http://hg.python.org/cpython/file/fcdb35b114ab/Lib/test/regrtest.py#l1271
the context
Chris Jerdonek added the comment:
> the choice part of the error message (passed to ArgumentError) will just be
> 'invalid choice: '.
That's right. With the patch it looks like this:
>>> p = argparse.ArgumentParser(prog='test.py')
>>> p.
2101 - 2200 of 2758 matches
Mail list logo