[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Glenn Linderman
Glenn Linderman added the comment: Another idea would be to make a notation that looks exactly* like doctests for documentation purposes, but that doctest would not run. Then, non-runnable doctests could be skipped, and runnable ones could be run. This would help keep the runnable code in the

[issue15633] httplib.response is not closed after all data has been read

2012-08-12 Thread Nikolaus Rath
New submission from Nikolaus Rath: Occasionally, the isclosed() method of HTTPResponse instances returns False, even though a preceding read() call returned '' (or something else that evalues to False). This is a problem, because then the corresponding HTTPConnection can still be used to send

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread R. David Murray
R. David Murray added the comment: The point of running the doctests in the docs to to make sure the *docs* are correct, not to make sure Python is correct. So IMO adding them to regrtest is much more trouble than the tiny benefit it would produce for test coverage. On the other hand, having

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15632] regrtest.py: spurious leaks with -R option

2012-08-12 Thread Stefan Krah
Stefan Krah added the comment: I'm attaching a test case. You're right, in test_buffer it's hard to reproduce but I've encountered the "leak" several times in the past months. Today I realized that the "leak" always occurred with format code 'c'. There's this passage in test_buffer: x = ran

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-12 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15632] regrtest.py: spurious leaks with -R option

2012-08-12 Thread Meador Inge
Meador Inge added the comment: I know the title says spurious, but is there a way to reproduce this at all? Can I run a certain suite N times or something? How did you find the problem? -- nosy: +meador.inge ___ Python tracker

[issue15557] Tests for webbrowser module

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Anton. It is looking a lot better now. I still have comments, but because my comments have not been on the substance of the patch and because I am not a core developer, I will defer to others at this point. -- ___

[issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders

2012-08-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue15632] regrtest.py: spurious leaks with -R option

2012-08-12 Thread Stefan Krah
New submission from Stefan Krah: With the -R option, test_buffer.py needs an additional warm-up for the unicode_latin1 cache. Patch attached. -- components: Tests files: warm_latin1_cache.diff keywords: patch messages: 168063 nosy: skrah priority: normal severity: normal stage: patch rev

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the patch, Daniel. Fixed in all versions. -- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4d5ac78a76b by Senthil Kumaran in branch '2.7': Issue #15630: Add an example for "continue" statement in the tutorial. Patch by http://hg.python.org/cpython/rev/a4d5ac78a76b New changeset e855e6c26dfb by Senthil Kumaran in branch '3.2': Issue #1563

[issue15557] Tests for webbrowser module

2012-08-12 Thread Anton Barkovsky
Anton Barkovsky added the comment: Updated, added separate helper methods and 'test' and 'http://www.example.com/' are no longer hardcoded. > The helper methods could default to the most common string arguments so that > you will only need to define and pass the string arguments when the brows

[issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders

2012-08-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15628] Add import ABC hierarchy to docs for importlib

2012-08-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders

2012-08-12 Thread ita1024
New submission from ita1024: On opensuse 12.1, python 3.3 installs its extensions in /usr/local/lib64/python3.3/lib-dynload/, but the .py files are in /usr/local/lib/python3.3/. When launching python 3.3 one gets: Could not find platform dependent libraries Consider setting $PYTHONHOME to [:]

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Georg Brandl
Changes by Georg Brandl : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Eric Snow
Eric Snow added the comment: This smells like a case of where sys.modules got replaced by another mapping, but import.c continues using interp->modules. I won't be able to investigate until tomorrow. -- ___ Python tracker

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Please remove the "... " prompt from the example so that the code is > cut-and-pasteable by people who want to experiment with the example. That is the usual format for docstring examples. See, for example-- http://docs.python.org/dev/library/doctest.html#h

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Daniel Ellis
Daniel Ellis added the comment: Oh, I was keeping with the format of the other examples in the tutorial. Should I remove the prompts from all of them? -- ___ Python tracker ___

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks good. Please remove the "... " prompt from the example so that the code is cut-and-pasteable by people who want to experiment with the example. -- nosy: +rhettinger ___ Python tracker

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Daniel Ellis
Daniel Ellis added the comment: Added basic example for "continue". -- keywords: +patch Added file: http://bugs.python.org/file26775/for_continue_doc.patch ___ Python tracker ___

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Brett Cannon
Brett Cannon added the comment: I don't have time to delve into C debugging right now, but the question is what changed between 3.2 and 3.3 in terms of when an extension module is inserted into sys.modules since that is the issue ATM. Probably some time in gdb starting in the module's init cod

