[issue10957] Python developer FAQ grammar error

2011-01-21 Thread Jerry Seutter

Changes by Jerry Seutter :


--
title: Python FAQ grammar error -> Python developer FAQ grammar error

___
Python tracker 
<http://bugs.python.org/issue10957>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10957] Python FAQ grammar error

2011-01-21 Thread Jerry Seutter

Jerry Seutter  added the comment:

I agree with what Rafe said.

--

___
Python tracker 
<http://bugs.python.org/issue10957>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10957] Python FAQ grammar error

2011-01-20 Thread Jerry Seutter

New submission from Jerry Seutter :

Section 4.1 of the Python FAQ (http://www.python.org/dev/faq/) contains a 
grammar error:

The sentence I am referring to says: "If you are developing on OS X for Python 
2.x and will not be working with the OS X-specific modules from the standard 
library, then consider using the --without-toolbox-glue flag to faster 
compilation time."

How about instead: "If you are developing on OS X for Python 2.x and will not 
be working with the OS X-specific modules from the standard library, then 
consider using the --without-toolbox-glue flag for a faster compile."

(Note: Taken from the FAQ as of Jan 20, 2011)

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 126626
nosy: docs@python, jerry.seutter
priority: normal
severity: normal
status: open
title: Python FAQ grammar error
versions: Python 3.2

___
Python tracker 
<http://bugs.python.org/issue10957>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8911] regrtest.main should have a test skipping argument

2010-12-11 Thread Jerry Seutter

Jerry Seutter  added the comment:

Hi Tarsis,

I looked at your patch.  It looks like it only does step 1 and doesn't move 
away from parse_command_line directly modifying sys.argv.  Was this the patch 
file that you intended to upload?

--

___
Python tracker 
<http://bugs.python.org/issue8911>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8911] regrtest.main should have a test skipping argument

2010-07-28 Thread Jerry Seutter

Jerry Seutter  added the comment:

Hi Brett (and others)

I'm thinking of making the following changes:

1. In Lib/test/regrtest.py, move command line parsing out of main() into a 
function called parse_command_line()

2. parse_command_line() will parse command line settings and store them in a 
dictionary that can be passed in as **kwargs to main().

3. The "exclude" parameter that main takes in will be modified to take a list.  
This list contains a list of tests to be skipped.

4. Update importlib/test/regrtest.py to call main() without doing sys.argv[] 
hacking.

5. The command line interface will remain unchanged.  If regrtest.py is called 
without the --exclude flag, the tests supplied on the command line will be 
interpreted as the tests to run.  If --exclude is supplied, the tests on the 
command line will be interpreted as the tests to _not_ run.

6. Switch regrtest.py to use argparse instead of optparse.

Do these look reasonable?

--

___
Python tracker 
<http://bugs.python.org/issue8911>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8911] regrtest.main should have a test skipping argument

2010-07-19 Thread Jerry Seutter

Changes by Jerry Seutter :


--
assignee:  -> jerry.seutter
nosy: +jerry.seutter

___
Python tracker 
<http://bugs.python.org/issue8911>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2010-03-05 Thread Jerry Seutter

Jerry Seutter  added the comment:

I'll break up the patch into multiple files as well.  It will make it easier to 
deal with if I cause a regression.

--

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2010-03-05 Thread Jerry Seutter

Jerry Seutter  added the comment:

I think the latest (v3) patch is in pretty good shape.  You and David have been 
through the changes and the result is a much improved set of changes.  If you 
want (and you're okay with it), I can commit the changes from here and take the 
beating if it makes the buildbots fall over. :)

--

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2010-03-05 Thread Jerry Seutter

Jerry Seutter  added the comment:

I think this issue is going to reoccur every time someone adds a unit test that 
relies on threading.  What do you think about using a buildbot slave to run the 
tests with a non-multithreaded build of python?

--

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2010-03-05 Thread Jerry Seutter

Jerry Seutter  added the comment:

Uploaded a new version of the patch, nothreads_3.patch.

@r.david.murray - Good point about unittest.skipUnless, I didn't know about 
that function.  I removed my decorator and used skipUnless() instead.

@haypo:
test_xmlrpc.py - Modified the URL changes so that now the tests should run 
exactly as before in the multithreaded case.
test_macostools.py - The TESTFN changes are unrelated to the work I am doing.  
I removed them and will file as a separate item in Roundup.

The skip_if_no decorator has been removed and replaced with 
unittest.skipUnless().

test_errno.py - You mentioned that only half the tests use threads.  The file 
has two test methods, both of which use threads.
test_sqlite.py - Fixed so that only tests that require threading are skipped.  
Thank you for the reminder about class decorators.
test_urllib2_localnet.py - I will create an issue in the bug tracker to fix the 
usage of BaseTestCase.  From the svn revision lot it appears the functionality 
in BaseTestCase is there for a reason and I think it should be fixed.
test_support.py:
  - The thread module is now imported once at the top of test_support.
  - The reap_threads() function decorates with a thread cleanup function if 
thread is available, or with a no-op function if thread is not available.  
Added a docstring.
  - Removed "import thread" calls in threading_setup() and threading_cleanup(). 
 Replaced with "if thread" statements.
fork_wait.py - I removed the decorator and use import_module() instead.
test_bz2.py - Modified the import so all but one of the tests run when 
threading is disabled.

test_multiprocessing.py - Modified to use the try: import threading method of 
importing the module.  It's kind of a moot point because the multiprocessing 
module does not exist when python is built without threading.
test_capi.py - test_pendingcalls_non_threaded eventually makes a call to 
testcapi._pending_threadfunc().  testcapi._pending_threadfunc() does not exist 
when python is built without threading.  What I'm trying to say is that both 
tests rely on threading.  I added the skipUnless decorator to both test methods.
test_hashlib.py - Switched to use skipUnless instead.

--
Added file: http://bugs.python.org/file16464/nothreads_3.patch

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2010-03-02 Thread Jerry Seutter

Jerry Seutter  added the comment:

In the test_xmlrpc.py case I changed the value from URL to 'http:' because the 
code that sets URL to a valid url relies on threading.  When threading is 
disabled, URL is set to None and the test will fail.  The two ServerProxy test 
cases that were modified in this way do not actually use the network at all.  
They instead test that the close() method returns None and that the transport() 
method returns the transport passed in to the constructor.  I figured setting 
the url to 'http:' instead of an empty string was more readable.  The reader 
would know that the string was supposed to be a url and that it was utterly 
meaningless in this case.

In the test_macostools.py case, the os.unlink(TESTFN2) call is a copy and paste 
error from the previous test.  This test tried to remove an alias it never 
created, and it failed to check that the destination directory for the alias 
actually was a directory (it only checked that the path existed - in my case it 
was a file, not a directory).  I fixed the test to check that sys.prefix is a 
directory, and then clean up sys.prefix/TESTFN2.

The skip_if_no decorator is not absolutely necessary and could have been 
skipped.  I believe it adds to the readability of the code because with the 
decorator it becomes obvious that the test should skip in some cases.  Perhaps 
this is what import_module() is for - if so, should I document it?  I also 
believe the decorator helps prevent cases where a resource is allocated (like 
creating a directory), then the import_module() call fails and a test artifact 
is left laying around on disk.  Having said that, I do not know if this 
actually happens in any of the tests and so might be a moot point.  

In reference to disliking the naming of skip_if_no(), I do not like the naming 
either.  The decorator attempts to import the module, then raises SkipTest if 
there was an ImportError.  I think it is essential to have the words "import" 
and "skip" in the method name to help indicate what the decorator does.  These 
are names I could live with:

import_or_skip_test('threading')
import_module_or_skip_test('threading')
skip_test_unless_import('threading')

My preference is for the last one.  Let me know which one you like best and 
I'll change the name to that.

--
Added file: http://bugs.python.org/file16418/nothreads_2.patch

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2009-12-10 Thread Jerry Seutter

Changes by Jerry Seutter :


--
stage: needs patch -> patch review

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2009-12-10 Thread Jerry Seutter

Jerry Seutter  added the comment:

The patch makes it so that tests that use threading skip rather than
generate errors when python is compiled --without-threads.

I added a skip_if_no('modulename') decorator to test_support.

Let me know if this patch is too big to review and I'll break it up.  It
is 800 lines.

One thing to note: when threading is disabled, all sqlite3 tests are
skipped.  There are a few test files that do not use threading, but I
couldn't think of an easy way to split them out.

Tested on OS X and Linux.

--
keywords: +patch
Added file: http://bugs.python.org/file15522/nothreads.patch

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7449] A number tests "crash" if python is compiled --without-threads

