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

merge updates from upstream #1

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Conversation

petri
Copy link
Member

@petri petri commented May 3, 2020

No description provided.

tburmeister and others added 26 commits November 26, 2018 11:38
* add parser support for oneof and map fields.

I'm mostly interested in the parser and not in the C extensions generated so I've improved the parser while keeping its default behaviour intact.
I'm not a C guy so nothing I can help with adding the complete support for the new fields. I do hope it might help folks down the line add the full support.

Commit includes:
* add support for oneof field in parser.
* add support for map fields in parser.
* add capability to disable specific tokens in parser.
* disable the new oneof and map field by default in the parser to make sure the parser works with the C extensions out-of-the-box.
* add informative exceptions for disabled parser tokens.
* simplify the `tokenize` code by creating parsable tokens mapping from name to class.
* change a few function-level variable names to improve clarity

* add a few docstrings

* add testing instructions to the README

* shorten parser class member

* add unittests for the map field and oneof tokens

all parser related unittests grouped under the `test_parser` folder.

* update .gitignore with .pytest_cache

* add flake8 config to `tox.ini` and fix all issues in `parse_proto.py`
* add conftest to build messages and set path prior to collection/running tests

* clean up tests

* update README for testing changes

* edits

* some fixes and version bump

* only write generated cython code if it differs from what's there (to avoid unnecessary compilation)

* add clean argument to compiler to force recompilation of messages
* Prevent name and index collisions in fields and enums

* Add test cases for collisions and invalid field indices

* Check collisions between enum fields and names in current scope

* Add message names to scope checking

* Update templates with changes

* Add test cases for more name collisions

* Fix error

* Fix broken tests

* Resolve scope name in _parse_enum

* bump version
* first steps toward improving custom option handling in parser

* fixed bug in enum default parsing; all tests passing

* cleanup

* bug fix and cleanup - now able to parse some pretty tricky AppNexus messages

* up version

* add quick test for custom options
* use bitmaps to track which fields are set instead of bint fields

* fix perf test

* add test for HasField on message with many fields

* up version
…kage parameter and always defaulting to pyrobuf_generated
This involves modifying unit tests to run similar/identical tests on
proto3 variants where needed, and omitting tests that test
proto2-specific behavior.
The parser does not support oneof in proto2 syntax, although that could
be remedied.  These oneofs conform to the behavior of oneofs in the
upstream implementation, and simply use the fields that are in the
parent message, clearing sibling fields where needed.
Fixed generated egg name not respecting package name parameter
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.

7 participants