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

Remove obsolete and broken unicode compatibility in pywintypes #2200

Merged

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Mar 12, 2024

Follow-up to #2085 but on side of the exposed C API

UnicodeType is just an alias to str
Closes #697 and closes #756 by simply removing the broken method Unicode.

I couldn't find an immediate pure-python equivalent of UnicodeFromRaw, and the demo E:\Users\Avasam\Documents\Git\pywin32\win32\Demos\BackupSeek_streamheaders.py looks like it still works fine. SO I left that one alone.

Not sure about IsTextUnicode.

I also had to fix the Excel test to work with versions greater than 9, so I could test it myself.

@Avasam Avasam force-pushed the pywintypes-remove-redundant-unicode-alias branch from cf643d2 to b6c856c Compare March 12, 2024 01:35
@Avasam Avasam force-pushed the pywintypes-remove-redundant-unicode-alias branch from b6c856c to b474208 Compare March 12, 2024 01:36
Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

Thanks!

@mhammond mhammond merged commit b622db4 into mhammond:main Mar 12, 2024
16 checks passed
@Avasam Avasam deleted the pywintypes-remove-redundant-unicode-alias branch March 13, 2024 01:46
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.

PyWin_NewUnicode doesn't work correctly on new Python versions pywintypes.Unicode() fails in Python 3
2 participants