[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks, Glenn.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 57fb5441a4aa by R David Murray in branch 'default':
#15916: if there are no docstrings, make empty suite, not an error.
http://hg.python.org/cpython/rev/57fb5441a4aa

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

Added docs to patch

--
Added file: http://bugs.python.org/file34848/issue15916-with-docs.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

This looks good, however we also need a documentation change indicating the new 
behavior, including a '.. versionchanged:: 3.5' tag, and an entry in 
whatsnew/3.5 in the 'other changes' section.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

I've attached a patch that uses the original default DocTestFinder and does not 
raise an exception when there are no tests.

--
nosy: +Glenn.Jones
Added file: http://bugs.python.org/file34829/issue15916-no-exception.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

Changes by R. David Murray :


--
Removed message: http://bugs.python.org/msg174145

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

Changes by R. David Murray :


--
Removed message: http://bugs.python.org/msg174146

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2012-10-29 Thread Petri Lehtinen

Petri Lehtinen added the comment:

+for key in vars(subnamespace):
+setattr(namespace, key, getattr(subnamespace, key))

There might be even more clever ways to achieve this, but what about at least 
saying "for key, value in vars(subnamespace).items()", and then using the value 
accordingly, to avoid the getattr() call?

--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2012-10-29 Thread Petri Lehtinen

Petri Lehtinen added the comment:

And that comment was meant for totally separate issue, sorry.

--

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2012-10-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2012-10-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Hmm.  This patch still raises the "has no docstrings" ValueError if "not tests" 
is True.  And because the patch changes the default DocTestFinder, it's 
possible that the patch changes behavior in non-error use cases.

Why not just return an empty TestSuite if not tests is True?  IIRC, this was 
the conclusion of the issue 14649 discussion.

--

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2012-10-23 Thread Tuukka Hastrup

Tuukka Hastrup added the comment:

I'm attaching a patch that changes DocTestSuite's default behaviour as 
suggested.

--
keywords: +patch
nosy: +tuukka
Added file: http://bugs.python.org/file27673/issue15916.patch

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2012-09-10 Thread Chris Jerdonek

New submission from Chris Jerdonek:

Currently, calling doctest.DocTestSuite() raises a ValueError if the module 
passed to it has no docstrings.  This was the subject of issue 14649.

This issue is to discuss and possibly change DocTestSuite's behavior not to 
raise an exception in that situation.

In the discussion for issue 14649 (in particular with R. David Murray), it was 
acknowledged that the current behavior probably isn't correct or desirable.  
However, treating the behavior as a bug and fixing it in maintenance branches 
would have been too big of a change.

Thus, if this change is made, it could be slated for the next feature release.

--
components: Library (Lib)
keywords: easy
messages: 170250
nosy: asvetlov, cjerdonek, r.david.murray
priority: normal
severity: normal
status: open
title: change doctest DocTestSuite not to raise ValueError if no docstrings
type: behavior
versions: Python 3.4

___
Python tracker 

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