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

Fix Python 3.4 cpp implementation #772

Merged
merged 1 commit into from
Sep 4, 2015

Conversation

dano
Copy link
Contributor

@dano dano commented Aug 28, 2015

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

@haberman
Copy link
Member

Thanks for this! Looks like Travis is failing though?

@dano
Copy link
Contributor Author

dano commented Aug 28, 2015

@haberman Ugh, sorry. I guessed that Python 3.4 would be installed on the Travis machines, but turns out I guessed wrong. Looks like everything is passing now that it's installed from the ppa.

@dano
Copy link
Contributor Author

dano commented Aug 31, 2015

@haberman I just rebased this to pick up the latest upstream changes. After resolving conflicts it looks like everything is still passing. Let me know if any other work is needed prior to merging.

@@ -113,12 +113,14 @@ build_javanano_oracle7() {

internal_install_python_deps() {
sudo pip install tox
# Only install Python2.6 on Linux.
# Only install Python2.6/3.3 on Linux.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.x?

@haberman
Copy link
Member

Besides that one comment change, looks good to me. Thanks!

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>
@dano
Copy link
Contributor Author

dano commented Sep 3, 2015

@haberman Should be good now.

haberman added a commit that referenced this pull request Sep 4, 2015
Fix Python 3.4 cpp implementation
@haberman haberman merged commit 4cb0edd into protocolbuffers:master Sep 4, 2015
@haberman
Copy link
Member

haberman commented Sep 4, 2015

Thanks!

@dano dano deleted the fix_scalar_map branch December 15, 2015 17:48
adellahlou pushed a commit to adellahlou/protobuf that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants