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
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
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
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
Changes by Chris Jerdonek :
--
keywords: +patch
Added file: http://bugs.python.org/file26282/issue-15269-1.patch
___
Python tracker
<http://bugs.python.org/issue15
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
Chris Jerdonek added the comment:
Cf. the related issue 7300: "Unicode arguments in str.format()".
--
nosy: +cjerdonek
___
Python tracker
<http://bugs.python.o
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
Chris Jerdonek added the comment:
Hi Éric, I did a couple days ago.
--
___
Python tracker
<http://bugs.python.org/issue15259>
___
___
Python-bugs-list mailin
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
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
Chris Jerdonek added the comment:
I created issue 15288 to improve the documentation around this.
--
___
Python tracker
<http://bugs.python.org/issue14
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
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
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
Chris Jerdonek added the comment:
Martin, FYI, Pat processed my contrib form.
--
___
Python tracker
<http://bugs.python.org/issue15231>
___
___
Python-bugs-list m
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
Changes by Chris Jerdonek :
--
nosy: +cjerdonek
___
Python tracker
<http://bugs.python.org/issue14715>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Chris Jerdonek added the comment:
It is also in the spirit of dogfooding.
--
___
Python tracker
<http://bugs.python.org/issue15302>
___
___
Python-bugs-list m
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
Changes by Chris Jerdonek :
--
nosy: +cjerdonek
___
Python tracker
<http://bugs.python.org/issue15279>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
Chris Jerdonek added the comment:
I'm working on a test for this.
--
stage: -> test needed
___
Python tracker
<http://bugs.python.org/issue15299>
___
_
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
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
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
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
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
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
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
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
Changes by Chris Jerdonek :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue15311>
___
___
Python-bugs-list mailing list
Unsubscri
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
Changes by Chris Jerdonek :
--
nosy: +cjerdonek
___
Python tracker
<http://bugs.python.org/issue15111>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
Chris Jerdonek added the comment:
Note that issue 15302 will fix this.
--
___
Python tracker
<http://bugs.python.org/issue15324>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Chris Jerdonek added the comment:
In addition, before changing ImpImporter.iter_modules(), we should probably
also add some tests of the method for values of self.path that do work (i.e.
for when self.path is not None). The method is currently untested.
I can work on adding tests for that
Chris Jerdonek added the comment:
I agree pkgutil is pretty much useless right now and deprecation worth
considering. But isn't another option simply to change pkgutil's internals to
provide its own iter_modules whenever it finds that method missing? This seems
to be what it h
Chris Jerdonek added the comment:
In Python 2.7, I just did this test:
>>> import sys, pkgutil
>>> for path in sys.path:
... print pkgutil.get_importer(path)
And got only pkgutil.ImpImporter instances and imp.NullImporter objects.
So even before, at least in the most com
Chris Jerdonek added the comment:
Thanks for the interesting background and feedback. I was aware of the
__enter__/__exit__ option but not the other information. And yes, I agree on
the importance of trying and discussing any API before settling on it. The one
I suggested was merely a point
New submission from Chris Jerdonek :
I think the generator.__next__() documentation should say that it raises an
exception if the generator is already executing:
http://docs.python.org/dev/reference/expressions.html#generator.__next__
I don't think this is currently mentioned anywhere i
Chris Jerdonek added the comment:
For the record, this issue is still present after Nick's pkgutil changes
documented in issue 15343 (not that I expected it to be resolved since this
issue is a bit different).
--
___
Python tracker
Changes by Chris Jerdonek :
--
nosy: +cjerdonek
___
Python tracker
<http://bugs.python.org/issue15358>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Closing as this is no longer an issue after Nick's pkgutil changes documented
in issue 15343.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org
Chris Jerdonek added the comment:
Such helper functionality could also be used in the tests of
unittest.TestLoader.loadTestsFromName(). See, for example, the tests proposed
for issue 7559.
--
___
Python tracker
<http://bugs.python.org/issue15
Chris Jerdonek added the comment:
Thanks a lot for the feedback. The thinking was to use a stand-alone (even
testable) construct with dependencies made explicit. For example, it wasn't
obvious that the current iterator depended on forever, or whether the
args_tuple parameter
Chris Jerdonek added the comment:
> This isn't an easy one to fix - you basically need something along the lines
> of a PEP 406 style import engine API in order to do the import without having
> potentially adverse effects on the state in the sys module.
By adverse, do you
Chris Jerdonek added the comment:
Issue 15322 is a recently filed bug regarding srcdir:
"sysconfig.get_config_var('srcdir') returns unexpected value"
--
nosy: +cjerdonek
___
Python tracker
<http://bug
Chris Jerdonek added the comment:
Attached is a patch illustrating the API I suggested for discussion.
To add custom setup and teardown context managers, the user can override the
following method:
def executeTest(self):
with self.setUpContext():
self.runTestMethod
Chris Jerdonek added the comment:
I'd like to work on this if that's okay. I've already written test cases for
issue 7559 and issue 15299 that required creating temporary packages, so I
understand the need. And I'd also like to create test cases for issue 14787,
which s
New submission from Chris Jerdonek :
This issue is to refactor the create-package code in test_runpy into a helper
module, as suggested in issue 15358.
This is a prerequisite to moving the pkgutil.walk_package() tests from
test_runpy into test_pkgutil.
--
components: Tests
keywords
Changes by Chris Jerdonek :
--
dependencies: +Refactor the create-package code in test_runpy into a helper
module
___
Python tracker
<http://bugs.python.org/issue15
New submission from Chris Jerdonek :
The error message for os.path.join() is misleading when the first argument is
None. The message should probably say something about mixing "None" and
strings.
Python 3.3.0b1 (default:f954ee489896, Jul 16 2012, 22:42:29)
[GCC 4.2.1 Compatible A
New submission from Chris Jerdonek :
This issue addresses the "file creation" portion of issue 15376, which is to
refactor the walk_package support code in test_runpy into a common location.
--
components: Tests
keywords: easy
messages: 165910
nosy: cjerdonek
priority: norma
Chris Jerdonek added the comment:
I'm going to address this issue in parts to make it easier to review and see
what is going on.
The first patch I'm uploading shortly here: issue 15403. That issue I created
to address just the "file creation" part of the code.
The appro
Changes by Chris Jerdonek :
--
nosy: +ncoghlan
___
Python tracker
<http://bugs.python.org/issue15403>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Attaching patch.
--
keywords: +patch
Added file: http://bugs.python.org/file26447/issue-15403-1.patch
___
Python tracker
<http://bugs.python.org/issue15
New submission from Chris Jerdonek :
This issue is partly in service to issue 15376, which is to refactor
test_runpy's walk_package support code into a common location.
Currently, the temp_cwd() context manager in test.support does two things: it
creates a temp directory, and it change
Chris Jerdonek added the comment:
Attaching a patch with tests.
--
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file26468/issue-15415-1.patch
___
Python tracker
<http://bugs.python.org/issu
Chris Jerdonek added the comment:
Fixing patch so it will apply cleanly.
--
Added file: http://bugs.python.org/file26470/issue-15415-2.patch
___
Python tracker
<http://bugs.python.org/issue15
Chris Jerdonek added the comment:
> Given that we have self.left_list and self.left_only ( and self.right_list
> and self.right_only), I am not sure how adding self.left/self.right is going
> to add more meaning?
It adds more meaning because you can't construct self.left and s
Chris Jerdonek added the comment:
Trying again to have the patch apply cleanly (for the review link).
--
Added file: http://bugs.python.org/file26472/issue-15415-3.patch
___
Python tracker
<http://bugs.python.org/issue15
Chris Jerdonek added the comment:
For attribution purposes and to keep the issue focused, shouldn't those other
changes be added as part of a separate issue?
The changes you added are much larger than mine, and address cosmetic issues
and other issues unrelated to the original point
Chris Jerdonek added the comment:
Thanks, Senthil. I would prefer if you created a new issue in the tracker for
your additional changes, and then committed your changes as part of that issue.
By attribution, I was referencing the "Patch by Chris Jerdonek" which can go
in the comm
Chris Jerdonek added the comment:
Thanks a lot for committing this for me Senthil. And thanks also for creating
a separate issue for the other changes. I appreciate it.
--
___
Python tracker
<http://bugs.python.org/issue15
Chris Jerdonek added the comment:
Some comments on the patch:
+ The buffer size value which will be used to read the file contents. Defaults
+ to 8192 bytes.
I would consider including the units for the value here (e.g. "The buffer
size value in bytes...").
+ When *shallow* f
Chris Jerdonek added the comment:
I created issue 15415 and uploaded a patch there with this issue in mind.
test_runpy contains supporting _make_pkg() and _del_pkg() methods that,
among other things, create and delete a temp directory. That logic
would be better handled by a temp directory
301 - 400 of 1575 matches
Mail list logo