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

Restore console log for Windows #1887

Merged
merged 3 commits into from
Dec 2, 2022

Conversation

duytnguyendtn
Copy link
Collaborator

@duytnguyendtn duytnguyendtn commented Dec 1, 2022

Description

HOOOLLEY CRAP I finally fixed it!!

At some point in the past (probably a year), I completely lost console logging whenever I launched jdaviz in "desktop" mode. I was going to report it as a bug, but no one else was complaining about it, so I figured it was just me. And I've been flying blind ever since!

But then I found a little gem in the python docs:

The difference between console_scripts and gui_scripts only affects Windows systems. console_scripts are wrapped in a console executable, so they are attached to a console and can use sys.stdin, sys.stdout and sys.stderr for input and output. gui_scripts are wrapped in a GUI executable, so they can be started without a console, but cannot use standard streams unless application code redirects them. Other platforms do not have the same distinction.

specifically:

[gui_scripts on Windows] cannot use standard streams unless application code redirects them. Other platforms do not have the same distinction.

Turns out it probably wasn't just me; this probably affected all native windows users, all 2 of us!

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@duytnguyendtn duytnguyendtn added this to the 3.1.2 milestone Dec 1, 2022
@duytnguyendtn duytnguyendtn added bug Something isn't working trivial Only needs one approval instead of two 💤backport-v3.1.x on-merge: backport to v3.1.x labels Dec 1, 2022
@duytnguyendtn duytnguyendtn marked this pull request as ready for review December 1, 2022 20:35
@codecov
Copy link

codecov bot commented Dec 1, 2022

Codecov Report

Base: 88.45% // Head: 88.45% // No change to project coverage 👍

Coverage data is based on head (6a238d6) compared to base (5232ca0).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1887   +/-   ##
=======================================
  Coverage   88.45%   88.45%           
=======================================
  Files          95       95           
  Lines       10533    10533           
=======================================
  Hits         9317     9317           
  Misses       1216     1216           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Wow! One of the two users (me) didn't even notice. 😆

Maybe second approval should come from a Mac user...

CHANGES.rst Outdated Show resolved Hide resolved
Co-authored-by: P. L. Lim <[email protected]>
Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

Doesn't seem to change anything on the mac side, glad to see this back on windows!

@duytnguyendtn duytnguyendtn merged commit 4366f75 into spacetelescope:main Dec 2, 2022
@duytnguyendtn
Copy link
Collaborator Author

Thanks for the eyes!

@lumberbot-app

This comment was marked as resolved.

@duytnguyendtn
Copy link
Collaborator Author

duytnguyendtn commented Dec 2, 2022

Ugh... backport failed... @pllim as the second other windows jdaviz user, is this bugfix worth the backport?

@pllim
Copy link
Contributor

pllim commented Dec 2, 2022

Since it is there for a loooong time and no one complained, probably don't have to backport. 😆

pllim added a commit that referenced this pull request Dec 6, 2022
Move changelog entry for failed backport #1887
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Ready for final review trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants