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:
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 a dialogue
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 creating a new
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:
raise
Chris Jerdonek added the comment:
Should be: module = support.import_module('module')
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16935
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 text of any of the
sections -- only
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.python.org
Chris Jerdonek added the comment:
Great, thank you! :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16928
___
___
Python-bugs-list mailing
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 recommends
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 rep...@bugs.python.org
http://bugs.python.org/issue13963
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 rep...@bugs.python.org
http://bugs.python.org/issue16933
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
stage: - needs patch
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16933
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.patch
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 rep...@bugs.python.org
http://bugs.python.org/issue16930
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 tracker rep
Chris Jerdonek added the comment:
Issue 16933 improved the choices examples.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11176
___
___
Python
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: strictly speaking
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.
--
___
Python tracker rep
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 options
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 rep...@bugs.python.org
http://bugs.python.org/issue16926
Chris Jerdonek added the comment:
I will take care of this (formatting issue).
--
assignee: eric.araujo - chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16874
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
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16851
___
___
Python
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 could use
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 rep...@bugs.python.org
http://bugs.python.org/issue16874
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16874
New submission from Chris Jerdonek:
Some spurious e-mails are sent to python-checkins, e.g.
Subject: [Python-checkins] Cron docs at dinsdale /home/docs/build-devguide
From: Cron Daemon root at python.org
To: d...@dinsdale.python.org
/home/docs/devguide/documenting.rst:766: WARNING: term
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python
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 rep...@bugs.python.org
http://bugs.python.org/issue16406
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 file: http://bugs.python.org
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
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
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(unittest.TestCase):
def setUp
Chris Jerdonek added the comment:
Thanks!
--
___
Python tracker rep...@bugs.python.org
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 rep
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 up
ok
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 location
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-protocol
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
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,
even if non
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 sections that fit
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
hgrepos: +168
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
hgrepos: -168
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
hgrepos: +169
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list
Chris Jerdonek added the comment:
Sorry, my apologies for the mess-ups!
--
hgrepos: +170
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
hgrepos: -169
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list
Chris Jerdonek added the comment:
Okay, it looks like you can't do it. It failed with a repository is
unrelated error.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
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'
However, I can't
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 rep...@bugs.python.org
http://bugs.python.org/issue16884
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 chris.jerdo...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16854
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)
--
nosy: +chris.jerdonek
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 rep...@bugs.python.org
http://bugs.python.org/issue16799
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 rep...@bugs.python.org
http://bugs.python.org/issue16748
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,
specifies what value
Chris Jerdonek added the comment:
Sure, I'd be happy to do that. I'll prepare the patch for the other issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16799
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-16854-1.diff
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 positional arguments
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.
(from http
Chris Jerdonek added the comment:
I would also take out the sentence about forgetting about the issue, because
that's just one of several possible reasons and I don't think usually the main
reason.
--
nosy: +chris.jerdonek
___
Python tracker rep
Chris Jerdonek added the comment:
Here is another recent comment from Georg on this topic:
And please don't commit cosmetic/cleanup changes to bugfix branches in the
future.
(from http://bugs.python.org/issue16793#msg178372 )
--
nosy: +chris.jerdonek
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.
--
assignee: eric.araujo
Chris Jerdonek added the comment:
Thanks. Andrew, could you also take a quick look at this?
--
title: switch regrtest from getopt options to argparse Namespace - start using
argparse.Namespace in regrtest
___
Python tracker rep...@bugs.python.org
Chris Jerdonek added the comment:
Content-wise the patch looks pretty good. I agree with the recommendations. A
couple suggestions though: I would break up the 20 lines of command-line
commands. Right now that chunk is a bit too long to grasp meaningfully. My
suggestion would be to break
Chris Jerdonek added the comment:
I observed this issue earlier in issue 16799. See that issue for a fix. Can
one of you review that patch? Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16854
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
dependencies: +switch regrtest from getopt options to argparse Namespace
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16854
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
assignee: - chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16854
Chris Jerdonek added the comment:
One thing that occurred to me is that it is often or usually not sufficient to
go from 2.7 to 3.2 and on forward because applying a patch made against the
default branch loses information if first applied to an earlier branch. The
given workflow assumes
Chris Jerdonek added the comment:
Changed lines should still be reflowed to respect the column limit. I was just
referring to the unchanged lines before and afterwards that shouldn't be
reflowed.
Not reflowing makes it easier for people viewing diffs on python-checkins and
hg.python.org
Chris Jerdonek added the comment:
Was argparse ever supposed to support inputs of the form given in the example
(i.e. different positional arguments straddling optional arguments): 'yy -x zz'?
The usage string shows up as: usage: test.py [-h] [-x] y [z [z ...]] The
original example seems
Chris Jerdonek added the comment:
Thanks for the patch.
Out of curiosity, does anyone know if the following works on all or most
systems?
$ open _build/html/index.html
That could also be added to save time for people that don't already know.
--
nosy: +chris.jerdonek
resolution
Chris Jerdonek added the comment:
Thanks. Btw, it works for me on Mac OS X I believe out of the box:
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL
Chris Jerdonek added the comment:
Another option is to give the shorter option as an alternative. I for one
didn't know about that option but would have liked to. Patch attached.
Also, this way we can give the shorter option and the reader can still see
pretty easily what
Chris Jerdonek added the comment:
Another option is to give the shorter option as an alternative.
s/shorter option/one-liner/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16814
Chris Jerdonek added the comment:
I actually think this issue can be closed as fixed: the current code looks
fine to me, and I don't think the fix should be backported.
How about backporting the tests? In addition to adding tests for the fix, Greg
added more comprehensive tests
Chris Jerdonek added the comment:
Another task: backport the tests for current behavior added under issue 16772
(e.g. test_int_base_limits() tests).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16784
Chris Jerdonek added the comment:
Improvement of int/long tests should also be reflected in the Tests section of
Misc/NEWS. An entry wasn't added in issue 16045. For linking purposes, this
issue number would probably be the best to use for such an entry
Chris Jerdonek added the comment:
Here is a patch to start using a Namespace object.
I also noticed that the usage() function I removed in 6e2e5adc0400 is still
used elsewhere in regrtest.main(), so this patch also fixes that.
--
keywords: +patch
Added file: http://bugs.python.org
Chris Jerdonek added the comment:
Updating patch after Benjamin's review.
In this new patch, in test_regrtest I now use the current, actual getopt code
to test and demonstrate backwards compatibility. Note that when I pasted the
code, I also fixed the three typos in the current getopt code
Chris Jerdonek added the comment:
The attached patch will fix this issue as well as issue 15325 and issue 15326.
Also, I'm removing issue 15302 as a superseder because that issue is limited to
3.4. The attached patch is for prior versions. (Also, it doesn't hurt to
apply this to 3.4
Chris Jerdonek added the comment:
Rietveld is erroring out on me again whenever I try to reply to a comment, so
I'm posting my comment here.
On 2012/12/27 18:29:22, Benjamin Peterson wrote:
On 2012/12/27 04:44:33, Benjamin Peterson wrote:
if val:
Again, we need this to match getopt
Chris Jerdonek added the comment:
Thanks for the reviews, Serhiy.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16790
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16793
___
___
Python
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16792
___
___
Python
Chris Jerdonek added the comment:
LGTM.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16793
___
___
Python-bugs-list mailing list
Unsubscribe
Chris Jerdonek added the comment:
When this patch is updated because of the commit for issue 16790, in 3.x can
the edited test cases be moved to the top of the test class per the following
comment (as appropriate)?
http://bugs.python.org/issue16790#msg178282
As stated there, this will make
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
title: --match does not work for regrtest - --fromfile, --match, and
--randomize don't work in regrtest
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15324
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
resolution: - duplicate
stage: patch review - committed/rejected
status: open - closed
superseder: Use argparse instead of getopt in test.regrtest - --fromfile,
--match, and --randomize don't work in regrtest
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
resolution: - duplicate
stage: patch review - committed/rejected
status: open - closed
superseder: Use argparse instead of getopt in test.regrtest - --fromfile,
--match, and --randomize don't work in regrtest
versions: +Python 2.7
Chris Jerdonek added the comment:
I agree with Serhiy here. This use case seems too specialized, and there are
easy ways to achieve the same thing in code.
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Chris Jerdonek added the comment:
You can use assertIs() in 2.7 as well, no?
+@test_support.cpython_only
+def test_small_ints(self):
+self.assertTrue(int('10') is 10)
--
___
Python tracker rep...@bugs.python.org
http
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
type: enhancement - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15324
Chris Jerdonek added the comment:
Thanks again for your reviews, Benjamin (and others).
I created issue 16799 for the next phase of this process: changing
regrtest.main() from operating on getopt-style parsed options to an argparse
Namespace object.
--
resolution: - fixed
stage
New submission from Chris Jerdonek:
Issue 15302 switched regrtest from getopt to argparse for parsing options.
However, regrtest.main() still expects and operates on getopt-style options.
This issue is to continue the regrtest refactoring and replace the use of
getopt-style options
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
title: switch regrtest from getopt-style options to argparse Namespace object
- switch regrtest from getopt options to argparse Namespace
___
Python tracker rep...@bugs.python.org
http
401 - 500 of 1573 matches
Mail list logo