[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-14 Thread Chris Jerdonek

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 believe are callables).

--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16968
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-14 Thread Chris Jerdonek

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).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16968
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-13 Thread Chris Jerdonek

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 about a large set of changes all at once.

I gave him some suggestions for first commits in this direction and offered to 
help more with breaking things up into smaller pieces if he needs it.  I also 
have an interest in simplifying our presentation/organization and in adding 
more information about using Mercurial more effectively (e.g. issue 16930 and 
issue 16931).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-13 Thread Chris Jerdonek

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 section in our existing FAQ called something 
like Using Mercurial with CPython, optionally subdividing that into a 
committer section and an everyone section.  The original section can be 
morphed into a section answering generic questions about Mercurial (not 
necessarily specific to CPython or the patch workflow).

If a question is important enough to be on the same page as the rest of 
committing.rst, it can be added as a normal section of that page (what is the 
need to give all of those sections FAQ-style titles?).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-13 Thread Chris Jerdonek

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 SkipTest()

--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16935
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Should be: module = support.import_module('module')

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16935
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16406] move the Uploading Packages section to distutils/packageindex.rst

2013-01-12 Thread Chris Jerdonek

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 moved them (and added introductory page text and index 
entries).

--
Added file: http://bugs.python.org/file28710/issue-16406-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16406
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16814] use --directory option of make in describing how to build the docs

2013-01-11 Thread Chris Jerdonek

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/devguide/rev/157066a204ab

If anyone feels strongly, I would be happy to revert the change though.

--
resolution:  - fixed
stage:  - committed/rejected

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16814
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16928] spurious Cron Daemon e-mails to d...@dinsdale.python.org

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Great, thank you! :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16928
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16930] mention limitations and/or alternatives to hg graft

2013-01-11 Thread Chris Jerdonek

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:

$ hg graft 2.7
grafting revision 81391
abort: case-folding collision between Lib/ConfigParser.py and 
Lib/configparser.py

Here is some related information: 
http://mercurial.selenic.com/wiki/FixingCaseCollisions

At the least, we might want to add a note saying that `hg graft` may not work 
on certain systems (and name those systems).

--
components: Devguide
messages: 179650
nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan
priority: normal
severity: normal
status: open
title: mention limitations and/or alternatives to hg graft

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16930
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16931] mention work-around to create diffs in default/non-git mode

2013-01-11 Thread Chris Jerdonek

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 configuring Mercurial to use 
--git when making diffs.  However, this causes the changeset ID to be left off 
of patch files and, for example, prevents Rietveld from working with patches to 
non-default branches.  See also this thread:

http://mail.python.org/pipermail/python-dev/2011-March/108765.html

This issue describes a couple work-arounds:

http://bz.selenic.com/show_bug.cgi?id=3761

--
components: Devguide
messages: 179654
nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan
priority: normal
severity: normal
status: open
title: mention work-around to create diffs in default/non-git mode

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16931
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13963] dev guide has no mention of mechanics of patch review

2013-01-11 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16748] Make CPython test package discoverable

2013-01-11 Thread Chris Jerdonek

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 for obj in objects if isinstance(obj, type) and
   issubclass(obj, unittest.TestCase)]
for c in classes:
for d in classes:
if c is not d and issubclass(d, c):
print(%s: %s  %s % (mod.__name__, c.__name__, d.__name__))

Out of curiosity, I ran a modified form of this against all test modules to 
find which ones fit this pattern and *already* rely on unittest discovery (i.e. 
don't have test_main()).  We might want to adjust these as well.  There were 
four: test_asyncore, test_configparser, test_heapq, test_ipaddress

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Chris Jerdonek

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16933
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16930] mention limitations and/or alternatives to hg graft

2013-01-11 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Chris Jerdonek

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...@bugs.python.org
http://bugs.python.org/issue16933
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11176] give more meaningful argument names in argparse documentation

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Issue 16933 improved the choices examples.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11176
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16927] Separate built-in types from functions and group similar functions in functions.rst

2013-01-11 Thread Chris Jerdonek

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 there are built-in types not in the 
built-in types section (e.g. staticmethod and classmethod), but I think that's 
okay.  (There can be a disclaimer to this effect in the intro sentences of the 
first grouping.)

