-
Notifications
You must be signed in to change notification settings - Fork 38
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
Rewrite Query response class to #306's style #536
Open
PerchunPak
wants to merge
26
commits into
master
Choose a base branch
from
rewrite-query-answer-class
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+290
−235
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d68adea
to
9a2e743
Compare
9a2e743
to
3d8fe41
Compare
3d8fe41
to
482cd59
Compare
…wer-class # Conflicts: # mcstatus/status_response.py
ItsDrike
requested changes
Oct 2, 2023
…r-class # Conflicts: # mcstatus/status_response.py
# Conflicts: # mcstatus/status_response.py
It creates more headache than it would solve.
# Conflicts: # mcstatus/querier.py
We deprecated `status_response`
katrinafyi
added a commit
to rina-forks/mcstatus
that referenced
this pull request
Jul 20, 2024
in anticipation of py-mine#536 Co-authored-by: Perchun Pak <github@perchun.it>
PerchunPak
added a commit
that referenced
this pull request
Jul 27, 2024
* fix crash with one command-line argument * implement ping() on BedrockServer simply measures the latency of status() * support Bedrock servers in CLI done in a slightly ad-hoc way, but this is the best we can do given the split of the response types. * print server kind and tweak player sample printing * JavaServer ping() doesn't work? * fix precommit warnings * review: remove Bedrock ping() * review: change CLI ping comment to be more permanent * review: formalise hostip/hostport within QueryResponse * review: only squash traceback in common errors * review: leading line break for multi-line motd * Revert "review: formalise hostip/hostport within QueryResponse" This reverts commit 3a0ee8c. * review: use motd.to_minecraft() in json * review amendment: factor out motd line breaking * review: refactor CLI json() to use dataclasses.asdict() * amendment: add NoNameservers and remove ValueError from squashed errors ValueError might be thrown by programming errors in json handling, for example. * review: fallback logic in CLI ping since this runs both ping() then status(), it can report precisely when one fails and the other succeeds. some kludgy logic to switch bedrock too. * review: use ip/port fields in CLI's JSON output in anticipation of #536 Co-authored-by: Perchun Pak <github@perchun.it> * review: avoid kind() classmethod * review: clarify MOTD serialisation comment * review: simplify ping fallback logic Co-authored-by: Perchun Pak <github@perchun.it> * make version consistent between status and query * review: apply simplify() to motd in CLI JSON output Co-authored-by: Perchun Pak <github@perchun.it> * review: use separate JSON field for simplified MOTD * review: remove MOTD fixup comment * review: update README with new CLI * review: no raw motd * no --help output in readme * review: allow main() with no arguments * Update mcstatus/__main__.py Co-authored-by: Kevin Tindall <kevinkjt2000@users.noreply.github.com> * avoid json collision * oops! good linter * drike review * good linter * one more ci failure and i turn on the computer * also squash ConnectionError happens during server startup, for example --------- Co-authored-by: Perchun Pak <github@perchun.it> Co-authored-by: Kevin Tindall <kevinkjt2000@users.noreply.github.com>
This needs updating |
Done, I've been busy lately |
ItsDrike
requested changes
Feb 5, 2025
ItsDrike
approved these changes
Feb 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the failing docs need fixing though, but after that, this can be merged
ItsDrike
reviewed
Feb 5, 2025
BTW, docs failing on main too, running bisect on this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: API
Related to core API of the project
status: stale
Has had no activity for a while
type: rewrite
Complete or partial rewrite of a part of the codebase
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I do not propose to release it in v11, as we probably won't merge it in time.
I made d8b26f1 as separate commit in case if you will want to release it with v11, while the main commit here will stay here for a while.
This was easier than I expected actually, most of the work was done in #306.