mhammond / pywin32

Python for Windows (pywin32) Extensions
4.9k stars 783 forks source link

Remove obsolete and broken unicode compatibility in `pywintypes` #2200

Closed Avasam closed 3 months ago

Avasam commented 3 months ago

Follow-up to https://github.com/mhammond/pywin32/pull/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.