Lastly, it might also be worth grouping the built-in types into subgroups 
(similar to how they're done for Built-in Types).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16926] setup.py register does not always respect --repository

2013-01-10 Thread Chris Jerdonek

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 registrations on PyPI, etc.  It also 
makes it unclear how to get the URL that setup() will use prior to the real 
invocation (e.g. if you would like to prompt the user with the URL they will be 
pushing to).

--
assignee: eric.araujo
components: Distutils, Library (Lib)
messages: 179624
nosy: chris.jerdonek, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: setup.py register does not always respect --repository
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16926] setup.py register does not always respect --repository

2013-01-10 Thread Chris Jerdonek

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...@bugs.python.org
http://bugs.python.org/issue16926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16926] setup.py register does not always respect --repository

2013-01-10 Thread Chris Jerdonek

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16926] setup.py register does not always respect --repository

2013-01-10 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16874] setup.py upload option repeated in docs

2013-01-10 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13963] dev guide has no mention of mechanics of patch review

2013-01-10 Thread Chris Jerdonek

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 patches to non-default branches).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13963
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16851] Hint about correct ismethod and isfunction usage

2013-01-10 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16851
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16748] Make CPython test package discoverable

2013-01-10 Thread Chris Jerdonek

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 
such a script to find the classes that need to be updated when removing 
test_main (or to double-check existing test modules).

I don't know if there are ever times we want such duplication.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16874] setup.py upload option repeated in docs

2013-01-10 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16874] setup.py upload option repeated in docs

2013-01-10 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16928] spurious Cron Daemon e-mails to d...@dinsdale.python.org

2013-01-10 Thread Chris Jerdonek

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 not in glossary: bytecode

(from http://mail.python.org/pipermail/python-checkins/2013-January/118934.html 
)

The e-mail is spurious in part because bytecode links correctly on the actual 
online version.

--
assignee: docs@python
components: Devguide, Documentation
messages: 179643
nosy: chris.jerdonek, docs@python, eric.araujo, ezio.melotti, georg.brandl
priority: normal
severity: normal
status: open
title: spurious Cron Daemon e-mails to d...@dinsdale.python.org

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16928
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-09 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16406] move the Uploading Packages section to distutils/packageindex.rst

2013-01-09 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-09 Thread Chris Jerdonek

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/file28664/issue-16878-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16878
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11695] Improve argparse usage/help customization

2013-01-09 Thread Chris Jerdonek

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 
CPython's regrtest:

http://hg.python.org/cpython/file/6ee721029fd5/Lib/test/regrtest.py#l205

Also take a look at how regrtest formats its usage string as another use case 
to satisfy:

http://hg.python.org/cpython/file/6ee721029fd5/Lib/test/regrtest.py#l9

It seems like many argparse customizations take the form of override this 
method.  Would it make sense for the API to be for customizers to override 
string-returning methods like make_usage() and make_error() (and that accept a 
dictionary)?  That may give a bit more control than a format string.

--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11695
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16406] move the Uploading Packages section to distutils/packageindex.rst

2013-01-09 Thread Chris Jerdonek

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16406
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16889] facilitate log output starting at beginning of line

2013-01-08 Thread Chris Jerdonek

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(self):
log.info(setting up)
def test1(self):
pass
def test2(self):
pass

logging.basicConfig(level=logging.INFO)
unittest.main()

Output:

INFO:root:setting up
.INFO:root:setting up
.
--
Ran 2 tests in 0.001s

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16889
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16884] logging handler automatically added starting in 3.2+

2013-01-08 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16884
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16889] facilitate log output starting at beginning of line

2013-01-08 Thread Chris Jerdonek

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...@bugs.python.org
http://bugs.python.org/issue16889
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16889] facilitate log output starting at beginning of line

2013-01-08 Thread Chris Jerdonek

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

--
Ran 2 tests in 0.000s

At least it's good to know that I wasn't missing anything obvious.  And yes, I 
did read about TestHandler/Matcher (for making assertions about logging) from 
the following informative thread a couple years ago (which I came across when 
filing issue 16884):

http://mail.python.org/pipermail/python-dev/2010-December/106526.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16889
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16889] facilitate log output starting at beginning of line

