Closed Avasam closed 6 months ago
An alternative here would be to treat the pythonwin one as canonical and later emit a deprecation warning for the "global" top-level import. This module really only makes sense in the context of MFC, and every import other than the "resource parser" is in pythonwin.
That makes a lot of sense and I applied your suggestion
and later emit a deprecation warning
I don't see an issue emitting one now, deprecation warnings are made to warn ahead of time. But there's always https://docs.python.org/3/library/exceptions.html#PendingDeprecationWarning. Although even that says:
This class is rarely used as emitting a warning about a possible upcoming deprecation is unusual, and DeprecationWarning is preferred for already active deprecations.
Something I noticed.
Pythonwin/pywin/mfc/afxres.py
andwin32/Lib/afxres.py
are perfectly identical and I don't immediately see a technical reason for it. So this PR attempts to deduplicate the modules whilst keeping backwards compatibility. Imports inpywin
have also been updated.