go-python / go-python/gpython

Upcoming gpython worklist

Abierto
#166 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
1k
Forks
105
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Below is my upcoming worklist I plan to take on in the coming weeks/months:

1. Add stack limit value to `py.ContextOpts` and implement ([Issue 143](https://github.com/go-python/gpython/issues/143))
2. Additions to `py.utils`, including funcs that use `reflect` to auto-populate Go structs from a given `py.Object`
3. Add `exit()` ([Issue 140](https://github.com/go-python/gpython/issues/140))
4. Add a shared set of golden util funcs to `pytest/pytest.go` so the same boilerplate doesn't have to appear for each golden `main_test.go` etc
5. Enhance `examples/multi-context` into a golden test.
6. Add `real`, `imag`, `conjugate` properties to `py.Int`, `py.Float`, `py.BigInt`, `py.Bool` plus tests ([Issue 73](https://github.com/go-python/gpython/issues/73))
7. For cleanliness and organization, I suggest we move all the built-in modules into the `modules` dir. In a future where `gpython` gets traction as an embedded interpreter and more and more modules appear, it makes sense to me that they show up the modules dir, not the project root dir. This is basically just a bunch of dirs moving and a few `import` lines changing. I would be happy to do this first or as soon as makes sense (since something like this is better done sooner than later). I think this is also very helpful (self-documenting) for newcomers to understand the project structure and organization.
8. Introduce `py.ModuleImpl` for `os`, offering support for a few commonly used functions -- e.g. `os.system()`
- This is a security concern (e.g. python web demo). Thinking I add flags to `py.ContextOpts` that correspond to new `py.Method` flags which are checked when a `py.Module` is populated during an initial `py.Context` module import (instantiation).
- I would add tests that test each security mode / flag
9. Add support for `.format` using [pyfmt](https://github.com/slongfield/pyfmt) ([Issue 116](https://github.com/go-python/gpython/issues/116))
- Before doing this, I would appreciate sign-off on `pyfmt` so I don't start investing time into that and then we don't want to add that as a dependency. We can cross this bridge as it comes, but I wanted to express the value here and that `pyfmt` is a natural fit with gpython!
- I left a [note to the dev](https://github.com/slongfield/pyfmt/issues/15)

Also please lmk what order I should do these in if that's something that matters to people. Otherwise, I listed them in the order that makes the most sense to me.

@sbinet @ncw, please lmk how the PRs should show up. By default, I'll do a separate PR for each numbered item (citing the Issue # in the PR)

Drew

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.