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

[core][cleanup] Refactor and remove old Py2 code checks and methods #3683

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

Conversation

Harshg999
Copy link
Collaborator

@Harshg999 Harshg999 commented Apr 3, 2024

What changes were proposed in this pull request?

  • Remove all Py2 check conditionals.
  • Remove some not-used imports.
  • Streamline file opening code section and remove py2 support.
  • Remove smart_unicode method and change its usage with smart_str wherever required. This also triggered adding an encoding param in the smart_str method for compatibility with smart_unicode switch.

  • Because of all the files modified with above actions, we are also fixing Ruff violations on these files which made this change big.
  • The idea is to merge this as a single commit and have as low regression as possible and if something major comes up, we can try simply reverting to previous state. For minor regressions, we can try fixing on top of this change.

How was this patch tested?

  • Manually and basic Hue testing.
  • Running existing full unit test suite.

Copy link
Collaborator

@amitsrivastava amitsrivastava left a comment

Choose a reason for hiding this comment

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

Thanks for taking this up. It was very much needed.

I could only go through 10% of the changes. I am assuming that you have verified the build and the failures are only due to lint.

@Harshg999 Harshg999 force-pushed the remove-old-code branch 2 times, most recently from 3fa11c9 to 7873dbb Compare May 7, 2024 17:58
@Harshg999 Harshg999 changed the title [cleanup] Remove Py2 related code [core][cleanup] Refactor and remove old Py2 code method and checks May 20, 2024
Copy link

github-actions bot commented Jul 5, 2024

This PR is stale because it has been open 45 days with no activity and is not labeled "Prevent stale". Remove "stale" label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jul 5, 2024
@Harshg999 Harshg999 removed the Stale label Jul 7, 2024
Copy link

This PR is stale because it has been open 45 days with no activity and is not labeled "Prevent stale". Remove "stale" label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Aug 22, 2024
@Harshg999 Harshg999 removed the Stale label Aug 22, 2024
@Harshg999 Harshg999 changed the title [core][cleanup] Refactor and remove old Py2 code method and checks [core][cleanup] Refactor and remove old Py2 code checks and methods Aug 27, 2024
@Harshg999 Harshg999 enabled auto-merge (squash) August 27, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants