Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unvendorize pythonparser (Fixes #108) #117

Merged
merged 8 commits into from
Dec 17, 2018
Merged

Conversation

alanjds
Copy link

@alanjds alanjds commented Oct 25, 2018

Using PyPI version 1.1 for now. Should pass the last failing test as soon as m-labs/pythonparser#20 got fixed upstream.

The from '__go__'... syntax got implemented via a monkeypatch on pythonparser.parser.Parser. It should be not on upstream as it is clearly not a standard Python syntax, but is there a cleaner way besides a monkeypatch?

I tried to extend Parser class, but it is an old-style class on Python 2 :/

See: https://github.com/m-labs/pythonparser/blob/master/pythonparser/parser.py#L352-L357

class Parser:

    # Generic LL parsing methods
    def __init__(self, lexer, version, diagnostic_engine):
        self._init_version(version)
        self.diagnostic_engine = diagnostic_engine

@alanjds alanjds changed the title [WIP] Unvendorize pythonparser (Fixes #108) Unvendorize pythonparser (Fixes #108) Oct 27, 2018
@alanjds alanjds changed the title Unvendorize pythonparser (Fixes #108) [BLOCKED] Unvendorize pythonparser (Fixes #108) Oct 27, 2018
@alanjds alanjds changed the title [BLOCKED] Unvendorize pythonparser (Fixes #108) Unvendorize pythonparser (Fixes #108) Oct 30, 2018
@alanjds alanjds requested a review from a team October 30, 2018 20:09
@alanjds
Copy link
Author

alanjds commented Oct 30, 2018

pythonparser got a new release by @whitequark. Thank you.

Now this is ready for review and merge.

Question: Why is the construction from '__go__/foo' import ... needed/preferred
instead of from __go__.foo import ..., as it is not python-complaint?

@alanjds
Copy link
Author

alanjds commented Nov 11, 2018

Are you all ok with unvendorizing pythonparser? With no complains I am going to merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant