Skip to content

Fixed remnant bug from changed behavior in python 2 where int < None … - #186

Open
JacobTerritory wants to merge 1 commit into
shotgunsoftware:masterfrom
territorystudiopipeline:fix_python3_migration_bug_for_SG
Open

Fixed remnant bug from changed behavior in python 2 where int < None …#186
JacobTerritory wants to merge 1 commit into
shotgunsoftware:masterfrom
territorystudiopipeline:fix_python3_migration_bug_for_SG

Conversation

@JacobTerritory

Copy link
Copy Markdown

…would evaluate to False rather than a ValueError. Manifested when openning another user's user folders

…would evaluate to False rather than a ValueError. Manifested when openning another user's user folders
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.55%. Comparing base (2ad3aea) to head (e4ef22a).
⚠️ Report is 42 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #186       +/-   ##
===========================================
+ Coverage        0   32.55%   +32.55%     
===========================================
  Files           0       68       +68     
  Lines           0     7688     +7688     
===========================================
+ Hits            0     2503     +2503     
- Misses          0     5185     +5185     
Flag Coverage Δ
Linux 32.55% <ø> (?)
Python-3.10 32.53% <ø> (?)
Python-3.11 32.54% <ø> (?)
Python-3.13 32.54% <ø> (?)
Python-3.9 32.53% <ø> (?)
Windows 19.63% <ø> (?)
macOS 32.55% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

):
# opening a publish and either not showing work files or the file isn't local
if self.file.version < max_publish_version:
if max_publish_version and self.file.version < max_publish_version:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I understand that the change of behaviour between Python 2 and 3 with Int<None and I agree this fix makes sense.

However, I am unable to find a way to reproduce this problem.

I mean, if max_publish_version is None, that means there are no file_versions with is_published. In this situation, the condition on L54 (and self.file.is_published) will never pass so we never get to this line.

Would it be possible to provide reproduction steps for this issue, please?

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