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

Use appropriate reload method for Py2 or Py3 in tank_api_proxy #855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jlucas
Copy link

@jlucas jlucas commented Aug 16, 2022

We use a setup where the SGTK Pipeline Configuration is on disk, local to each Project. We put install/core/python onto $PYTHONPATH to enable import sgtk. In the process of transitioning to Python 3 we found these incompatible Python 2 reload calls.

The problem could be solved with six.moves.reload_module instead, but I don't know if you want to expect/force the user to have that library in their base environment since it is not part of the standard library.

Avoiding use of the six.py module, since it may not be present in the
user's environment at the time this proxy is imported.
@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #855 (691d2f3) into master (9df4482) will decrease coverage by 6.55%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #855      +/-   ##
==========================================
- Coverage   79.39%   72.83%   -6.56%     
==========================================
  Files         177      177              
  Lines       19303    19303              
==========================================
- Hits        15325    14059    -1266     
- Misses       3978     5244    +1266     
Impacted Files Coverage Δ
python/tank/commands/app_info.py 17.24% <0.00%> (-79.32%) ⬇️
python/tank/bootstrap/import_handler.py 18.18% <0.00%> (-73.74%) ⬇️
python/tank/commands/folders.py 20.00% <0.00%> (-69.10%) ⬇️
python/tank/commands/setup_project.py 17.32% <0.00%> (-66.29%) ⬇️
python/tank/commands/cache_yaml.py 31.57% <0.00%> (-52.64%) ⬇️
python/tank/commands/util.py 37.50% <0.00%> (-37.50%) ⬇️
python/tank/commands/core_localize.py 39.40% <0.00%> (-36.44%) ⬇️
python/tank/commands/unregister_folders.py 12.58% <0.00%> (-36.43%) ⬇️
python/tank/commands/tank_command.py 47.34% <0.00%> (-32.98%) ⬇️
python/tank/commands/install.py 11.38% <0.00%> (-31.71%) ⬇️
... and 42 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jlucas jlucas changed the title Use appropriate reload method for Py2 or Py3 Use appropriate reload method for Py2 or Py3 in tank_api_proxy Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants