3 ms·
I've been writing forward compatible py2 code for years using the __future__ imports to ensure proper semantics are preserved. When all my external dependencies
by kevin_thibedeau 11y ago
I've been writing forward compatible py2 code for years using the __future__ imports to ensure proper semantics are preserved. When all my external dependencies have py3 support it becomes a breeze to upgrade using 2to3 and the rare occasional manual fixup.
- py3kthrowa 11y agoAnd your tests will validate nothing was broken, right? You have thorough tests?
- wpietri 11y agoNot sure why this was downvoted. I'm currently still in Python2 and looking to upgrade to Python3. Having solid automated tests is vital for us to do it confidently.
- fahhem 11y agoProbably the snark
- Jach 11y agoBut do you have tests for your tests? Assuming tests are written in Python2, gotta make sure they don't start testing the wrong things when you upgrade them...
- wpietri 11y agoThe way I think of it, the code tests the tests. It's the the same way keys and locks verify each other. Is there some sort of failure mode you're thinking of where I'd still see all the tests run but the test framework would give false success for something?