[issue14674] Link to & explain deviations from RFC 4627 in json module docs

2012-06-13 Thread Chris Rebert
Changes by Chris Rebert : Removed file: http://bugs.python.org/file25594/json.rst.patch ___ Python tracker <http://bugs.python.org/issue14674> ___ ___ Python-bugs-list m

[issue14674] Link to & explain deviations from RFC 4627 in json module docs

2012-06-13 Thread Chris Rebert
Chris Rebert added the comment: Any further comments now that the matter of encodings is covered more thoroughly? -- Added file: http://bugs.python.org/file25999/json.rst.patch ___ Python tracker <http://bugs.python.org/issue14

[issue14674] Link to & explain deviations from RFC 4627 in json module docs

2012-06-13 Thread Chris Rebert
Changes by Chris Rebert : Removed file: http://bugs.python.org/file25606/json.rst.patch ___ Python tracker <http://bugs.python.org/issue14674> ___ ___ Python-bugs-list m

[issue9679] unicode DNS names in urllib, urlopen

2012-06-13 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker <http://bugs.python.org/issue9679> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4442] document immutable type subclassing via __new__

2012-06-13 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker <http://bugs.python.org/issue4442> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15132] Let unittest.TestProgram()'s defaultTest argument be a list

2012-06-22 Thread Chris Jerdonek
New submission from Chris Jerdonek : It would be nice if unittest.TestProgram(), aka unittest.main(), allowed one to set self.testNames by programmatically passing in a list of test names. Currently, unittest.main() almost allows this: the constructor sets self.testNames to a 1-tuple

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
New submission from Chris Jerdonek : Instances of datetime.datetime don't seem to have the '__module__' attribute even though the datetime class itself does. This seems to contradict Section 3.2 of the Python documentation about the standard type hierarchy (in the subsectio

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue15223> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: Also, FWIW, in PyPy the behavior is different. Datetime instances do have the __module__ attribute: Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:11) [PyPy 1.9.0] on darwin Type "help", "copyright", "

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- versions: +Python 2.7 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue15223> ___ ___ Python-bugs-list mailing list Unsub

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks. I suspected that might be the case. Then the question becomes whether failing to fall back to the class attribute is the desired behavior, and if not, to update the documentation accordingly

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: datetime.__dict__ is another attribute that behaves this way (i.e. doesn't exist for instances in CPython but does for PyPy). -- ___ Python tracker <http://bugs.python.org/is

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-06-30 Thread Chris Jerdonek
New submission from Chris Jerdonek : I had an issue whereby my reST long_description wasn't getting rendered as HTML when uploaded to PyPI. Following the instructions here did not work as-is: http://docs.python.org/dev/distutils/uploading.html#pypi-package-display It seems that PyPI p

[issue15232] maildir parsing can split up messages with 'From ' at the start of a line

2012-06-30 Thread Chris Pickett
New submission from Chris Pickett : tar xvfz maildir_bug.tar.gz cd maildir_bug ./bug.sh The attachment contains a maildir with a single message. This message has two body lines beginning with 'From '. When converted to mbox using the maildir2mbox.py, only the second line gets a

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks. Then perhaps the documentation can be updated to make that clear. Currently, the documentation implies that running the given command is sufficient to catch all errors, which can lead to confusion when warning-free content is not rendered as HTML

[issue15250] document that filecmp.dircmp comparisons are "shallow"

2012-07-04 Thread Chris Jerdonek
New submission from Chris Jerdonek : The documentation for the dircmp class doesn't say that the same_files and diff_files attributes are determined using the "shallow=True" rules described in the filecmp.cmp() and filecmp.cmpfiles(). It should say this. For example, th

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2012-07-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: +1 for this. Whether or not this feature is implemented, I think the documentation should state that directory comparisons are done using "shallow=True". I created issue 15250 for this. -- nosy:

[issue15210] importlib.__init__ checks for the wrong exception when looking for _frozen_importlib

2012-07-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: I could be way off (just passing through), but the test flakiness described here seems reminiscent of a discussion we had for issue 7559. There the solution to order-dependent tests with importlib involved calling importlib.invalidate_caches() at the

[issue15254] 08 is invalid token in lists.

2012-07-05 Thread Chris Wright
New submission from Chris Wright : Python 2.6.6 tk 8.5 Idle 2.6.6 I was trying to generate a multidimensional list, and my test list kept giving errors highlighting 08 as an invalid token. >>> cube = >>> [[[01,02,03],[04,05,06],[07,08,09]],[[11,12,13],[14,15,16],[17

[issue15259] "Helping with Documentation" references missing dailybuild.py

2012-07-05 Thread Chris Jerdonek
New submission from Chris Jerdonek : The intro to the "Helping with Documentation" section of the Developer's Guide-- http://docs.python.org/devguide/docquality.html#helping-with-documentation includes a reference to a Doc/tools/dailybuild.py script, but this script does not s

[issue15260] Mention how to order Misc/NEWS entries

2012-07-05 Thread Chris Jerdonek
New submission from Chris Jerdonek : I think it would help if the "Commit Messages and NEWS Entries" subsection of the Developer's Guide said something about where in the ordering new Misc/NEWS entries should be added (e.g. at the top or bottom or by importance): http://

[issue15250] document that filecmp.dircmp comparisons are "shallow"

2012-07-05 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file26265/issue15250-1.patch ___ Python tracker <http://bugs.python.org/issu

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-05 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file26268/issue-15231-1.patch ___ Python tracker <http://bugs.python.org/issu

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-07-06 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue14649> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: I have attached a patch with tests. -- keywords: +easy, patch stage: -> patch review Added file: http://bugs.python.org/file26269/issue-14649-1.patch ___ Python tracker <http://bugs.python.org/issu

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-07-06 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue14649> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: Another way to make it easier for users to run the same command as PyPI locally -- also phrased in the passive voice :) -- would be if PyPI packaged its conversion code as a separate module that could also be run as a stand-alone script, and then relied on

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: Does the proposed patch to the documentation look okay given the way things are today? I can open an issue on the PyPI tracker to discuss the broader issue or, if you prefer, on the main Python tracker

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: I did yesterday. I will post here when I receive a response. -- ___ Python tracker <http://bugs.python.org/issue15231> ___ ___

[issue15266] Provide an easy way to check a reST long_description for PyPI

2012-07-06 Thread Chris Jerdonek
New submission from Chris Jerdonek : There should be an easy way to check a reST long_description on one's local machine before uploading to PyPI. The check should use the same rules that PyPI uses, so that passing the check locally ensures that PyPI will convert the description to

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: I created issue 15266 for the broader issue. The corresponding issue I made earlier on the PyPI tracker is also referenced there. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15260] Mention how to order Misc/NEWS entries

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: Patch attached. I moved the discussion of NEWS entries to a section before the discussion on commit messages because previously, the commit message discussion referenced NEWS entries before they had been discussed (and not vice versa). This seems clearer

[issue15259] "Helping with Documentation" references missing dailybuild.py

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: Patch attached; reference to the script removed. -- keywords: +patch Added file: http://bugs.python.org/file26275/issue-15259-1.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15266] Perform the same checks as PyPI for Description field

2012-07-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: With regard to the maintenance issue, what about the idea of aiming for PyPI to include that logic in a separately packaged module? Then there would be no need to cut and paste -- just include the right version. If that were done, depending on how the

[issue15269] Document dircmp.left and dircmp.right

2012-07-06 Thread Chris Jerdonek
New submission from Chris Jerdonek : The documentation for the filecmp.dircmp class doesn't mention dircmp.left and dircmp.right. Being aware of this up front would make certain simplifications easier to think of. For example, knowing about these attributes opens up the possibili

[issue15269] Document dircmp.left and dircmp.right

2012-07-06 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- keywords: +patch Added file: http://bugs.python.org/file26282/issue-15269-1.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15270] "Economy of Expression" section outdated

2012-07-06 Thread Chris Jerdonek
New submission from Chris Jerdonek : The "Economy of Expression" section of the Dev Guide's "Documenting Python"-- http://docs.python.org/devguide/documenting.html#economy-of-expression says, "The documentation for super() is an example of where a good deal of in

[issue15276] unicode format does not really work in Python 2.x

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Cf. the related issue 7300: "Unicode arguments in str.format()". -- nosy: +cjerdonek ___ Python tracker <http://bugs.python.o

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: As someone who isn't an expert on Python's import mechanisms, I'm confused by this comment at the end of pkgutil.walk_packages(): "Note: Only works for importers which define a iter_modules() method, which is non-standard but implemente

[issue15259] "Helping with Documentation" references missing dailybuild.py

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Hi Éric, I did a couple days ago. -- ___ Python tracker <http://bugs.python.org/issue15259> ___ ___ Python-bugs-list mailin

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot, Eric. I'm going to create a new issue to clarify the note a bit, if that's okay. At minimum, I feel like enough information should be given to let one run the examples given. By the way, your comment, "While you can use pkgutil

[issue15288] Clarify the pkgutil.walk_packages() note

2012-07-07 Thread Chris Jerdonek
New submission from Chris Jerdonek : The note at the end of the pkgutil.walk_packages() (and iter_modules()) documentation can be improved somewhat: http://docs.python.org/dev/library/pkgutil.html#pkgutil.walk_packages For example, "importers" aren't referenced earlier in the d

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: I created issue 15288 to improve the documentation around this. -- ___ Python tracker <http://bugs.python.org/issue14

[issue15297] pkgutil.iter_importers() includes an ImpImporter

2012-07-08 Thread Chris Jerdonek
New submission from Chris Jerdonek : I'm not sure if this should be fixed in the code or in the documentation, but the pkgutil.iter_importers() documentation says that pkgutil.iter_importers(name) should yield the "importers for sys.meta_path, sys.path, and Python’s “classic” import

[issue15299] ImpImporter(None).iter_modules() does not search sys.path

2012-07-08 Thread Chris Jerdonek
New submission from Chris Jerdonek : The pkgutil.ImpImporter documentation says that if dirname is None, ImpImporter(dirname) should create a PEP 302 importer that searches the current sys.path, plus any modules that are frozen or built-in: http://docs.python.org/dev/library/pkgutil.html

[issue15299] pkgutil.ImpImporter(None).iter_modules() does not search sys.path

2012-07-08 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- title: ImpImporter(None).iter_modules() does not search sys.path -> pkgutil.ImpImporter(None).iter_modules() does not search sys.path ___ Python tracker <http://bugs.python.org/issu

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: Martin, FYI, Pat processed my contrib form. -- ___ Python tracker <http://bugs.python.org/issue15231> ___ ___ Python-bugs-list m

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: FYI, I created issue 15299 and issue 15297 which also relate to pkgutil.walk_packages() not working correctly in Python 3.3 -- even with the caveat added by Brett. These two issues are in pkgutil.walk_packages()'s code path when passed path

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-07-08 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker <http://bugs.python.org/issue14715> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-08 Thread Chris Jerdonek
New submission from Chris Jerdonek : Running tests using the -j/--multiprocess option doubly-nests the test working directory: $ ./python.exe -m test -j3 -->cpython/build/test_python_63955/build/test_python_63956 $ ./python.exe -m test -->cpython/build/test_python_63957 It seems li

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching a small refactoring patch to eliminate some cut-and-paste, prior to fixing this issue. -- keywords: +patch Added file: http://bugs.python.org/file26322/issue-15300-1.patch ___ Python tracker <h

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: And here is the second part. Combining this with the first patch provides a fix. -- Added file: http://bugs.python.org/file26323/issue-15300-2.patch ___ Python tracker <http://bugs.python.org/issue15

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

2012-07-08 Thread Chris Jerdonek
New submission from Chris Jerdonek : I think it would be an improvement to switch from using getopt to argparse in test.regrtest. The code would be easier to maintain, it would give us more powerful options going forward, and it would improve the usability of the test command (e.g. nicer

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

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: It is also in the spirit of dogfooding. -- ___ Python tracker <http://bugs.python.org/issue15302> ___ ___ Python-bugs-list m

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a single combined patch. I gather this is preferred. -- Added file: http://bugs.python.org/file26324/issue-15300-combined.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15279] Spurious unittest warnings

2012-07-09 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker <http://bugs.python.org/issue15279> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15304] Wrong path in test.support.temp_cwd() error message

2012-07-09 Thread Chris Jerdonek
New submission from Chris Jerdonek : test.support.temp_cwd() has a typo (s/name/path/): try: os.chdir(path) except OSError: if not quiet: raise warnings.warn('tests may fail, unable to change the CWD to ' + name, RuntimeWarning, st

[issue15305] Test harness unnecessarily disambiguating twice

2012-07-09 Thread Chris Jerdonek
New submission from Chris Jerdonek : It seems like our test harness is disambiguating more than it needs to for parallel testing. In Lib/test/regrtest.py, we do this-- # Define a writable temp dir that will be used as cwd while running # the tests. The name of the dir includes the pid to

[issue15305] Test harness unnecessarily disambiguating twice

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: The former option seems to make more sense to me (a single working directory for all parallel tests using a disambiguated TESTFN). -- ___ Python tracker <http://bugs.python.org/issue15

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: After this patch, it's clear that TEMPDIR and TESTCWD no longer have to be global variables. I can make that a separate issue after this one. -- ___ Python tracker <http://bugs.python.org/is

[issue15304] Wrong path in test.support.temp_cwd() error message

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Adding failing test. -- keywords: +patch stage: -> needs patch Added file: http://bugs.python.org/file26327/issue-15304-failing-test.patch ___ Python tracker <http://bugs.python.org/issu

[issue15304] Wrong path in test.support.temp_cwd() error message

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching fix. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file26328/issue-15304-fix.patch ___ Python tracker <http://bugs.python.org/issu

[issue15299] pkgutil.ImpImporter(None).iter_modules() does not search sys.path

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: I'm working on a test for this. -- stage: -> test needed ___ Python tracker <http://bugs.python.org/issue15299> ___ _

[issue15299] pkgutil.ImpImporter(None).iter_modules() does not search sys.path

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Add failing tests. -- keywords: +patch stage: test needed -> needs patch Added file: http://bugs.python.org/file26329/issue-15299-failing-test.patch ___ Python tracker <http://bugs.python.org/issu

[issue15297] pkgutil.iter_importers() includes an ImpImporter

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Marking this a documentation issue because the same behavior is also present in 2.7: Python 2.7.3 (default, Apr 19 2012, 00:55:09) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin >>> from pkgutil import iter_importers

[issue15311] Developer Guide doesn't get updated once a day

2012-07-09 Thread Chris Jerdonek
New submission from Chris Jerdonek : The Dev Guide says that it is "managed using the same process as is used for the main Python documentation": http://docs.python.org/devguide/docquality.html#helping-with-the-developer-s-guide However, it looks the Dev Guide might not be o

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

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Sure, if someone is open to reviewing it. The parsing code doesn't seem to be doing anything too fancy right now. I can decouple the parsing code and begin adding tests around parts that may need it more. Increasing coverage will be easier going fo

[issue15311] Developer Guide doesn't get updated once a day

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: This commit from 2 days ago-- http://hg.python.org/devguide/rev/d1958a94d0ff doesn't seem to be reflected in the published version as of yet: http://docs.python.org/devguide/docquality.html So maybe there is just a problem with the hook. If it doe

[issue15316] runpy swallows ImportError information with relative imports

2012-07-09 Thread Chris Jerdonek
New submission from Chris Jerdonek : With the following package directory structure-- foo/ __init__.py __main__.py from foo import bar bar.py print('***') raise ImportError('test...') Running-- $ ./python.exe -m foo Yields-- *** Tr

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

2012-07-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Senthil. That is my plan. I should be able to have code with tests in no later than a week. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15311] Developer Guide doesn't get updated once a day

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Patch attached. I also added a note about building the Dev Guide documentation. Unlike the main Python documentation, `make html` for the Dev Guide doesn't seem to install Sphinx automatically. -- keywords: +patch Added file: http://bugs.pytho

[issue15311] Developer Guide doesn't get updated once a day

2012-07-10 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue15311> ___ ___ Python-bugs-list mailing list Unsubscri

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

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: By the way, issue 15300 has a related patch that is ready to review today. Assuming that one is okay, it would make sense to commit first because it overlaps with the changes I'll be doing here. Issue 15305 is another related issue (also overlapping) th

[issue15111] Wrong ImportError message with importlib

2012-07-10 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker <http://bugs.python.org/issue15111> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15320] thread-safety issue in regrtest.main()

2012-07-10 Thread Chris Jerdonek
New submission from Chris Jerdonek : My understanding is that generators are not thread-safe. For example, see http://stackoverflow.com/a/1131458/262819 However, regrtest.main() seems to access a generator from multiple threads when run in multiprocess mode: def work(): # A worker

[issue15322] sysconfig.get_config_var('srcdir') returns unexpected value

2012-07-10 Thread Chris Jerdonek
New submission from Chris Jerdonek : sysconfig.get_config_var('srcdir') seems to return the current working directory rather than a directory related to the source directory. For example (starting from the repository root)-- $ mkdir foo $ cd foo $ ../python.exe Python 3.3.0b

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks for your feedback, Antoine, and for causing me to rethink the patch. This patch is drastically simpler. Incidentally, I found a reason for this issue in issue 15322. regrtest calculates the "build" folder relative to sysconfig.get_config_v

[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: I have a minor suggestion. I would suggest-- + msg = ("Expected %s to be called once. Called %s times." % +(repr(self._mock_name) or 'mock', self.call_count)) so that one can distinguish between self._mock_name not being defined

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

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a patch that creates some unit tests for the existing getopt argument parsing code. In response to the comments, I'm thinking of a less invasive approach that involves wrapping argparse's parse_args() to return getopt-like output (and in

[issue15324] --match does not work for regrtest

2012-07-11 Thread Chris Jerdonek
New submission from Chris Jerdonek : The long form of the -m/--match option does not work with regrtest because it does not accept an argument. For example (observe the lack of an error in the second invocation)-- $ ./python.exe -m test -m option -m requires argument Use --help for usage

[issue15325] --fromfile does not work for regrtest

2012-07-11 Thread Chris Jerdonek
New submission from Chris Jerdonek : The long form of the -f/--fromfile option does not work. It does not read its required argument. For example (observe that the second invocation raises no error)-- $ ./python.exe -m test -f option -f requires argument Use --help for usage $ ./python.exe

[issue15324] --match does not work for regrtest

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Note that issue 15302 will fix this. -- ___ Python tracker <http://bugs.python.org/issue15324> ___ ___ Python-bugs-list mailin

[issue15326] --random does not work for regrtest

2012-07-11 Thread Chris Jerdonek
New submission from Chris Jerdonek : The long form of the -r/--random option does not work: $ ./python.exe -m test --random No handler for option --random. Please report this as a bug at http://bugs.python.org. Note that issue 15302 will fix this. -- components: Tests keywords: easy

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

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attached is a first version of a complete patch. Note that I found three bugs in the current argument parsing code in the course of working on this patch: issue 15324, issue 15325, and issue 15326 (because of various typos in the getopt configuration). All

[issue15320] thread-safety issue in regrtest.main()

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: I don't think the late binding is necessary. But it looks like late binding could be preserved simply by constructing args_tuple inside the worker thread instead of in the generator. Really, only "test" needs to be yielded. Nothing else var

[issue15322] sysconfig.get_config_var('srcdir') returns unexpected value

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: I searched a little before. There is issue 12141, "sysconfig.get_config_vars('srcdir') fails in specific cases," but that issue is closed. In the comments there, Antoine seems to be describing the bug I describe here, but I'm no

[issue15320] thread-safety issue in regrtest.main()

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching a patch for the original issue using deque. -- Added file: http://bugs.python.org/file26359/issue-15320-1.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15329] clarify which deque methods are thread-safe

2012-07-11 Thread Chris Jerdonek
New submission from Chris Jerdonek : I think it would help to clarify which collections.deque methods are thread-safe: http://docs.python.org/dev/library/collections.html?highlight=deque#collections.deque Currently, the documentation says that "Deques support thread-safe, memory effi

[issue15330] allow deque to act as a thread-safe circular buffer

2012-07-11 Thread Chris Jerdonek
New submission from Chris Jerdonek : It seems like it would be useful if collections.deque had a thread-safe method that could rotate(1) and return the rotated value. This would let deque to act as a thread-safe circular buffer (e.g. if serving jobs to multiple threads in a loop, like `python

[issue15320] thread-safety issue in regrtest.main()

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Good catch. Here is a patch that takes --forever mode into account. I wrote this patch with the assumption that it shouldn't hurt if multiple threads call deque.extend() at the same time. -- Added file: http://bugs.python.org/file26363/issue-15

[issue15330] allow deque to act as a thread-safe circular buffer

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Yes, atomic. I was under the impression that the existing deque.rotate() is atomic, in which case deque.rotate(1) almost provides what I'm suggesting (lacking only the return value). -- ___ Python tracker

[issue15330] allow deque to act as a thread-safe circular buffer

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks for the info. A couple questions: what does "won't break" mean -- that it won't throw an exception of a type that it wouldn't normally throw in a single-threaded environment? And does this mean that not ev

[issue15329] clarify which deque methods are thread-safe

2012-07-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: I think some of the information in the issue 15330 comments would be very helpful to add as well (what thread-safe means in Python, distinction between thread-safe and atomic, and which deque methods are thread-safe and/or atomic). If some of that

[issue15320] thread-safety issue in regrtest.main()

2012-07-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: That sounds fine. And thanks for investigating. By the way, I created issue 15329 earlier today to clarify what guarantees deque provides with respect to multithreading. For example, the distinction between thread-safe and atomic is not currently mentioned

[issue15320] thread-safety issue in regrtest.main()

2012-07-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: Yes, that is what I took Amaury's comment to mean. I started working on a patch that incorporates a lock. -- ___ Python tracker <http://bugs.python.org/is

[issue15339] document the threading "facts of life" in Python

2012-07-12 Thread Chris Jerdonek
New submission from Chris Jerdonek : I think it would be helpful if the Python documentation included certain high-level information about multi-threading in Python. At minimum, I think it would help for the documentation to provide a definition that can be linked to of what it means when

[issue15329] clarify which deque methods are thread-safe

2012-07-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: I created issue 15339 to document the multi-threading "facts of life" in Python (independent of any particular module or package, including this one), along the lines suggested by Raymond. -- ___ Pyth

[issue15320] thread-safety issue in regrtest.main()

2012-07-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is another patch -- this one making no implementation assumptions about thread-safety or atomicity. -- Added file: http://bugs.python.org/file26371/issue-15320-3.patch ___ Python tracker <h

[issue15324] --match does not work for regrtest

2012-07-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: This and the two similar issues can be fixed without waiting for the enhancement patch by correcting the typos in the getopt invocation. I would be happy to file patches or a combined patch to fix just the typos

[issue15351] Add to unittest.TestCase support for using context managers

2012-07-14 Thread Chris Jerdonek
New submission from Chris Jerdonek : The setUp() and tearDown() methods of unittest.TestCase are of course extremely useful. But sometimes one has set up and tear down functionality that one would like to apply in the form of an existing context manager (and that may be from an outside

<    5   6   7   8   9   10   11   12   13   14   >