At the PyCon AU sprints, some of the sprinters worked on a plan Chris
Jerdonek and I came up with months ago to convert test.support from a
module into a subpackage.
This plan arose from some nasty test suite hacks in the lead up to the
release of Python 3.3, where some of the pkgutil tests ended up in
test.test_runpy so they could use the package creation infrastructure
I have in there without needing to extract a helper module with a
release imminent.
The scope of the plan covers a few distinct steps:
1. Move Lib/test/support.py to Lib/test/support/__init__.py
(http://bugs.python.org/issue15494)
2. Add a new (documented) test.support.pkg_helper submodule with the
package creation support code (http://bugs.python.org/issue15403 and
http://bugs.python.org/issue15376)
3. Move the pkgutil tests to test.test_pkgutil where they belong
(http://bugs.python.org/issue15358)
4. Move the existing test.script_helper and test.bytecode_helper
support modules into the test.support subpackage and document them (no
issue for that as yet)
These changes would be made on both 3.3 and default, to avoid future
merge conflicts (note that Indra also posted an updated patch for one
pending test suite update to cope with the relocation:
http://bugs.python.org/issue15415)
My main motivation for doing this is to give a bit more visibility to
the helpers that already exist, as well as making them easier to find
when we want to look into the details of what a test is doing. At the
moment, they tend to get lost in the sea of actual test files in the
main test directory.
(Chris and I initially held off on this while waiting for the final
3.2 release, and then that got delayed and it wasn't until Indra,
Michael and Stephen started looking into it at the sprints that I
started paying attention again)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan(a)gmail.com | Brisbane, Australia
Hello,
this is an update on my work and the current status of Coverity Scan.
Maybe you have noticed a checkins made be me that end with the line "CID
#". These are checkins that fix an issue that was discovered by the
static code analyzer Coverity. Coverity is a commercial product but it's
a free service for some Open Source projects. Python has been analyzed
by Coverity since about 2007. Guido, Neal, Brett, Stefan and some other
developers have used Coverity before I took over. I fixed a couple of
issues before 3.3 reached the RC phase and more bugs in the last couple
of months.
Coverity is really great and its web GUI is fun to use, too. I was able
to identify and fix resource leaks, NULL pointer issues, buffer
overflows and missing checks all over the place. Because it's a static
analyzer that follows data-flows and control-flows the tool can detect
issues in error paths that are hardly visited at all. I have started to
document Coverity here:
http://docs.python.org/devguide/coverity.html
Interview
---------
A week ago I was contacted by Coverity. They have started a series of
articles and press releases about Open Source projects that use their
free service Coverity Scan, see
http://www.coverity.com/company/press-releases/read/coverity-introduces-mon…
Two days ago I had a lovely phone interview about my involvement in the
Python project and our development style. They are going to release a
nice article in a couple of weeks. In the mean time we have time to fix
the remaining couple issues. We *might* be able to reach the highest
coverity integrity level! I have dealt with all major issues so we just
have to fix a couple of issues.
Current stats
-------------
Lines of Code: 396,179
Defect Density: 0.05
Total defects: 1,054
Outstanding: 21 (Coverity Connect shows less)
Dismissed: 222
Fixed: 811
http://i.imgur.com/NoELjcj.jpghttp://i.imgur.com/eJSzTUX.jpg
open issues
-----------
http://bugs.python.org/issue17899http://bugs.python.org/issue18556http://bugs.python.org/issue18555http://bugs.python.org/issue18552http://bugs.python.org/issue18551http://bugs.python.org/issue18550http://bugs.python.org/issue18528
Christian
Hi all,
in recent days, there has been a discussion on fedora-devel (see thread [1]) about moving to Python 3 as a default.
I'd really love to hear opinions on the matter from the upstream, mainly regarding these two points (that are not that clearly defined in my original proposal and have been formed during the discussion):
- Should we point /usr/bin/python to Python 3 when we make the move?
I know that pep 394 [2] deals with this and it says that /usr/bin/python may refer to Python 3 on some bleeding edge distributions - supposedly, this was added to the pep because of what Arch Linux did, not the other way round.
As the pep says, the recommendation of pointing /usr/bin/python to Python 2 may be changed after the Python 3 ecosystem is sufficiently mature. I'm wondering if there are any more specific criteria - list of big projects migrated/ported or something like that - or will this be judged by what I'd call "overall spirit" in Python community (I hope you know what I mean by this)?
In Fedora, we have two concerns that clash in this decision - being "First" (e.g. actively promote and use new technologies and also suggest them to our users) vs. not breaking user expectations. So we figured it'd be a good idea to ask upstream to get more opinions on this.
- What should user get after using "yum install python"?
There are basically few ways of coping with this:
1) Just keep doing what we do, eventually far in the future drop "python" package and never provide it again (= go on only with python3/python4/... while having "yum install python" do nothing).
2) Do what is in 1), but when "python" is dropped, use virtual provide (*) "python" for python3 package, so that "yum install python" installs python3.
3), 4) Rename python to python2 and {don't add, add} virtual provide "python" in the same way that is in 1), 2)
5) Rename python to python2 and python3 to python at one point. This makes sense to me from the traditional "one version in distro + possibly compat package shipping the old" approach in Linux, but some say that Python 2 and Python 3 are just different languages [3] and this should never be done.
All of the approaches have their pros and cons, but generally it is all about what user should get when he tries to install python - either nothing or python2 for now and python3 in future - and how we as a distro cope with that on the technical side (and when we should actually do the switch).
Just as a sidenote, IMO the package that gets installed as "python" (if any) should point to /usr/bin/python, which makes consider these two points very closely coupled.
Thank you all for your suggestions and opinions.
Slavek.
--
Regards,
Bohuslav "Slavek" Kabrda.
(*) You can think of a virtual provide as of a "packaging symlink" - adding "Provides: foo" to package makes "yum install foo" install this package, even if this package name is "bar".
[1] https://lists.fedoraproject.org/pipermail/devel/2013-July/186098.html
[2] http://www.python.org/dev/peps/pep-0394/
[3] https://lists.fedoraproject.org/pipermail/devel/2013-July/186186.html
Hi,
I am new to this list and to troubleshooting python. I hope someone can
help me. I am getting this tuple index out of range error while running a
test call to my python code. Not sure what this error really means and was
hoping someone might shed some light on how to fix this. Also was
wondering why much of my .py files are not getting compiled to .pyc upon
first run.. is this unusual or need I not worry?
Running python 2.5.2 on fedora.
Thanks,
Nick
On Tue, 23 Jul 2013 08:22:30 +0200
Antoine Pitrou <solipsis(a)pitrou.net> wrote:
> On Tue, 23 Jul 2013 08:15:29 +0200
> Ronald Oussoren <ronaldoussoren(a)mac.com> wrote:
> >
> > On 23 Jul, 2013, at 2:01, Benjamin Peterson <benjamin(a)python.org> wrote:
> >
> > > We've cheerfully broken the ABI before on minor releases, though if
> > > it's part of the stable ABI, we can't be cavaliar about that anymore.
> >
> > It is not part of the stable ABI. Given that the implementation of
> > PyStructSequence_InitType() in the patch just calls PyStructSequence_InitType2()
> > and ignores the return value you could change the return value of ..InitType().
> >
> > This may or may not break existing extensions using the function (depending on
> > platform ABI details, AFAIK this is not a problem on x86/x86_64), but reusing
> > extensions across python feature releases is not supported anyway.
>
> Not supported? It should certainly be supported accross bugfix
> versions. Otherwise, installing a new bugfix version would force you to
> recompile all independently-installed extension modules.
Ah, but I see that "minor release" was used in the sense of "feature
release". My bad. (Grrr!)
Regards
Antoine.