2013-01-08 Thread Chris Jerdonek

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16889
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16748] Make CPython test package discoverable

2013-01-08 Thread Chris Jerdonek

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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16814] use --directory option of make in describing how to build the docs

2013-01-08 Thread Chris Jerdonek

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 short options for long commands, though, it's not obvious to look 
for something like `make -C` (because you don't already know it's there).  
That's why I think this option is more deserving.

Personally, when working on doc patches, I frequently go back and forth between 
`make html` and `hg diff`.  Knowing about -C means one doesn't have to cd up 
and down the directory each time or double-check what directory one is in.

I think it's okay and should even be a goal of the devguide to point out more 
efficient ways to contribute, which may sometimes involve saying more than the 
minimum (e.g. saying how something works, or stating a more advanced way to 
do something).  I still think we should strive for conciseness within those 
constraints.  Here is a new patch that makes the current language more concise 
in addition to some other minor changes.

--
Added file: http://bugs.python.org/file28642/issue-16814-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16814
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

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-committers might not need to know the answer.  It seems like it 
would be difficult to draw that line anyways, unless the question is about the 
Python commit process itself -- in which case it's probably not a generic 
Mercurial question anyways.  We also have the option of creating a new 
subsection of the FAQ if it makes sense to do so (e.g. a subsection about 
Committing).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

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 into the natural 
flow of the main body of text.  That's fine with me.  I got the impression you 
were moving questions in the current FAQ.  It is good, though, to have the main 
instructions be smaller and easier to read through, with sections describing 
short-cuts and other non-essential info separated off into linkable chunks (in 
committers.rst or elsewhere).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
hgrepos: +168

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
hgrepos:  -168

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
hgrepos: +169

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
hgrepos:  -169

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-08 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16884] logging handler automatically added starting in 3.2+

2013-01-07 Thread Chris Jerdonek

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 seem to find any version-changed about this in the docs.  The 
code change may be from this commit: c86dc2bd3ae8

Incidentally, I also noticed that three logging paragraphs begin with PLEASE 
NOTE:  Those should probably be changed to .. note:: etc.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 179257
nosy: chris.jerdonek, docs@python, vinay.sajip
priority: normal
severity: normal
status: open
title: logging handler automatically added starting in 3.2+
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16884
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16884] logging handler automatically added starting in 3.2+

2013-01-07 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-07 Thread Chris Jerdonek

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='*' and 
default=None).

--
keywords: +patch
Added file: http://bugs.python.org/file28623/issue-16878-1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16878
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-07 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16889] facilitate log output starting at beginning of line

2013-01-07 Thread Chris Jerdonek

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 to be to get log messages to start at 
the beginning of a line, which seems like a reasonable expectation.

It would be good if the logging module (or perhaps unittest for when running 
tests?) provided assistance here, either through documentation or an 
enhancement.

The way I did this was wrap sys.stderr in a class that remembers the last 
written character, pass this to the test runner, and then subclass 
logging.StreamHandler to have emit() check whether a newline was the last 
character.  But perhaps there is a much simpler way.

--
components: Library (Lib)
messages: 179304
nosy: chris.jerdonek, r.david.murray, vinay.sajip
priority: normal
severity: normal
status: open
title: facilitate log output starting at beginning of line
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16889
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16748] Make CPython test package discoverable

2013-01-07 Thread Chris Jerdonek

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16799] start using argparse.Namespace in regrtest

2013-01-07 Thread 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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16748] Make CPython test package discoverable

2013-01-07 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread Chris Jerdonek

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 should be used if the command-line argument is not 
present. ... For positional arguments with nargs equal to ? or *, the default 
value is used when no command-line argument was present:

(from http://docs.python.org/dev/library/argparse.html#default )

import argparse

def parse(args, **kwargs):
parser = argparse.ArgumentParser()
parser.add_argument('foo', **kwargs)
ns = parser.parse_args(args)
print(repr(ns.foo))

parse([], nargs='?')# None
parse([], nargs='*')# []--
parse([], nargs='*', default=None)  # []--
parse([], nargs='*', default=False) # False
parse([], nargs='*', default=0) # 0

Three options include (there may be more):

(1) document the behavior
(2) make a default of None yield None
(3) do (2), but change the default to [] instead of None when nargs='*'

--
components: Library (Lib)
messages: 179174
nosy: bethard, chris.jerdonek
priority: normal
severity: normal
status: open
title: argparse: positional args with nargs='*' defaults to []
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16878
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16799] start using argparse.Namespace in regrtest

