Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

PR to clean up global state in thriftpy.parser.parser?Β #268

@kurtbrose

Description

@kurtbrose

https://github.com/eleme/thriftpy/blob/develop/thriftpy/parser/parser.py#L479-L481

there is global state in thriftpy.parser.parser

Specifically, if an exception is raised by parser.parse(data), thrift_stack.pop() never happens and "dead" modules are left in the thrift_stack global.

I'd love to migrate our usage off of facebook thrift and onto thriftpy. However, the non-reentrancy of the parser is a problem. I am happy to fix it, but from a maintainability perspective I don't want to migrate us onto a fork.

Would you be open to a PR that makes the parser more object oriented and removes global state?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions