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

pyi-makespec ignores --log-level argument #8174

Open
2 tasks done
bersbersbers opened this issue Dec 20, 2023 · 2 comments
Open
2 tasks done

pyi-makespec ignores --log-level argument #8174

bersbersbers opened this issue Dec 20, 2023 · 2 comments
Labels
triage Please triage and relabel this issue

Comments

@bersbersbers
Copy link
Contributor

bersbersbers commented Dec 20, 2023

Description of the issue

Context information (for bug reports)

  • Output of pyinstaller --version: 6.3.0

  • Version of Python: 3.12.1

  • Platform: Windows

  • How you installed Python: scoop

  • Did you also try this on another platform? No

  • try the latest development version? same thing

  • follow all the instructions in our "If Things Go Wrong" Guide

    • start with clean installation
    • use the latest development version
    • [n/a] Run your frozen program from a command window (shell) — instead of double-clicking on it
    • [n/a] Package your program in --onedir mode
    • [n/a] Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
    • [n/a] Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

A minimal example program which shows the error

touch empty.py
pyi-makespec empty.py --log-level ERROR

Stacktrace / full error message

Wrote C:\Code\project\empty.spec.
Now run pyinstaller.py to build the executable.

There should not be any output since no errors occured.

@bersbersbers bersbersbers added the triage Please triage and relabel this issue label Dec 20, 2023
@bwoodsend
Copy link
Member

That's not logging though – it's just a print statement.

Since it doesn't do any logging, I don't think it makes sense for pyi-makespec to accept a --log-level option. I'd rather block that option+command combination and have people pyi-makespec ... > /dev/null (that command never prints anything else) than start guessing generic verbosity levels from logging levels.

@rokm
Copy link
Member

rokm commented Dec 20, 2023

That's not logging though – it's just a print statement.

Since it doesn't do any logging, I don't think it makes sense for pyi-makespec to accept a --log-level option. I'd rather block that option+command combination and have people pyi-makespec ... > /dev/null (that command never prints anything else) than start guessing generic verbosity levels from logging levels.

I was going to say the same - none of the programs from PyInstaller.utils.cliutils really make use of logging (and the stuff they print via print() is more along the lines of command output than messages that belong to categorized logging). I also think we should remove --log-level option from pyi-makespec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Please triage and relabel this issue
Projects
None yet
Development

No branches or pull requests

3 participants