Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-95371: Add support for other image formats(e.g. PNG) to the turtle…#95378

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 12 commits intopython:mainfromrelent95:fix-issue-95371
Jan 2, 2025

Conversation

@relent95
Copy link
Contributor

@relent95relent95 commentedJul 28, 2022
edited by hugovk
Loading

  • Shape.__init__()
    The existing buggy and dead code calling an instance methodTurtleScreen._image() as a class method was removed.(It has never been reached viaturtle.register_shape())

  • TurtleScreen.register_shape()
    The existing redundant code checking the filename extension was removed because the backendtkinter.PhotoImage does that.
    A new pattern for arguments, such asregister_shape("turtle", "turtle.gif") was added to be consistent with cases for polygon shapes.(It will be useful when the filename is quite long, as in case of using a full path.)

  • TurtleScreen.bgpic()
    This already supports other image formats. So only the documentation was changed.

@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Some little spacing nits.

Also, any particular reason to list them in order PGM, PPM, GIF, and PNG?

I'd either put them in some sort of order of "popularity/ease of use" (e.g. "PNG, GIF, PGM, and PPM") or alphabetically ("GIF,PGM, PNG, and PPM").

@relent95
Copy link
ContributorAuthor

  1. Spaces were added as you suggested.
  2. The list of supported formats were taken from the existing tkinter documentation(https://docs.python.org/3/library/tkinter.html). But I like your idea to list popular formats first and I did that.
hugovk reacted with thumbs up emoji

@arhadthedev
Copy link
Member

Mergingmain into this PR to check if#95371 (comment) is necessary:

[...] Because its base version is quite old, I can prepare a new PR if it's required.

hugovk reacted with thumbs up emoji

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Please could you add someversionchanged orversionadded to document the changes/additions at the end of each function?

The next version will be 3.12.

Docs:https://devguide.python.org/documentation/markup/#paragraph-level-markup

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@adorilson

This comment was marked as outdated.

@hugovk

This comment was marked as outdated.

@adorilson

This comment was marked as outdated.

@hugovk

This comment was marked as outdated.

@relent95
Copy link
ContributorAuthor

@adorilson@hugovk I'll continue this work. Sorry for being too late. I updated the document by adding the versionchanged information. Can you review the change?

adorilson and hugovk reacted with heart emoji

@adorilson
Copy link
Contributor

@adorilson@hugovk I'll continue this work. Sorry for being too late. I updated the document by adding the versionchanged information. Can you review the change?

Great news,@relent95 .

Now, the recommendation is that you useI have made the requested changes; please review again to the@bedevere-bot to do his work.

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Thanks, nearly there :)

@relent95
Copy link
ContributorAuthor

@bedevere-bot I have made the requested changes; please review again.

@bedevere-app
Copy link

Thanks for making the requested changes!

@hugovk: please review the changes made to this pull request.

relent95and others added2 commitsDecember 31, 2024 15:33
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@relent95
Copy link
ContributorAuthor

@bedevere-bot I have made the requested changes; please review again.

adorilson reacted with hooray emoji

@bedevere-app
Copy link

Thanks for making the requested changes!

@hugovk: please review the changes made to this pull request.

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Thank you!

adorilson reacted with hooray emoji
@hugovkhugovk merged commite1baa77 intopython:mainJan 2, 2025
41 of 42 checks passed
@relent95relent95 deleted the fix-issue-95371 branchJanuary 3, 2025 00:36
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 8, 2025
…turtle… (python#95378)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@hugovkhugovkhugovk approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@relent95@bedevere-bot@arhadthedev@adorilson@hugovk

[8]ページ先頭

©2009-2025 Movatter.jp