Skip to content
Russell Keith-Magee edited this page Feb 13, 2017 · 8 revisions

So you're looking for inspiration for your Google Summer of Code project application? Here's a collection of ideas to get you started. You don't have to take something from this list; If you've got an interesting idea of your own, feel free to propose it. This is a list of pre-approved ideas.

If you want to propose something of your own, keep in mind that we're looking for contributions to improve BeeWare libraries, not projects that use BeeWare libraries. Proposals to "build an app that does X using Toga" will not be accepted.

Major projects

The two projects we're focussing on for the GSoC are VOC and Batavia. VOC is a transpiler that converts Python code into Java class files so Python code can run in the JVM. Batavia is a bytecode machine, written in Javascript, that allows CPython bytecode to run in a browser.

Despite the different targets, both have very similar project requirements. There is a core engine that converts basic Python syntax into a format that will run in Java or Javascript - but the core language syntax is only a small part of what makes Python "Python".

There's also the behaviour of the builtin data types. If you construct a primitive object (say, a str or int) in Python, you can manipulate it - you can use standard operators (+, -, and so on), and each data type will have a number of methods associated with it (for example, you can call upper() on a string to turn it into upper case). We need to make sure that every data type provided by Python is available to VOC or Batavia, implementing the same behaviour as CPython. In many cases, this will just mean throwing an exception - for example, if you try and subtract anything from a Python str, Python will raise an error, no matter what the other object is. But in other cases, you may need to implement complex logic (for example, the format substitution behaviour of the % operator on a str).

The Python standard library also needs to be implemented. CPython ships with an extensive "batteries included" standard library - it's this library that allows you to do so much with CPython out of the box. In order to have a fully compliant Python implementation, we need to reproduce this standard library. In many cases, we can use the CPython implementation itself (because it's written in Python) - but in other cases, we need to reproduce the interface in native code. For example, the json module in the standard library is written in C; so we need to re-implement the API provided by the json module in pure Python, or write a native implementation using the capabilities of Java/Javascript (for example, we can use the native JSON parser provided by a browser, or the network stack provided by Java).

Implementing the data types and the standard library is a big task. We've implemented many of the common APIs as we've found a need for them - but in order to run any Python code, we need to implement all the APIs. That's what you can contribute as part of the Summer of Code. Pick either Batavia (if you know or want to learn Javascript) or VOC (if you prefer Java) - and then:

  • Complete the implementation of one or more builtin data types. Pick a builtin data type (str, float, int, etc), and work on that data type until the API provided by Batavia/VOC is the same as that provided by CPython. Build a list of all the operations that are valid on a given data type, and all the methods you can invoke on a data type, and work your way down that list, one operator and data type at a time.

  • Implement part of the standard library. Pick a module in the standard library (e.g., json), and re-implement that library. Depending on which library you choose, you may be able to re-use parts of the CPython implementation; or, you may have to start from scratch and write a native implementation of the documented API.

When preparing your proposal, you should nominate which project you're intending to work on (VOC or Batavia), and describe which type(s) or standard library module(s) you're planning to work on. Depending on your level of proficiency with Javascript or Java, you may find that you have enough time to work on more than one data type, or more than one standard library module - if that's the case, suggest as many data types or libraries as you feel you'll be able to manage.

If you want any more details about these projects, jump onto our Gitter channel and ask!

Quickfire list

If these projects aren't of interest to you, here's a selection of project ideas that need more elaboration. All of these could be turned into a full GSoC project - they just need a bit more thought on your part. Again, if you want any more details about any of the projects on this list, jump onto our Gitter channel and ask!

VOC

VOC is the transpiler that converts Python code into Java classifies. It is used to deploy Toga apps on Android.

  • Issue #38 Implement the methods on one or more builtin types (e.g., the methods you can invoke on a dict instance, like keys() and values()
  • Implement a language construct that isn't currently supported, such as context managers or lambdas (e.g., Issue #171 and Issue #347)
  • Issue #348 Integrate the Ouroboros standard library into the build.
  • Issue #74 Implement a part of the Python standard library that requires a native implementation (e.g., httplib)
  • Issue #301 Implement support for asynchronous operations, including yield from and async.
  • Issue #14 Advanced Add support for StackMapFrames in Java class files.
  • Issue #75 Advanced Optimize Java bytecode generated by VOC.

Batavia

Batavia is a CPython bytecode interpreter written in Javascript. It is used to deploy Toga applications into browsers.

  • Issue #46 Implement the methods on one or more builtin types (e.g., the methods you can invoke on a dict instance, like keys() and values()
  • Implement a language construct that isn't currently supported, such as context managers or lambdas
  • Issue #13 Integrate the Ouroboros standard library into the build.
  • Issue #71 Add support for Python 3.6 wordcode format.
  • Issue #410 Implement a part of the Python standard library that requires a native implementation (e.g., httplib)
  • Implement support for asynchronous operations, including yield from and async.
  • Issue #414 Advanced Implement a converter from Python bytecode to ASM.js.
  • Issue #415 Advanced Reimplement the bytecode engine using ASM.js

Ouroboros

Ouroboros is a pure Python implementation of the Python standard library. It is used at runtime by Batavia and VOC.

  • Provide a pure python implementation of one or more modules from the standard library that are implemented in C.
  • Improve the packaging of Ouroboros
  • Create a Python compliance test suite. This could be achieved by porting CPython's test suite into a format that other Python implementations can execute.

Toga

Toga is a cross-platform native widget toolkit.

  • Develop one or more widgets for a supported platform

Colosseum

Colosseum is a pure Python implementation of the CSS box model. It is used by Toga to lay out widgets.

  • Improve CSS standard compliance for the rendering engine.
Clone this wiki locally