-
Notifications
You must be signed in to change notification settings - Fork 25
Python 3 followup #20
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
base: master
Are you sure you want to change the base?
Conversation
Under Python 3, the dictionary values() call gives a view object that raises RuntimeError if the dictionary is modified while iterating. Technically that also happened under Python 2 if the dictionary itervalues() method was used. This uses a simple _copiedvalues() function to get a standalone list of values efficiently on either version of Python. The recursion functions for find, save/write, and close use this to prevent exceptions. The behavior under Python 2 is unchanged.
|
@PeterShinners Thank you very much for following up on this. Cask has been a great help for us to simplify operations on Alembic files. We like it a lot and have Cask as a dependency for a number of our production tools. We are in the progress add Python 3 support throughout our pipeline to be compatible with VFX Reference Platform CY2020 and up. @rsgalloway Any chance this PR can be merged? That would help us a great deal and I'm sure many more. Thanks in advance. |
|
hey all, thanks for the reminder on this.
|
|
Good feedback, I'll take a pass on the code changes today. I believe I have a personal CLA with the Alembic project, but if I do I set that up many years ago. I'll see what I can find. |
This requires no changes to the cask library itself. But the testing needed a few changes to work on Python 3. This also updates the tests to pass on Windows.
The cleanest way for dictionary.values() to match the Python 2 behavior is to override the DeepDict.values() method directly.
|
I couldn't find any records of a previous Personal CLA. I just submitted a new agreement to the contributor's email but got an error about a missing account. |
Interesting. I assumed this document is still current: Tagging @lamiller0 for more info. |
|
Pete is still covered by a corporate CLA (as I dont believe he has recently changed jobs) FYI: For new personal CLA I've been having them email it to me directly to forward onward. |
Thanks, @lamiller0 good to know. @PeterShinners is the |
|
The |
Two followup commits for the Python 3 migration. See each commit message for more details.