2009-12-06 Thread Jerry Seutter

Changes by Jerry Seutter :


--
assignee:  -> jseutter
nosy: +jseutter

___
Python tracker 
<http://bugs.python.org/issue7449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3435] trace.py tries to get coverage data from non Python files

2008-10-17 Thread Jerry Seutter

Changes by Jerry Seutter <[EMAIL PROTECTED]>:


--
nosy: +jseutter

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3435>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2430] Stop test_format.py from executing as side effect of import

2008-03-19 Thread Jerry Seutter

New submission from Jerry Seutter <[EMAIL PROTECTED]>:

Changes to test file only, no other changes.

--
components: Tests
files: test_format_to_unittest.patch
keywords: patch, patch
messages: 64148
nosy: jseutter
priority: low
severity: normal
status: open
title: Stop test_format.py from executing as side effect of import
versions: Python 2.6
Added file: http://bugs.python.org/file9784/test_format_to_unittest.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2430>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2423] test_smtplib.py no longer butt slow

2008-03-19 Thread Jerry Seutter

Changes by Jerry Seutter <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file9767/mock_socket.py

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2423>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2423] test_smtplib.py no longer butt slow

2008-03-19 Thread Jerry Seutter

New submission from Jerry Seutter <[EMAIL PROTECTED]>:

