New submission from Chris Jerdonek:
The sentence describing Popen()'s cwd argument in the subprocess documentation
seems reversed to me:
http://docs.python.org/dev/library/subprocess.html#subprocess.Popen
It says, If cwd is not None, the child’s current directory will be changed to
cwd
Chris Jerdonek added the comment:
However, the -C option doesn't cover the case of *implicit* invocation of
subprocesses. This is where the PYTHONRUNFIRST suggestion comes in
Would a more general solution than PYTHONRUNFIRST be something like a suitably
named PYTHONRUNINSTEAD? This would
Chris Jerdonek added the comment:
Could you possibly write a patch for 2.7, 3.2 and 3.3?. With a test :-)
I would be happy to write a patch with tests (I think there may be a few edge
cases we would want to test here). Should be ready within the next one or two
days
Chris Jerdonek added the comment:
Should adding tests for the report methods be a separate issue from this
enhancement?
Yes, I would create separate issues for this. I would even recommend
separating this into one issue for the report() methods (could be done first),
and another issue
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +cbc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15450
___
___
Python-bugs-list
Chris Jerdonek added the comment:
Attaching patch with test cases.
I added 6 new tests:
*test_empty_string
test_whitespace_trailing
*test_drop_whitespace__all_whitespace
*test_initial_indent__empty_string
test_subsequent_indent__trailing_whitespace
test_subsequent_indent__long_indent
Chris Jerdonek added the comment:
Actually, here is a slightly more benign version of the patch.
This patch makes the change in the wrap() method and leaves _wrap_chunks()
alone.
This is less intrusive because it doesn't change the behavior of
_wrap_chunks(), which some people might
Chris Jerdonek added the comment:
Thanks, Chris. A couple high-level comments.
I know this isn't the prevailing style of the existing tests, but it's
generally better if each unit test tests just one thing. That way, for
example, if a test fails you know more precisely what is not working
Chris Jerdonek added the comment:
The tempfile-generated directory names are part of the report method output
and are not known in advance.
There are at least two ways you could deal with this. You could change the
working directory to the temp directory in setUp() and change it back
Chris Jerdonek added the comment:
Shouldn't a test be added to check that the issue has been fixed though (i.e. a
test with a path longer than the original 100 characters)?
I provided a patch to show how this can easily be done.
I would be happy to write the test
Chris Jerdonek added the comment:
I didn't want to write such test, but I can review a patch adding such test.
Thank you. I will provide a patch for your review.
I think a test for the path may be better as that was the original issue
experienced
Chris Jerdonek added the comment:
Attaching patch with test case for long script path.
This test failed on my system before the fix and passes after.
--
Added file: http://bugs.python.org/file26601/issue-15463-2.patch
___
Python tracker rep
Chris Jerdonek added the comment:
Is it okay for me to reopen this issue to review the patch to add a test case
for file paths longer than 100 characters, or should I create a new issue for
that?
--
___
Python tracker rep...@bugs.python.org
http
Chris Jerdonek added the comment:
Meador, does this language look okay to you now that it states the exception
type?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15355
New submission from Chris Jerdonek:
While working on issue 1859, I found that textwrap.wrap() returns an empty list
when passed the empty string:
from textwrap import wrap
wrap('')
[]
as opposed to a list containing the empty string which is what I expected--
['']
I originally accepted
Chris Jerdonek added the comment:
Marking issue 15510 as a dependency because there is a behavioral issue in
existing use cases that affects how to proceed in this issue.
--
dependencies: +textwrap.wrap('') returns empty list
___
Python tracker rep
Chris Jerdonek added the comment:
Since Martin is busy, is there anything I can do to help close this very minor
change? It seems to be in a half-committed state right now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Chris Jerdonek added the comment:
Thanks, Eli. I know Éric had marked in the tracker for the change to be done
in 2.7 and 3.2 as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15231
Chris Jerdonek added the comment:
I haven't commented on the content of your patch (I'm not knowledgeable enough
in this area), but as for your test, I noticed that you removed the part that
asserted something about the argument passed to cb().
Ideally when testing a callback, you want
Chris Jerdonek added the comment:
The unit tests added here are another candidate for the refactoring in issue
15403 (Refactor package creation support code into a common location). I'll
note this in that issue.
--
nosy: +cjerdonek
___
Python
Chris Jerdonek added the comment:
Lib/test/test_import.py also contains test code that would benefit from this
(see for example issue 15425). (Though not all files need to be refactored in
a single issue.)
--
___
Python tracker rep
Chris Jerdonek added the comment:
The test cases uploaded to issue 7559 (TestLoader.loadTestsFromName swallows
import errors) a while back contain a number of distinct cases (four, I think)
in which an import error can be raised. IIRC, these include a couple recursive
scenarios (cyclical
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +cjerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14803
___
___
Python-bugs
Chris Jerdonek added the comment:
Ned, two questions: in the scenario you just described, is it a requirement
that your test suite's code need not be modified (even minimally) to support
coverage of subprocesses?
And can the solution assume that the test suite is spawning the Python
Chris Jerdonek added the comment:
I understand that. Sorry, I meant to say code under test.
If you make no assumptions about spawning subprocesses, does this mean, for
example, that the solution must satisfy the case of subprocesses invoking a
different version of Python, or invoking
Chris Jerdonek added the comment:
I feel like it is already too large (it is over 1750 lines), and I did not want
to create a third sibling test support module (there is also
test/script_helper.py that overlaps with test.support). Do you think that the
community would be open to refactoring
Chris Jerdonek added the comment:
At this point, would you advise me to add even more to the existing hodge
podge, or to create a third sibling test support module? My patch adds closely
related test support functionality.
Incidentally, this discussion relates to the point I was getting
Chris Jerdonek added the comment:
Okay, then in the interest of understanding why various alternatives fail, I'll
just throw out the suggestion or question that I had in mind because I don't
see it mentioned above or on the web page.
Why wouldn't it work to define an alias or script
Chris Jerdonek added the comment:
Thanks for your thoughts. For the purposes of this patch, I will change to
putting the new support functionality in test.support. Going forward, if we
could do some of the refactoring for 3.3.1, that would be great. :)
I worry that the third option may make
Chris Jerdonek added the comment:
Less favorable, because it produces longer import strings
(test.support.some_helper instead of test.some_helper).
This can be addressed by exposing the API in __init__.py though (as does, say,
the unittest package
Chris Jerdonek added the comment:
In working on the patch for this issue, I also noticed that there is a minor
error in the documentation of the replace_whitespace attribute.
The docs say that string.whitespace is used, but the code uses a hard-coded
string and includes a comment explaining
New submission from Chris Jerdonek:
I'm not sure if I'm filing this in the right place since I don't see
hg.python.org in the tracker components list, but if one clicks on the
Browse online link of the Dev Guide here:
http://docs.python.org/devguide/
One is taken to--
http://hg.python.org
Chris Jerdonek added the comment:
Sorry, that link should have been--
http://hg.python.org/cpython/file/1d811e1097ed/Lib/textwrap.py#l12
(hg.python.org seems to default to the 2.7 branch. I just filed an issue about
this.)
--
___
Python tracker
New submission from Chris Jerdonek:
While working on issue 1859, I noticed that textwrap.wrap()'s tab expansion
does not seem to behave sensibly.
In particular, the documentation says, If expand_tabs is true, then all tab
characters in text will be expanded to zero or more spaces, *depending
Chris Jerdonek added the comment:
If people are interested, I filed a new issue (issue 15492) about textwrap's
tab expansion that I noticed while working on this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1859
Chris Jerdonek added the comment:
(3) the branch name should be diplayed somewhere on the page when
browsing (or better yet, also in the URL itself).
This seems to be a bug in hgweb, and you should report it upstream.
I filed an issue for this upstream as you suggested:
http
New submission from Chris Jerdonek:
This issue is to move test/support.py into a test.support subpackage as
discussed in issue 15403.
This can be done post-release.
--
components: Tests
messages: 166848
nosy: cjerdonek, ncoghlan, pitrou
priority: normal
severity: normal
status: open
Chris Jerdonek added the comment:
Sounds good. Later today I will create an issue to move test/support.py into a
test.support subpackage post-release.
We can continue the discussion of how to organize it there.
--
___
Python tracker rep
Chris Jerdonek added the comment:
If people are okay with populating test/support/__init__.py with code (at least
initially), the first patch could be to move support.py into
test/support/__init__.py. One nice thing about this approach is that the
calling code won't need to change
Chris Jerdonek added the comment:
Later today I will create an issue to move test/support.py into a
test.support subpackage post-release.
I created issue 15494 for this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
New submission from Chris Jerdonek:
This issue is to correct the list of whitespace characters to replace in the
documentation for the textwrap module's TextWrapper.replace_whitespace
attribute.
The documentation says this list is string.whitespace:
http://docs.python.org/dev/library
New submission from Chris Jerdonek chris.jerdo...@gmail.com:
This issue is to add code object to the documentation glossary, as discussed
in issue 15457 regarding the documentation around generators.
This can be a minimal entry that links to the details here, for example--
http
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
I created issue 15476 to add code object to the glossary.
Generator functions must have a special __call__ method that simply creates
and returns a generator instance with the code object attached (instead of
executing the code
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
We may also add a function to change these limits at runtime.
This sounds like a good idea. Is there already an issue for this? If not, I
could create one.
Regardless of whether MAX_STRING_LENGTH is increased, my instinct
New submission from Chris Jerdonek:
This issue is to allow the MAX_STRING_LENGTH limit defined in
Python/traceback.c to be changed at runtime, as discussed in issue 15463, as
well as the two related limits:
#define MAX_STRING_LENGTH 100
#define MAX_FRAME_DEPTH 100
#define MAX_NTHREADS 100
Chris Jerdonek added the comment:
There is no such issue. You can create it: add me to the nosy list.
I created issue 15479 to allow the limits to be changed at runtime.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15463
Chris Jerdonek added the comment:
The purpose of the test is to check that the traceback is correct:
it's important to check that the filename ends with threading.py.
I agree with you. That is why I argued against including or '...' logic in
the current test.
Changing
Chris Jerdonek added the comment:
Here is a patch to the tests that allows the tests to pass when the install
path is long while still checking that file names show up correctly in the
traceback.
One advantage of this patch's approach is that it provides a way to test the
rendering of long
Chris Jerdonek added the comment:
Terry, if when reviewing my patch for issue 15457, you also have time to review
this much simpler patch (also in the documentation on generators), I would
appreciate it. If not, that's okay.
--
nosy: +terry.reedy
Chris Jerdonek added the comment:
Is there any way I could assist in closing this, perhaps by preparing patches
for the Distutils and Distutils2 components? Can someone point me to where the
changes to those components should be made (e.g. where they are located
Chris Jerdonek added the comment:
Thanks, Martin. Should Distutils2 be removed from the Components list of the
tracker form, then? Or was Éric referencing a third-party location?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Chris Jerdonek added the comment:
I don't have a problem with closing this as rejected if Victor agrees.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15479
Chris Jerdonek added the comment:
No. Please stick to one issue at a time, and distutils2 may come back (google
for details).
I was asking only to determine whether to create a new issue -- not to have
that issue addressed here.
It seems to me there are missing words in the text
Chris Jerdonek added the comment:
Hmmm, in your original description you say that the 'generator.__next__'
documentation should be changed, but in the patch the note applies to all
generator methods.
Thanks, Meador. Yes, I realized that later. Retitling now. I will also add
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
That is one way to do it. But it would be better to use a local variable
rather than an attribute of the class (because otherwise you have to worry
about resetting the value if more than one test uses the same pattern).
Something
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +cjerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1234674
___
___
Python-bugs
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Hi Ned, you committed two of my Dev Guide patches in the recent past. I was
wondering if you would be willing to commit this one as well. Thanks a lot.
--
___
Python tracker rep
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks, Ned! Renaming the issue title to be more specific.
--
keywords: -easy, patch
title: Developer Guide doesn't get updated once a day - Dev Guide update hook
broken
___
Python tracker
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Updating patch to include documentation changes.
--
keywords: -patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file26551/issue-15450-2.patch
___
Python tracker rep
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
The idea also to include a romanization is a good one.
While working on issue 15437, it occurred to me that storing the names in a
structured form might come in handy. This would let us do things like list the
username(s) associated
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks a lot for the excellent feedback. I'll update the patch to incorporate
it.
One background note: I tried not to be too strict about using generator
iterator or generator function in place of generator in the general docs
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Attaching updated patch incorporating feedback.
It would be nice to have a good term for the generator function code object
associated with a generator to distinguish it from the original generator
function as you point out
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Here is an even simpler failing test case:
from textwrap import wrap
wrap(a\nb, replace_whitespace=False)
['a\nb']
It should return--
['a', 'b']
I will start working on this issue by assembling formal test cases.
--
nosy
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +eli.bendersky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15450
___
___
Python
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
def wrap_paragraphs(text, width=70, **kwargs):
return [line for para in text.splitlines() for line in
textwrap.wrap(para, width, **kwargs)]
I just want to point out that, at least for the purposes of this issue, I don't
believe
New submission from Chris Jerdonek chris.jerdo...@gmail.com:
Currently, filecmp.dircmp's report(), report_partial_closure(), and
report_full_closure() methods all only allow printing to stdout.
This issue is to provide some way for the caller to control the stream to which
these methods print
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Sounds good. And for the record, new issue created here: issue 15454
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15269
New submission from Chris Jerdonek chris.jerdo...@gmail.com:
I haven't tracked down the reason for this, but certain index entries seem to
be getting skipped in the Glossary. If you view source on the Glossary page
and search for index-:
http://docs.python.org/dev/glossary.html
You
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
This is a very simple patch.
--
keywords: +patch
Added file: http://bugs.python.org/file26525/issue-15355-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15355
New submission from Chris Jerdonek chris.jerdo...@gmail.com:
The documentation on generators (outside of PEP 255) does not currently educate
the reader on the more specific generator function and generator iterator
terminology, or at least not in any consistent or systematic way.
For example
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15355
___
___
Python
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Attaching patch.
--
keywords: +patch
Added file: http://bugs.python.org/file26526/issue-15457-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15457
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
It occurs to me that the filecmp/dircmp tests in Lib/test/test_filecmp.py would
also benefit from code like this (i.e. being able to create a nested directory
of files in one or two lines). And perhaps elsewhere in the tests
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Adding a patch with a failing test for the issue.
--
keywords: +patch
stage: - needs patch
Added file: http://bugs.python.org/file26531/issue-15450-failing-test.patch
___
Python tracker rep
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Attaching full patch (though Misc/NEWS would need to be moved a new section is
created for pre-alpha).
--
Added file: http://bugs.python.org/file26532/issue-15450-1.patch
___
Python tracker
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15450
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Actually, this should also be documented.
--
stage: patch review - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15450
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
For discussion purposes, I'd like to mention an alternate approach. (I haven't
yet formed an opinion on what approach is preferable.)
Python's built-in print() function accepts more than just a 'file' keyword
argument:
http
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
This might be obvious to some people, but for background purposes, this seems
to be where the file name gets truncated (in the dump_frame() function):
write(fd, \, 1);
dump_ascii(fd, code-co_filename);
write(fd, \, 1
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
In your test, is there a reason you don't need to verify that your callback is
actually called?
+def cb(packet):
+ self.assertGreater(len(packet), 0)
+ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Is there a reason not to correct that spelling in this issue? Otherwise, we
could create a new issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15444
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
To be clear on this issue's scope, I would state in a single comment a white
list of which directories or individual files are being corrected (or if
necessary, the rules to determine such a list, e.g. any file whose name root is
NEWS
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks a lot, Eli, and for the suggestions. I would be happy to prepare a full
patch.
Regarding the stream argument, I think there are other changes to dircmp that
would be more useful (e.g. issue 12932), but I agree that some form
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Antoine, does the latest patch look okay to you, or did you want something even
more minimal (e.g. by defining and acquiring the lock directly in main)?
--
___
Python tracker rep
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks, Antoine. Just a note: with that other implementation I think the call
to pending.close() would probably also warrant a lock since it appears close()
can't be called either if a generator is already executing (granted
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Attaching a patch to address Eli's requests (1) and (2).
Since this patch merely adds documentation and tests for existing
functionality, is there any reason why this cannot go into Python 3.3? Thanks.
--
Added file: http
New submission from Chris Jerdonek chris.jerdo...@gmail.com:
Currently, the subdirs attribute of filecmp.dircmp does not respect subclassing:
from filecmp import dircmp
class MyDirCmp(dircmp):
... pass
...
my_dcmp = MyDirCmp('dir1', 'dir2')
for item in my_dcmp.subdirs.values
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Hi Nick, I was wondering if you'd have time to take a look at the patches I've
uploaded to issue 15403 and issue 15415 at some point.
Once those are addressed, I think we will be in a much better position to
address most of this issue
New submission from Chris Jerdonek chris.jerdo...@gmail.com:
This issue is to include the names in Misc/ACKS into the documentation --
in place of the names from Doc/ACKS.txt. This was mentioned in the
discussion for issue 15437, which is to add the names from Doc/ACKS.txt
into Misc/ACKS
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
dependencies: +Merge Doc/ACKS and Misc/ACKS
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15439
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
I created a new issue 15439 for including the combined Misc/ACKS into the
documentation (as Éric mentioned) because the nature of that discussion is
different, and because the changes will be easier to observe and understand
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Martin, just to be sure, this is to be done after issue 15437 (a dependency),
and the location of Misc/ACKS will not change. Have you already read the
discussion there? Éric said that he recalled it was Georg's preference to do
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
I did think through those issues and made a special effort to address them in
the script.
For starters, the script does not change the order of any names in Misc/ACKS.
This is to preserve the existing rough alphabetical ordering
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
That is correct, Antoine. Duplicates need to be removed by hand.
To assist in this process, the script currently prints possible duplicates to
stdout after running. However, the script could easily be modified to display
an in-line
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks a lot, Eli.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15231
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
The second sense of the word include is in the possible implementation. Éric
pointed out in the other issue's thread that this can be achieved by modifying
the existing include directive, for example--
--- a/Doc/about.rst
+++ b/Doc
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Yes, I did. Even though it is throw-away.
By the way, I'm taking Antoine's advice to avoid perfectionism on this.
Otherwise I'd include your suggestion re: the special characters
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks for taking the time to look at this, Eli.
In response to your question, here is one illustrated rationale.
When recursing through a directory using dircmp, it is simplest and cleanest to
be able to recurse on the subdirs
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
It seems to be the latter: Žiga Seilnacht
http://mail.python.org/pipermail/python-dev/2007-March/071786.html
--
nosy: +cjerdonek
___
Python tracker rep...@bugs.python.org
http
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Is that a -0 then, Raymond?
I think either the combined Misc/ACKS list should be included in the docs, or
it should be removed entirely. If what Meador said is true (that people
already in Misc/ACKS who contribute documentation
1301 - 1400 of 1573 matches
Mail list logo