mhammond / pywin32

Python for Windows (pywin32) Extensions
5.01k stars 792 forks source link

Remove deprecated `win32com.server.exception.Exception` #2142

Closed Avasam closed 6 months ago

Avasam commented 11 months ago

Something I came across. This really ought to be removed to avoid shadowing builtin Exception Note that this can impact users, so it is a "breaking change". Not that it's a hard one to update (change 1 aliased name Exception -> COMException). So it should at least be communicated in a changelog.

Figured with all the recent refactoring it might be a good time.

Not sure what to do with com.win32comext.axscript.server.error.Exception. As far as I can tell, it's unused in pywin32's code, but could maybe be used in downstream code for better com object traceback? I could rename it to avoid the builtin shadowing, but it wasn't previously marked as deprecated/obsolete.

mhammond commented 6 months ago

Not sure what to do with com.win32comext.axscript.server.error.Exception

I'd be super surprised if it is used anywhere, given that the point of using axscript.server would be for other languages to invoke Python code and those other languages really aren't going to have access to this anyway.