go-python / go-python/gpython

Upcoming gpython worklist

Đang mở
#166 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
1k
Fork
105
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.