Visitar URL original
Detect modules that aren't python files or directories in whats_left by verhovsky · Pull Request #2405 · RustPython/RustPython · GitHub
The Wayback Machine - https://web.archive.org/web/20260616103140/https://github.com/RustPython/RustPython/pull/2405
Skip to content

Detect modules that aren't python files or directories in whats_left#2405

Merged
coolreader18 merged 1 commit into
RustPython:masterfrom
verhovsky:detect-more-modules
Jan 23, 2021
Merged

Detect modules that aren't python files or directories in whats_left#2405
coolreader18 merged 1 commit into
RustPython:masterfrom
verhovsky:detect-more-modules

Conversation

@verhovsky

@verhovsky verhovsky commented Jan 23, 2021 •

Copy link
Copy Markdown
Contributor

There are a number of modules that weren't being checked by the script such as zlib, it's actually missing a bunch of constants. This adds 877 more lines to the output of whats_left.sh (see this txt: new_whats_new.txt)

These are the modules ModuleScanner finds that pkgutil doesn't.

['_abc', '_ast', '_bisect', '_blake2', '_codecs', '_collections', '_csv', 
'_datetime', '_elementtree', '_functools', '_heapq', '_imp', '_io', 
'_locale', '_md5', '_operator', '_peg_parser', '_pickle', 
'_posixsubprocess', '_random', '_sha1', '_sha256', '_sha3', '_sha512', 
'_signal', '_socket', '_sre', '_stat', '_statistics', '_string', 
'_struct', '_symtable', '_thread', '_tracemalloc', '_warnings', 
'_weakref', 'array', 'atexit', 'binascii', 'builtins', 'cmath', 'errno', 
'faulthandler', 'fcntl', 'gc', 'grp', 'itertools', 'marshal', 'math', 
'posix', 'pwd', 'pyexpat', 'select', 'spwd', 'sys', 'syslog', 'time', 
'unicodedata', 'xxsubtype', 'zlib']

I wrote up what's better about this method on StackOverflow https://stackoverflow.com/a/65855109

@verhovsky verhovsky force-pushed the detect-more-modules branch from 5ce405f to 5c42485 Compare January 23, 2021 03:31
@verhovsky verhovsky changed the title Detect modules that aren't in sys.path in whats_left Detect modules that aren't python files or directories in whats_left Jan 23, 2021

@coolreader18 coolreader18 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work!

@coolreader18 coolreader18 merged commit 92bfa2e into RustPython:master Jan 23, 2021
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.

2 participants