Skip to content

Remove outdated code#2899

Merged
Ericgig merged 9 commits into
qutip:masterfrom
Mayank447:remove-redundant-code
May 21, 2026
Merged

Remove outdated code#2899
Ericgig merged 9 commits into
qutip:masterfrom
Mayank447:remove-redundant-code

Conversation

@Mayank447

@Mayank447 Mayank447 commented May 14, 2026

Copy link
Copy Markdown
Member

Description
Remove outdated code like checking for Python 3 via sys.version_info, utf 8 encoding declaration, removing distutils which was removed in Python 3.12.

Also updated some of the code to use newer syntax like f-strings in place of %s, with open context manager in place of manually opening and closing a file, replaced os.path with pathlib.

Related issues or PRs
None

AI Tools Usage Disclosure
Opus 4.6 in Antigravity for detecting the outdated code.

@Mayank447 Mayank447 force-pushed the remove-redundant-code branch from 01e8e8b to 165941b Compare May 14, 2026 01:28

@Ericgig Ericgig left a comment

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.

Thank you.
Very refreshing to remove of string formats.

There are still old string formatting in fileio, could you update them while at it.

Comment thread qutip/fileio.py Outdated
Comment thread qutip/bloch.py
Comment thread qutip/fileio.py Outdated
@Mayank447 Mayank447 force-pushed the remove-redundant-code branch from 9834319 to a05a68d Compare May 19, 2026 21:16
@Mayank447 Mayank447 force-pushed the remove-redundant-code branch from a05a68d to 7c3df18 Compare May 19, 2026 21:31
@Mayank447 Mayank447 requested a review from Ericgig May 19, 2026 22:30

@Ericgig Ericgig left a comment

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.

Thank you!

@Ericgig Ericgig merged commit eba09b7 into qutip:master May 21, 2026
14 of 16 checks passed
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