Improves #1296.
The problem: in the previous patch, we tweaked the __init__.py files to use
namespaces, but no longer declared ourselves as a namespace package. The
second half was unwise.
Note that this only comes up when installing protobuf alongside another
package that also installs into the google namespace; as of right now, the
only PyPI package that does is googleapis-common-protos, though the GAE SDK
also uses google.appengine. Installing either or both of those alongside this
package now works.
The case that still remains is the upgrade path, which is also what worried me
in #713. It seems that if protobuf 2.6.1 is installed, there's no way to
safely upgrade that to work with a newer protobuf. However, `pip uninstall` &&
`pip install` does the trick.
--allow_oversize_protos=true is passed to bazel build.
When this macro is set, SetTotalBytesLimit is called to remove
the 64MB limit on binary protos when during ParseFromString.
We use six sub-modules that aren't available in old versions. Not specifying
this requirement in the setup will lead to much less readable runtime errors.
It's particuarlly problematic for Mac OSX users because the system comes with
an old six version 1.4.1 by default.
[skip ci]
Also made the Travis build ensure that no warnings
are present.
These builds were previously spewing many warnings,
which was hiding warnings for important things like
accidentally using C++11-only features.
Change-Id: I56caeee9db48bc78756a3e8d7c14874630627037
1, objcect_pair_hook is not supported in python2.6, so duplicated key check is removed in 2.6
2, total_seconds is not suppoted in python2.6, changed to compute seconds directly
Fixes the ScalarMapContainer/MessageMapContainer implementations on
Python 3.4, by dynamically allocating their PyTypeObjects using
PyType_FromSpecWithBases, instead of statically allocating them. This is
necessary because Python 3.4+ disallows statically allocating a class
with a dynamically allocated parent.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>