LloydZ

Results 20 comments of LloydZ

Thriftpy2 is not suitable for parsing work. Maybe you should use Antlr to write your own visitor for parsing thrift metainfo. https://github.com/antlr/grammars-v4/tree/master/thrift

Could you describe the example of using the parse API that you expect? > Thriftpy2 is convenient that it parses all thrift files at once and we can easily track...

The import error of the native Thrift is also confusing. I think that when the Thrift file is parsed by the parser in thriftpy2, if there is a module attribute...

https://github.com/Thriftpy/thriftpy2/blob/8e82f1c091a9d9db30dc01af25431d06056c3d88/thriftpy2/parser/parser.py#L619-L621 We can extend the `ModuleType`. ```python class ThriftModule(ModuleType): def __setattr__(self, name: str, value: Any) -> None: if getattr(self, name, None): raise AttributeError("...") return super().__setattr__(name, value) ```

https://github.com/Thriftpy/thriftpy2/blob/8e82f1c091a9d9db30dc01af25431d06056c3d88/thriftpy2/parser/parser.py#L82-L84 https://github.com/Thriftpy/thriftpy2/blob/8e82f1c091a9d9db30dc01af25431d06056c3d88/thriftpy2/parser/parser.py#L244-L248 The root cause appears to be that the `p_seen_struct` method overwrites the contents of the originally imported module via `setattr`. Although the current fix resolves this issue, I...

Mako doesn't support the newer Python syntax now, so you should use an `if/else` instead.

Ref: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#configuring-setuptools-using-pyproject-toml-files. Support for [project.license-files](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-files) and SPDX license expressions in [project.license](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license) ([PEP 639](https://peps.python.org/pep-0639/)) were introduced in version 77.0.0.

I've removed the `wheel` dependency during the build process. I can restore it if necessary.

Hi, maintainer. This change submission may not need to be released right now. I can try to fix some other existing issues of Mako.