2013-01-06 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-06 Thread Chris Jerdonek

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16854
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread Chris Jerdonek

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.  For example, unlike with 
optional arguments, it doesn't seem like it would ever make sense to 
distinguish between the option being present and the option being present with 
no values (which is why const is needed in the optional case).  In other words, 
there is no loss of information by returning [].

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16878
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread Chris Jerdonek

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://docs.python.org/dev/library/argparse.html#nargs )

 p.add_argument('--foo', nargs='*', default=None)
 p.parse_args([])
Namespace(foo=None)
 p.parse_args(['--foo'])
Namespace(foo=[])

So it could be argued that positionals (at least by default) are behaving like 
the second case.  But that's as far as the parallel goes apparently.  *default* 
affects the first case and not the second case for optional arguments:

 p.add_argument('--foo', nargs='*', default=False)
 p.parse_args([])
Namespace(foo=False)
 p.parse_args(['--foo'])
Namespace(foo=[])

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16878
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16868] Python Developer Guide: Include a reminder to ping bug report if not reviewed in timely manner

2013-01-05 Thread Chris Jerdonek

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...@bugs.python.org
http://bugs.python.org/issue16868
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16871] Cleanup a few minor things

2013-01-05 Thread Chris Jerdonek

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16871
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16874] setup.py upload option repeated in docs

2013-01-05 Thread 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
components: Distutils, Documentation
keywords: easy
messages: 179162
nosy: chris.jerdonek, eric.araujo, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: setup.py upload option repeated in docs
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16874
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16799] start using argparse.Namespace in regrtest

2013-01-04 Thread Chris Jerdonek

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
http://bugs.python.org/issue16799
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Chris Jerdonek

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 it up into two sections with text in between: one 
for applying a patch to 2.x or 3.x, and the other for merging (forward-porting) 
from 3.x to 3.y, with a textual explanation of what the subsequent chunk of 
commands will do.

I would also state (or link to) something about forward-porting from 3.x to 3.y 
and that 2.7 should be kept separate (both of which I think the current patch 
assumes knowledge of).  I would also say (or link to) something about pushing 
all branches simultaneously.

Lastly, might it be worth explicitly dividing the Mercurial stuff into separate 
sections for (1) everyone, and (2) committers?  Putting the committer-specific 
stuff (e.g. instructions on merging and pushing changes) in a separate section 
will simplify things for the general contributor.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
assignee:  - chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16854
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Chris Jerdonek

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 no loss of information and so should probably note this 
constraint.

I usually craft my patch against the default branch.  If applying to 2.7 or 
3.2, etc. loses information (which has been more often the case for me), then 
instead of merging I null-merge and reapply the original patch.  Should the 
recommended workflow cover this possibility?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16747] Remove 'file' type reference from 'iterable' glossary entry

2013-01-01 Thread Chris Jerdonek

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, using hg annotate, etc. to see what has changed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16747
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

2012-12-29 Thread Chris Jerdonek

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 to work with the current code if given as: '-x yy zz'.

Also, substituting argparse.REMAINDER for '*' in the original example gives the 
following both with and without the patch:

Namespace(x=False, y='yy', z=['-x', 'zz'])

That doesn't seem consistent with straddling being supported.

Lastly, passing just '-x' gives the following error with and without the patch 
(z should be optional):

error: the following arguments are required: y, z

--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15112
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16813] use paths relative to CPython root in documentation building instructions

2012-12-29 Thread Chris Jerdonek

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:  - fixed
stage:  - patch review
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16813
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16813] use paths relative to CPython root in documentation building instructions

2012-12-29 Thread Chris Jerdonek

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16813
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16814] use --directory option of make in describing how to build the docs

2012-12-29 Thread Chris Jerdonek

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 it is for.

--
nosy: +chris.jerdonek
Added file: http://bugs.python.org/file28489/issue-16814-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16814
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16814] use --directory option of make in describing how to build the docs

