Bug 6857

Summary: add support for python 3.4.2
Product: [Build System, Metadata & Runtime] OE-Core Reporter: wrobell
Component: devtools / tool chainAssignee: Alejandro Hernandez <alejandro.hernandez>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: bluelightning, Mathias.Laurin+yoctoproject.org, meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, ross.burton, sgw
Version: 1.6.2   
Target Milestone: 1.8   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Python 3.4.2 BitBake file
none
Python 3.4.2 native BitBake file
none
Python 3.4.2 manifest generation script
none
Patch for Python 3.4.2
none
Patch for Python 3.4.2
none
Patch for Python 3.4.2
none
Patch for Python 3.4.2
none
Patch for Python 3.4.2
none
Collection of patches for Python 3.4.2
none
Python 3.4.2 manifest generation script
none
Patch to replace Python 3.3.x with Python 3.4.x none

Description wrobell 2014-10-18 04:44:59 UTC
Created attachment 2194 [details]
Python 3.4.2 BitBake file

Python 3.4 was released 6 months ago and it would be nice to have it in Yocto Project.

Attaching BitBake file, patches and manifest generation file.

I believe, this should obsolete Python 3.3.3 (and bug 6831).
Comment 1 wrobell 2014-10-18 04:46:05 UTC
Created attachment 2195 [details]
Python 3.4.2 native BitBake file
Comment 2 wrobell 2014-10-18 04:47:15 UTC
Created attachment 2196 [details]
Python 3.4.2 manifest generation script
Comment 3 wrobell 2014-10-18 04:48:11 UTC
Created attachment 2197 [details]
Patch for Python 3.4.2
Comment 4 wrobell 2014-10-18 04:48:42 UTC
Created attachment 2198 [details]
Patch for Python 3.4.2
Comment 5 wrobell 2014-10-18 04:49:09 UTC
Created attachment 2199 [details]
Patch for Python 3.4.2
Comment 6 wrobell 2014-10-18 04:49:27 UTC
Created attachment 2200 [details]
Patch for Python 3.4.2
Comment 7 wrobell 2014-10-18 04:49:47 UTC
Created attachment 2201 [details]
Patch for Python 3.4.2
Comment 8 wrobell 2014-10-18 04:51:30 UTC
Created attachment 2202 [details]
Collection of patches for Python 3.4.2
Comment 9 wrobell 2014-10-18 04:53:21 UTC
Another reason to obsolete Python 3.3.3 - it does not even start without manifest file update.
Comment 10 wrobell 2014-10-19 18:08:39 UTC
Created attachment 2203 [details]
Python 3.4.2 manifest generation script

Updated the manifest generation script to contain missing modules. Also urllib module needed cleanup (i.e. urlparse.py is moved to urlib/parse.py and urllib2 module is gone).
Comment 11 Saul Wold 2014-10-21 14:38:20 UTC
We don't do updates to stable releases, so I am marking this for 1.8, please 
consider rebasing your patches against 1.8 (Master) and submitting directly to 
the openembedded-core@lists.openembedded.org ML., It would be best if you 
provide the update since you did the work, also it should move/remove the 
3.3.3, as we don't maintain multiple versions (except of course where we do 3.x 
& 2.7 python or GPLv2/GPLv3 versions).
Comment 12 wrobell 2014-10-21 15:03:22 UTC
Hi Saul,

All the patches in the bug are against Python 3.4.2 source code.

I did not create patches against Yocto codebase, because the patch itself would be quite large. It would simply remove Python 3.3 BitBake file, manifest generation script, the manifest file itself and produce (I believe) unreadable changeset against Python 3.3.3 source code patches.

The files attached to this bug are simply drop-in replacement, but unfortunately a person with Git access would have to do removal of Python 3.3.3 files.