[issue15557] Tests for webbrowser module

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: It still seems like things could be made more DRY. Also, the pattern of having assert_unix_browser() execute various function blocks depending on whether various arguments are not None doesn't seem as clean or scalable as it should be (e.g. if the number of a

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Éric Araujo
Éric Araujo added the comment: Using Python 3 to run Sphinx is tracked in #10224. I thought there was already an issue to make the doctests runnable but can't find it, maybe it was only a discussion on a mailing list a year or two ago. -- nosy: +eric.araujo __

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Georg Brandl
Georg Brandl added the comment: Yeah, once we switch around to using the build Python for this... -- ___ Python tracker ___ ___ Python

[issue15630] Missing "continue" example for "for" loop tutorial

2012-08-12 Thread Daniel Ellis
New submission from Daniel Ellis: Found by Jesse Bikman: On this page, http://docs.python.org/tutorial/controlflow.html there is no example in the code of a "continue" statement (section 4.4). It is explained, but not actually used in code. -- assignee: docs@python components: Documen

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: An example from the output of "make doctest" which fails because Python 2.x is being used: ** File "library/multiprocessing.rst", line 453, in default Failed example: print(p, p.is_alive()

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > the occasional typos can be found by simply run `make doctest` every once > in a while). But doesn't "make doctest" attempt to run the doctests using Python 2.x (because Sphinx does not support Python 3.x). -- _

[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2012-08-12 Thread Floris Bruynooghe
Floris Bruynooghe added the comment: I have no issue with changing the buildhost's zone configuration if that's the right thing to do. Just one more option. Is widening the expected errno in the test a valid thing to do? -- ___ Python tracker

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Georg Brandl
Georg Brandl added the comment: One possibility to avoid tons and tons of failures that have to be fixed is to convert working doctests to the explicit syntax .. doctest:: blah and set doctest_test_doctest_blocks to False in the Sphinx conf.py. -- nosy: +georg.brandl

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Ezio Melotti
Ezio Melotti added the comment: > Can you provide reasons? Regrtest takes already a few minutes to run, adding these tests will make it even slower and the tradeoff might not be worthwhile (I'm assuming that most of the doctests are basic examples that are already well tested, and the occasio

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Ezio Melotti
Ezio Melotti added the comment: > If I understand correctly, do you mean for example that > Lib/test/test_textwrap.py could be responsible for loading > the doctests in Doc/library/textwrap.rst? One advantage of this is that I could explicitly add a test in test_textwrap.py that loads the doct

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: > I'm not sure running these tests as part of regrtest is a good idea. Can you provide reasons? -- ___ Python tracker ___ _

[issue15557] Tests for webbrowser module

2012-08-12 Thread Anton Barkovsky
Anton Barkovsky added the comment: Thanks for the review, I've updated the patch. -- Added file: http://bugs.python.org/file26774/test_webbrowser_v2.patch ___ Python tracker ___

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not sure running these tests as part of regrtest is a good idea. Fixing and/or marking the doctests is a good idea, and having a `make doctest` that reports no error is a desirable goal. When `make doctest` works we could think about adding a regrtest option

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Might it be simpler to run doctest over the rst file from the relevant > unittest? (Perhaps with help from test.support.) If I understand correctly, do you mean for example that Lib/test/test_textwrap.py could be responsible for loading the doctests in Doc

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: One option for whitelisting files would be to subclass doctest.DocTestParser and pass an instance as the parser argument to doctest.DocFileSuite: http://docs.python.org/dev/library/doctest.html#doctest.DocFileSuite The custom parser could look for the per-file

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Might it be simpler to run doctest over the rst file from the relevant unittest? (Perhaps with help from test.support.) -- nosy: +sbt ___ Python tracker

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
New submission from Chris Jerdonek: This issue is to start running (at least some of) the doctests in the Doc/ folder's *.rst files as part of regrtest. We will need a whitelist mechanism to tell regrtest which files to process since currently many doctests are not runnable (e.g. some kind of

[issue15605] Explain sphinx documentation building in devguide

2012-08-12 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue7652] Merge C version of decimal into py3k.

2012-08-12 Thread Stefan Krah
Stefan Krah added the comment: I'm almost done with my (second) self-review of mpdecimal.c. The only functions missing are all Karatsuba functions and mpd_qpowmod(). If there are any takers, I would be very happy. For the Karatsuba functions you'll probably need Roman Maeder's paper, which I cou

[issue10486] http.server doesn't set all CGI environment variables

2012-08-12 Thread Berker Peksag
Changes by Berker Peksag : -- versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-08-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue7652] Merge C version of decimal into py3k.

2012-08-12 Thread STINNER Victor
STINNER Victor added the comment: Is there some remaining work on this issue? Or can it be closed? -- ___ Python tracker ___ ___ Python

[issue10848] Move test.regrtest from getopt to argparse

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: I just discovered that issue 15302, which has a patch awaiting review from a month ago as well as some discussion, is a duplicate of this issue. Would it be possible to leave that issue open (retitling either or both issues if necessary to avoid overlap)? The

[issue15573] Support unknown formats in memoryview comparisons

2012-08-12 Thread Stefan Krah
Stefan Krah added the comment: Thanks, Nick. I'll work on a struct module patch then. At this point for me this is the only satisfying solution. -- ___ Python tracker ___ ___

[issue15573] Support unknown formats in memoryview comparisons

2012-08-12 Thread Nick Coghlan
Nick Coghlan added the comment: We do import modules in the Object/* code if we really need to (Grep for "PyImport_Import" in the Objects dir) It seems to me like this case is rapidly reaching (or has even gone well past) the point where that's the sensible thing to do. A couple of key issues

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2012-08-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +michael.foord versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15589] Bus error on Debian sparc

2012-08-12 Thread Stefan Krah
Stefan Krah added the comment: Closing since the remaining issue is almost certainly a platform bug. -- keywords: -3.2regression, patch resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue15573] Support unknown formats in memoryview comparisons

2012-08-12 Thread Stefan Krah
Stefan Krah added the comment: To be specific, after a quick look the only function from _testbuffer.c that would be needed is unpack_single(). This really does not look very complex. -- ___ Python tracker

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Georg Brandl
Changes by Georg Brandl : -- priority: normal -> deferred blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue15573] Support unknown formats in memoryview comparisons

2012-08-12 Thread Stefan Krah
Stefan Krah added the comment: Martin v. L??wis wrote: > Here is a more formal definition of my last proposal, > > v and w are equal iff > v.shape() == w.shape() and > ((v.format == w.format and v.tobytes() == w.tobytes()) or >v.tolist() == w.tolist()) > if tolist raises an exception for

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Stefan Behnel
Stefan Behnel added the comment: That's the module init code, yes, including the setting of __file__ and __path__ that I mentioned (due to issue13429). Setting at least one of the two is required in previous CPython versions to make relative imports work. -- __

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-12 Thread Eric Snow
Eric Snow added the comment: in ___init__.c:963+, prior to executing the module proper (Python2 and PyPy handling removed): /*--- Module creation code ---*/ __pyx_m = PyModule_Create(&__pyx_moduledef); if (!__pyx_m) {...}; __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_