-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Straddle Python 2.6, 2.7, 3.3, and 3.4 #166
Conversation
- Move human-centric metadata to top of 'setup()' call. - Add Trove classifiers for supported Python versions. - Use 'find_packages()' + MANIFEST.in to avoid errors in listing modules and packages.
- Remove PY25 cruft. - Selectively apply cleanups from 'python-modernize': - New exception syntax. - Use 'six' to handle module renames. - Use 'six' to handle text / binary stuff. This PR covers most of the work from #66 which falls inside `python` (rather than the Python code generation stuff in 'src').
Use stdlib's 'unittest' instead.
Conflicts: python/google/protobuf/internal/message_factory_test.py python/google/protobuf/internal/reflection_test.py python/google/protobuf/internal/text_format_test.py
Conflicts: python/setup.py
Hi Tres, Thanks a lot for doing all this work. I inherited maintenance of the protobuf-Python code at Google several months ago, and these changes represent a lot of the direction we want to move in (better Python 3 support, dropping google-apputils dependency, improving setup.py and integration with standard Python packaging). Unfortunately -- and I'm really sorry about this -- I think there are some problems that will prevent us from being able to merge these changes right now:
@parameterized.Parameters(
(unittest_pb2),
(unittest_proto3_arena_pb2))
class MessageTest(googletest.TestCase):
def testExtremeFloatValues(self, message_module):
message = message_module.TestAllTypes()
# etc. I will merge our internal changes back to GitHub as soon as I can, though it might be a couple weeks. Hopefully at that point we can find a way to merge with your changes. Thanks, |
Wanted to ping this PR -- we're now free to drop Python 2.5 compat! Don't know if you saw. If you're willing to bring this PR up to date, I'm really interested in merging Python 3 support now that we don't need 2.5. |
@haberman ATM, my itch is scratched by 3.0.0a1, which supports Python 2.6, 2.7, and 3.4. I still believe that straddling is superior to '2to3', but don't have cycles to update this patch. |
@haberman What work is required to bring that PR up to date? Do you have some tasks in mind? |
The PR currently doesn't merge cleanly, because it's fallen out of date with the tree. Bringing it up to date so it merges cleanly (and the tests pass) would be a good start. |
Uses #161, #162, #163, #164, and #165 as diff base.
Tests for all four supported Python versions run under tox, without the need for
2to3
.