However, if you want me to create some kind of mega-patch, then I can do that, of course. Could you confirm, please?
Comment 13 Saul Wold 2014-10-23 15:31:10 UTC
(In reply to comment #12)
> Hi Saul,
> 
> All the patches in the bug are against Python 3.4.2 source code.
> 
> I did not create patches against Yocto codebase, because the patch itself
> would be quite large. It would simply remove Python 3.3 BitBake file,
> manifest generation script, the manifest file itself and produce (I believe)
> unreadable changeset against Python 3.3.3 source code patches.
> 
We typically try to use "git mv" where possibly, but if it's not possible in this case then a large patch set removing one version and replacing with the newer recipe files and patch files will have to do.

> The files attached to this bug are simply drop-in replacement, but
> unfortunately a person with Git access would have to do removal of Python
> 3.3.3 files.
> 
> However, if you want me to create some kind of mega-patch, then I can do
> that, of course. Could you confirm, please?
Yes, if a mega-patch is needed, then please prepare and test that it builds correctly and produces working binaries.  We always appreciate patches from the greater community.
Comment 14 Saul Wold 2014-10-31 22:21:34 UTC
*** Bug 6831 has been marked as a duplicate of this bug. ***
Comment 15 wrobell 2014-11-04 00:00:23 UTC
The patch sent to the mailing list as requested

http://lists.openembedded.org/pipermail/openembedded-core/2014-November/098533.html
Comment 16 wrobell 2014-11-13 20:18:42 UTC
Created attachment 2244 [details]
Patch to replace Python 3.3.x with Python 3.4.x
Comment 17 wrobell 2014-12-11 19:23:09 UTC
Re-assigning to default person. This change is too big and too complex to get it via e-mail in one go. Maintaining it in separate repository is pointless as well. I have no access to your Git repository, so it is hard to take responsibility for work I cannot do.
Comment 18 Ross Burton 2014-12-11 20:34:48 UTC
Surely maintaining a separate repository is exactly the right thing to do if it's too complex for a single patch, and exactly what git is designed for?
Comment 19 wrobell 2014-12-11 20:51:55 UTC
> Surely maintaining a separate repository is exactly the right thing to do if
> it's too complex for a single patch, and exactly what git is designed for?

No, if later you will get multitude of changes, which you will not review properly because of its size.

I doubt you will look into separate repository and review the changes on daily/weekly basis.

I would prefer some branch in official repository, so when a patch is sent to mailing list, then it is accepted or rejected instantly, not after 2-3 months of work.
Comment 20 Ross Burton 2014-12-11 21:09:55 UTC
ross@flashheart ~/Yocto/poky/build (kernel-upgrade)
$ git remote | wc -l
6

And I had a bit of a prune recently.  That's the canonical poky, three official contribution branches, and two other contributors personal clones.

However at the end of the day the method of patch review in the Yocto Project is patches to the mailing list.  Having a public git branch just makes it easier, but isn't a requirement.
Comment 21 wrobell 2014-12-11 21:18:29 UTC
> However at the end of the day the method of patch review in the Yocto Project is patches to the mailing list.

That's my point exactly. I just prefer to send smaller patches (not possible with current status of Python 3 in Yocto, IMHO) and get feedback while I work on something, than sit on it for weeks and then discuss some gigantic patch.

If I clone this on GitHub, who will review the changes, so merge to master is just formality?
Comment 22 Ross Burton 2014-12-11 22:00:32 UTC
If you have something that you think needs an initial review and then future work, send the series tagged with RFC.  If you think it's ready just send the series.  I apologise for lags in review but everyone involved is incredibly busy, which is why sending a series of small patches that individually is easier to review is preferred.
Comment 23 wrobell 2014-12-11 22:34:46 UTC
OK... so there is the patch attached to this bug

1. The patch is too wide for the mailing list thanks to quality Python 3 manifest file and its script, so cannot go back to the mailing list.
2. The patch allows to build and run Python 3 (well... month ago :P).
3. At the moment Python 3 does not work at all in Yocto Linux 1.6 and 1.7 due to incorrect manifest files, which miss crucial modules (I do not know how packages in #6967 are created, but I am 100% sure they are not from Yocto Linux 1.6 and 1.7).
4. I have adjusted few Python 3.3 patches to make them work with Python 3.4. Other Python 3.3. patches, to my current knowledge, are not necessary.

Can we please commit this patch, so there is working version of Python 3 in Yocto Linux?

If it goes through, then I can improve the issues around manifest files (this will require another off the mailing list discussion) and this will allow mailing list flow with the rest of the work.
Comment 25 wrobell 2015-05-07 17:02:55 UTC
There are still problems with the manifest file, i.e.

- urllib.* urllib2.* urlparse.* modules are gone in Python 3, everything is now in urllib package
- asyncio module is missing

Not sure at the moment what else is missing, but please take a look at my manifest file here: https://bitbucket.org/wrobell/dcmod/src/d718a0e611a6969577217139ace495a505787ad4/distro/meta-dcmod/recipes-python/python/python-3.4-manifest.inc?at=master