Changes only affect test files.

test_smtplib.py before: 39.7s
test_smtplib.py after: 0.8s

socket.getfqdn() calls were causing all the slowness.  Added a
mock_socket.py file to handle some tests.  For other tests that tested
both server side and client side of the smtp libraries, mocked out
socket.getfqdn() only.

--
components: Tests
files: test_smtplib_speedup.patch
keywords: patch, patch
messages: 64058
nosy: jseutter
priority: low
severity: normal
status: open
title: test_smtplib.py no longer butt slow
type: performance
versions: Python 2.6
Added file: http://bugs.python.org/file9766/test_smtplib_speedup.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2423>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2407] warnings.filterwarnings() not isolated between tests

2008-03-18 Thread Jerry Seutter

Jerry Seutter <[EMAIL PROTECTED]> added the comment:

Improved version of the patch that uses context manager to restore old
warning state

Added file: http://bugs.python.org/file9751/warnings_fix_v2.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2407>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2403] Add figleaf coverage metrics

2008-03-18 Thread Jerry Seutter

Jerry Seutter <[EMAIL PROTECTED]> added the comment:

Thanks for the input.

 * ../../python.exe changed to sys.executable.
 * Figleaf is 69kb.  It seems to work fine doing it all in one read()
call.  Should it be chunked?
 * Optparse isn't used, partially because I'm lazy and partly because
I'm not actually parsing the command line, just chopping the first
element off and then passing it off to regrtest.py.  It is the job of
regrtest.py to parse the command line. <-- My opinion
 * traceless.  I think I should remove the file.  Having tests that fail
don't hurt figleaf, as far as I know, so there isn't much point to
avoiding failing tests.

Uploading a new version of the .zip file that uses sys.executable and
does not use traceless.

I don't know if figleaf works on windows and I don't have a system to
test with.

Added file: http://bugs.python.org/file9744/coverage.zip

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2403>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2407] warnings.filterwarnings() not isolated between tests

2008-03-18 Thread Jerry Seutter

New submission from Jerry Seutter <[EMAIL PROTECTED]>:

Some tests were not cleaning up warning filters.  Fixed the problem by
making regrtest.py restore default filters before each module is executed.

This exposed other errors which are also fixed in the patch.

The patch only affects test files.

--
components: Tests
files: warnings_fix.patch
keywords: patch, patch
messages: 63984
nosy: jseutter
priority: low
severity: normal
status: open
title: warnings.filterwarnings() not isolated between tests
versions: Python 2.6
Added file: http://bugs.python.org/file9739/warnings_fix.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2407>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2403] Add figleaf coverage metrics

2008-03-18 Thread Jerry Seutter

Jerry Seutter <[EMAIL PROTECTED]> added the comment:

To test:

1. Unzip the zipfile in the base python directory.  The zipfile will
create Tools/coverage*.
2. cd Tools; patch -p0 README.patch
3. cd coverage
4. ../../python.exe coverage.py

The script will download figleaf, then run regrtest.py.  Any extra stuff
on the command line will be supplied to regrtest.

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2403>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2403] Add figleaf coverage metrics

2008-03-18 Thread Jerry Seutter

Changes by Jerry Seutter <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file9738/coverage.zip

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2403>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2403] Add figleaf coverage metrics

2008-03-18 Thread Jerry Seutter

New submission from Jerry Seutter <[EMAIL PROTECTED]>:

This issue adds support for figleaf unit test coverage information.  The
diffs apply against trunk

--
components: Tests
files: README.patch
keywords: patch, patch
messages: 63975
nosy: jseutter
priority: low
severity: normal
status: open
title: Add figleaf coverage metrics
versions: Python 2.6
Added file: http://bugs.python.org/file9737/README.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2403>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2383] Remove old XXX comment in stat.py

2008-03-17 Thread Jerry Seutter

New submission from Jerry Seutter <[EMAIL PROTECTED]>:

The comment about constants has been unmodified since 1994 (14 years)
and we have yet to support a system that has non-standard constants for
stat().  It can safely be removed.

This patch contains changes to comments only.

--
components: Library (Lib)
files: stat_remove_stale_comment.patch
keywords: patch
messages: 63900
nosy: jseutter
severity: normal
status: open
title: Remove old XXX comment in stat.py
versions: Python 2.6
Added file: http://bugs.python.org/file9721/stat_remove_stale_comment.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2383>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-03-17 Thread Jerry Seutter

Changes by Jerry Seutter <[EMAIL PROTECTED]>:


--
components: +Interpreter Core

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2378>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-03-17 Thread Jerry Seutter

New submission from Jerry Seutter <[EMAIL PROTECTED]>:

Found a bug when trying to integrate figleaf coverage into trunk.  I
have ripped the code down to the smallest subset that still causes the
behaviour.  The code works on the latest release of Python 2.5 but is
broken on trunk.  It comes in two files.  The first is the caller (figleaf):

import os
import sys

def foo(f, e, o):
pass

sys.settrace(foo)

import __main__
execfile('test_broken.py', __main__.__dict__)



The second file is the test (test_broken.py):

# This code breaks on trunk

def test_foo():
class CustomException(Exception):
pass

class SomeClass:
def foo(self):
raise CustomException

# The error only appears with enough nested blocks.
if (True == True):
try:
raise IOError
except CustomException:
pass



It should raise IOError.  When run, it gives the following output:

jerry-seutters-computer:~/code/python/core_wierd_bug_minimal jseutter$
../core/python.exe figleaf
Traceback (most recent call last):
  File "figleaf", line 10, in 
execfile('test_broken.py', __main__.__dict__)
  File "test_broken.py", line 18, in 
test_foo()
  File "test_broken.py", line 15, in test_foo
except CustomException:
UnboundLocalError: local variable 'CustomException' referenced before
assignment
[10019 refs]

--
files: core_wierd_bug_minimal.zip
messages: 63856
nosy: jseutter
severity: normal
status: open
title: UnboundLocalError when trying to raise exceptions inside execfile
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file9716/core_wierd_bug_minimal.zip

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2378>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2193] Cookie Colon Name Bug

2008-02-27 Thread Jerry Seutter

Changes by Jerry Seutter:


--
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2193>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2193] Cookie Colon Name Bug

2008-02-27 Thread Jerry Seutter

Jerry Seutter added the comment:

Heh, I think I should not have gotten involved in this bug. :)  I have a
few comments:

In response to 2.: David M. Kristol in that article is referring to the
original Netscape cookie implementation which is somewhat different from
what is set out in the RFC's.   Now I understand where the difference is.

In response to 6: Yes, I was referring to the NAME part of NAME=VALUE...


So it looks to me like the Python code implements the specification as
set out in the RFC.  I agree with you that there are multiple
implementations (Java and Perl) in wide use that allow behavior not set
out in the RFC.  The question is, do we want to stick the bahavior in
the RFC, or accomodate existing implementations?  My opinion:  I agree
with you.

Can some Python regulars comment on Python's policy in situations like this?

I can throw together a patch if this change would likely be accepted.

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2193>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2193] Cookie Colon Name Bug

2008-02-26 Thread Jerry Seutter

Jerry Seutter added the comment:

Hm.  Your bug doesn't agree with my interpretation of the RFC's.

RFC2109 section 4.1 states that the the cookie name (attr) is of type
"token", which in RFC2068 section 2.2 is defined as any chars excluding
control characters and special characters.  RFC2068 lists special
characters as 
tspecials  = "(" | ")" | "<" | ">" | "@"
 | "," | ";" | ":" | "\" | <">
 | "/" | "[" | "]" | "?" | "="
 | "{" | "}" | SP | HT

... so the ":" in a cookie name should not be allowed.

RFC2965 and RFC2616 (which obsolete the above RFC's) state the same thing.

Either I'm wrong or the other languages you cite are differing from the
RFC.  Do you have any idea why they might be doing that?

--
nosy: +jseutter

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2193>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com