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

[PR #26] When using "gearbox serve" with the "-l <logfile>" argument, sys.stdo… #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

garzola
Copy link

@garzola garzola commented Oct 23, 2022

More information in #26

#…ut gets wrapped in LazyWriter. LazyWriter does not support the full _io.TextIOWrapper interface -- specifically the buffer property. This causes applications, like Kallithea, to crash on started when using the command line log file.

The fix is to make access to the buffer property call open and return the file object. This will cause the file to be created and opened immediately, which LazyWriter was intended to avoid.

…ut gets wrapped in LazyWriter. LazyWriter does not support the full _io.TextIOWrapper interface -- specifically the buffer property. This causes applications, like Kallithea, to crash on started when using the command line log file.

The fix is to make access to the buffer property call open and return the file object.  This will cause the file to be created and opened immediately, which LazyWriter was intended to avoid.
@amol-
Copy link
Member

amol- commented Nov 23, 2022

I'm not sure that exposing the buffer property is the solution, feels more like an hack and also there is no requirement to have a buffer attribute, implementations are not required to expose it ( https://docs.python.org/3/library/io.html#io.TextIOBase.buffer )

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.

None yet

2 participants