[issue16786] argparse doesn't offer localization interface for "version" action
Pavel Roskin added the comment: I have tested the patch. It fixes the problem for me. You are right, new programs would just supply translated help to the version action. No effort would be saved. But the programs updated from the deprecated syntax may rely on a separate string list for translating strings found in argparse.py. They would lose the translation for the "--version" help without any warning. Debugging and fixing that would take some effort. -- nosy: +proski ___ Python tracker <http://bugs.python.org/issue16786> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B
New submission from Pavel Roskin: $ echo "'''Simple script'''" >simple-script $ PYTHONDONTWRITEBYTECODE=1 python3 -B -m py_compile simple-script $ ls __pycache__ simple-scriptcpython-35.pyc py_compile should recognize when the user doesn't want the bytecode to be produced. Otherwise, it's not usable in makefiles for a quick code check. See also http://stackoverflow.com/questions/4284313/ -- components: Library (Lib) messages: 252185 nosy: proski priority: normal severity: normal status: open title: py_compile disregards PYTHONDONTWRITEBYTECODE and -B versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue25303> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode
Pavel Roskin added the comment: That's what I have now: check: $(PYTHON) -m py_compile $(SOURCES) rm -f $(addsuffix c, $(SOURCES)) make check python -m py_compile redacted-build redacted-git-diff redacted-git-gc redacted-git-status redacted-init redacted-server redactedbuilder.py rm -f redacted-buildc redacted-git-diffc redacted-git-gcc redacted-git-statusc redacted-initc redacted-serverc redactedb uilder.pyc That's what David is suggesting: check: for file in $(SOURCES); do \ python -c "compile(open('$$file').read(), '', 'exec')" || exit 1; \ done make check for file in redacted-build redacted-git-diff redacted-git-gc redacted-git-status redacted-init redacted-server redactedb uilder.py; do \ python -c "compile(open('$file').read(), '', 'exec')" || exit 1; \ done That's what I could have if I live long enough to see Python 3.6 on my development machine. check: $(PYTHON) -m py_compile --no-output $(SOURCES) make check python -m py_compile --no-output redacted-build redacted-git-diff redacted-git-gc redacted-git-status redacted-init redacted-server redactedbuilder.py If that does not seem like an important improvement, then I can live with what I have. -- ___ Python tracker <http://bugs.python.org/issue25303> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode
Pavel Roskin added the comment: Thank you for the comments. I was annoyed by py_compile making files with names very similar to the original scripts, names that could not even be recognized by shell patterns in .gitignore unless scripts ending with "c" are banned. But that problem is addressed in Python 3. I don't really care what files are in __pycache__, I won't have that urge to remove them. And then I simply was annoyed by the fact that py_compile was ignoring my attempts to suppress its output. Now I understand the reason for that. Migrating to Python 3 would address my original problem with strange looking cache files. I'm going to close this issue. -- nosy: +Pavel Roskin ___ Python tracker <http://bugs.python.org/issue25303> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com