1. 26 Nov, 2018 1 commit
  2. 09 Nov, 2018 1 commit
  3. 05 Oct, 2018 2 commits
    • Leon Barrett's avatar
      Fix parsing empty Struct Values from Json (#5211) · 9e69594a
      Leon Barrett authored
      * Fix parsing empty Struct Values from Json
      
      This fixes a bug. When parsing a struct from JSON like
          struct = json_format.Parse('{"k": {}}', Struct())
      then the struct's "k" value would end up not initialized, and accessing
      the value would raise an error.
          In[1]: struct['k']
          ValueError: Value not set
      That seems to be because the Struct field of the Value was not set.
          In[2]: struct
          Out[2]:
          fields {
            key: "k"
            value {
            }
          }
      
      This commit makes sure that the Value's Struct field is initialized even
      if the Struct has no values itself.
      
      This commit also extends a test to cover this case.
      
      * Additionally test for empty list
      9e69594a
    • Josh Kelley's avatar
      ParseFromString returns bytes parsed (#5166) · 8d6f8df1
      Josh Kelley authored
      * ParseFromString returns bytes parsed
      
      ParseFromString is documented as returning the number of bytes parsed,
      and the C++ implementation does this, so the Python implementation
      should too.
      
      See #5165.
      
      * Fix docstring
      
      * Add a test for ParseFromString length behavior
      8d6f8df1
  4. 04 Oct, 2018 1 commit
    • Kevin James's avatar
      fix(python): fix deprecated collections.abc usage (#5195) · f50a1f84
      Kevin James authored
      Many classes within collections were moved to collections.abc in Python
      3.3 -- their usage as imported directly from collections is now
      deprecated as of Python 3.7 and will be removed soon.
      
      The fallback import added in this PR can be removed entirely when
      support for versions of Python prior to 3.3 is dropped.
      f50a1f84
  5. 07 Sep, 2018 2 commits
  6. 04 Sep, 2018 1 commit
  7. 14 Aug, 2018 1 commit
  8. 13 Aug, 2018 1 commit
  9. 10 Aug, 2018 1 commit
    • Feng Xiao's avatar
      Fix failing tests. · acd5b05e
      Feng Xiao authored
      1. Fix C++ tests.
        * Add missing files to Makefile.am and fix distcheck in tests.sh
        * Remove BUILT_SOURCES from conformance/Makefile.am.
        * Add some missing override keyword.
        * Add a type cast to int64 because our StrCat() in stubs can't handle size_t.
      2. Fix Java tests.
        * Add missing test dependency on guava in pom.xml.
        * Include newly referenced test data in test resources.
        * Manually fix map_lite_test.proto which is overwritten because it's mapped
          from map_test.proto in google3.
        * Add back "optimize_for = LITE_RUNTIME" which is still needed to keep the
          opensource test passing as it's still running lite tests.
        * Add a type cast in newBuilder() because without it the code doesn't compile
          with openjdk javac 1.8 (the compiler can't figure if it's the right type
          due to complex generic typing).
      3. Fix Python tests.
        * Remove/replace references to <hash_map>.
        * Suppress more warnings in setup.py.
        * Replace incorrect header inclusion for google/protobuf/proto_api.h.
        * Add strings::EndsWith to google/protobuf/stubs/strutil.h because it's
          referenced in the updated python C extension code.
        * Replace proto2 with google::protobuf. The proto2 name is leaked to
          opensource because we removed the subsitition rule for proto2 namespace
          but only fixed C++ source code and forgot to update python C extension code.
      acd5b05e
  10. 09 Aug, 2018 1 commit
  11. 27 Jul, 2018 1 commit
  12. 12 Jul, 2018 1 commit
    • Ben Webb's avatar
      Add Python 3.7 compatibility (#4862) · 0a59054c
      Ben Webb authored
      Compilation of Python wrappers fails with Python 3.7 because
      the Python folks changed their C API such that
      PyUnicode_AsUTF8AndSize() now returns a const char* rather
      than a char*. Add a patch to work around. Relates #4086.
      0a59054c
  13. 03 Jul, 2018 1 commit
  14. 29 Jun, 2018 1 commit
  15. 25 Jun, 2018 1 commit
  16. 30 May, 2018 1 commit
  17. 14 May, 2018 1 commit
  18. 09 Apr, 2018 1 commit
  19. 02 Apr, 2018 1 commit
    • Paul Yang's avatar
      Merge branch (#4466) · c9317434
      Paul Yang authored
      * Fix setup.py for windows build.
      
      * Bump version number to 3.5.2
      
      * Cat the test-suite.log on errors for presubits
      c9317434
  20. 20 Mar, 2018 4 commits
  21. 13 Mar, 2018 1 commit
  22. 06 Mar, 2018 1 commit
  23. 09 Feb, 2018 1 commit
  24. 19 Dec, 2017 1 commit
  25. 14 Dec, 2017 2 commits
  26. 01 Dec, 2017 1 commit
  27. 22 Nov, 2017 2 commits
    • Jisi Liu's avatar
      Update version for 3.5.0.post1 · cf65a794
      Jisi Liu authored
      cf65a794
    • Jie Luo's avatar
      Add _file_desc_by_toplevel_extension back · 45d99a15
      Jie Luo authored
      Add _file_desc_by_toplevel_extension back for compatibility issue with 3.4.1.
      
      _file_desc_by_toplevel_extension is a temporary solution for FieldDescriptor.file.
      FieldDescriptor.file was added in code gen. However, we need to keep it for some time for compatibility reason (with 3.4.1 only). May try to remove it after 2 years.
      45d99a15
  28. 02 Nov, 2017 2 commits
  29. 18 Oct, 2017 1 commit
  30. 11 Oct, 2017 1 commit
  31. 14 Sep, 2017 2 commits