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 __file__ try-catch hack + Comment about __file__ always being absolute in 3.9 #2410

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Oct 16, 2024

I expect the same comment should apply to win32api.GetFullPathName(__file__) but I wasn't completely sure ? (just in case GetFullPathName does something special that might still be worth calling on an absolute path).

Python 3.8 goes EOL at the end of this month. These os.path.abspath can go away then.

@Avasam Avasam force-pushed the Remove-__file__-try-catch-hack branch from 8132c04 to 605ee2d Compare October 16, 2024 06:30
import win32com

# We'd prefer the win32com namespace to be the parent of __file__ - ie, our source-tree,
# rather than the version installed - otherwise every .py change needs a full install to
# test!
# TODO: That sounds like a use-case for editable installs !
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ref #2208

@Avasam Avasam requested a review from mhammond October 18, 2024 18:49
@Avasam Avasam marked this pull request as draft October 18, 2024 21:20
@Avasam
Copy link
Collaborator Author

Avasam commented Oct 18, 2024

Hmm. That 3.9 comment may not be entirely correct. Apparently it's only for the main module. I'll revise this PR later.

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.

1 participant