2012-12-29 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16772] int() accepts float number base

2012-12-28 Thread Chris Jerdonek

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 for the existing behavior (i.e. 
test_int_base_limits()).  Backporting the latter would help prevent regressions 
from future fixes in earlier versions.

Also, if we don't backport shouldn't there be a version changed in the docs?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16772
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16784] Int tests enhancement and refactoring

2012-12-28 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16784] Int tests enhancement and refactoring

2012-12-28 Thread Chris Jerdonek

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16784
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16799] switch regrtest from getopt options to argparse Namespace

2012-12-28 Thread Chris Jerdonek

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/file28474/issue-16799-1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16799
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-27 Thread Chris Jerdonek

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 that are 
documented in the following three issues: issue15324, issue15325, issue15326.  
These typos are checked by the following test cases: test_fromfile, test_match, 
and test_randomize.  (I will fix these three issues in versions prior to 3.4 
independent of this issue.)

--
Added file: http://bugs.python.org/file28452/issue-15302-6.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15302
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15324] --match does not work for regrtest

2012-12-27 Thread Chris Jerdonek

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 if 15302 hasn't been resolved by then.)

--
keywords: +patch
superseder: Use argparse instead of getopt in test.regrtest - 
versions: +Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file28453/issue-15324-1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-27 Thread Chris Jerdonek

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 behavior. Using if val would replace
 the
  value provided for all options accepting a value with the empty string. In
  particular, the test_fromfile() test case (and two others) would fail with
 that
  change. On the flip side, getopt causes provided boolean options to show up
 as
  having an empty string value in the return value which is why I'm setting 
  val
 to
  ''.
 
 I suppose this stuff is temporary anyway until regrtest can actualy use a nice
 namespace.

Right. That part is a temporary bridge.

I updated the patch based on your original comments, by the way. The patch is a 
lot simpler now, including dropping the need to subclass ArgumentParser, taking 
out the old usage() function, simplifying the tests, and making the need for 
the tests more explicit (which also can be removed after switching to using a 
namespace object).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15302
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16790] provide ability to share tests between int and long tests

2012-12-27 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16793] Get rid of deprecated assertEquals etc in tests

2012-12-27 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16793
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16792] Mark small ints test as CPython-only

2012-12-27 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16793] Get rid of deprecated assertEquals etc in tests

2012-12-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16793
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16761] Fix int(base=X)

2012-12-27 Thread Chris Jerdonek

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 synching tests between 2.7 and 3.x easier.  We 
can do the others in 3.x whenever more are added to the 2.7 common tests.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16761
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15324] --fromfile, --match, and --randomize don't work in regrtest

2012-12-27 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15325] --fromfile does not work for regrtest

2012-12-27 Thread Chris Jerdonek

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15326] --random does not work for regrtest

2012-12-27 Thread Chris Jerdonek

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, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15326
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16599] unittest: Access test result from tearDown

2012-12-27 Thread Chris Jerdonek

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/issue16599
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16792] Mark small ints test as CPython-only

2012-12-27 Thread Chris Jerdonek

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://bugs.python.org/issue16792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15324] --fromfile, --match, and --randomize don't work in regrtest

2012-12-27 Thread Chris Jerdonek

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-27 Thread Chris Jerdonek

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: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15302
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16799] switch regrtest from getopt-style options to argparse Namespace object

2012-12-27 Thread Chris Jerdonek

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 with an argparse Namespace object.

This issue should probably be a meta-issue with the transition happening over 
several issues/commits, as there are many command-line options that will 
probably have varying types and actions (in the sense of argparse).  Options 
can be switched over incrementally in groups (e.g. by having the _parse_args() 
function return the parsed options in both forms: in both getopt-style format 
and a Namespace object).

This issue will be completed when the namespace-to-getopt bridge code is 
removed -- probably along with the corresponding argparse-to-getopt tests.

--
components: Tests
messages: 178356
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: switch regrtest from getopt-style options to argparse Namespace object
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16799
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16799] switch regrtest from getopt options to argparse Namespace

2012-12-27 Thread Chris Jerdonek

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://bugs.python.org/issue16799
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



<    1   2   3   4   5   6   7   8   9   10   >