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

Inconsistent TOC subtraction behavior when entry's type is not specified #6688

Closed
rokm opened this issue Mar 19, 2022 · 0 comments · Fixed by #7615
Closed

Inconsistent TOC subtraction behavior when entry's type is not specified #6688

rokm opened this issue Mar 19, 2022 · 0 comments · Fixed by #7615
Assignees

Comments

@rokm
Copy link
Member

rokm commented Mar 19, 2022

For TOC entries with typecode BINARY or DATA, unique_name does os.path.normcase on their name. In Windows, the effect of this is to lowercase the names. This means that on Windows if you try to remove a module with subtraction, giving its name with the same casing as it appears on disk, it will fail:

toc = TOC([('m1', None, None), ('m2', None, None), ('BadModule', None, 'BINARY')])
toc -= [('BadModule', None, None)]
print(toc)
# On Windows: -> [('m1', None, None), ('m2', None, None), ('BadModule', None, 'BINARY')]
# On Linux:   -> [('m1', None, None), ('m2', None, None)]

Originally posted by @plu5 in #6669 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant