Skip to content

gh-135001: Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8' - #135002

Merged
vstinner merged 7 commits into
python:mainfrom
Wulian233:calendar
Jun 9, 2025
Merged

gh-135001: Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8'#135002
vstinner merged 7 commits into
python:mainfrom
Wulian233:calendar

Conversation

@Wulian233

@Wulian233Wulian233 commented Jun 1, 2025

Copy link
Copy Markdown
Contributor

@Wulian233Wulian233 changed the title gh-135001: Change the default parameter value of calendar.HTMLCalendar to utf-8gh-135001: Change the default encoding parameter value of calendar.HTMLCalendar to utf-8Jun 1, 2025
Comment threadLib/calendar.py
Comment threadDoc/whatsnew/3.15.rst Outdated
@picnixz
picnixz marked this pull request as draft June 1, 2025 12:07
@picnixz

Copy link
Copy Markdown
Member

Making it a draft as it's a WIP.

@Wulian233
Wulian233 marked this pull request as ready for review June 1, 2025 13:00
@Wulian233
Wulian233 requested a review from picnixzJune 1, 2025 13:39
picnixz
picnixz previously requested changes Jun 2, 2025
Comment threadLib/test/test_calendar.py
Comment threadLib/calendar.py
@bedevere-app

Copy link
Copy Markdown

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 phrase I 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.

@Wulian233

Copy link
Copy Markdown
ContributorAuthor

The new commit resolves the above review and requires you to confirm that it is resolved. Thanks!

I have made the requested changes; please review again

@bedevere-app

Copy link
Copy Markdown

Thanks for making the requested changes!

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

@bedevere-app
bedevere-appBot requested a review from picnixzJune 2, 2025 08:38
Comment threadDoc/library/calendar.rst Outdated
Comment threadDoc/library/calendar.rst Outdated
Comment threadDoc/library/calendar.rst Outdated
Comment threadDoc/library/calendar.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadLib/calendar.py
Comment threadMisc/NEWS.d/next/Library/2025-06-01-19-45-55.gh-issue-135001.KsBXSl.rst Outdated

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sys.getdefaultencoding() always returns "utf-8", so this PR doesn't change the default encoding. If you want, you can replace sys.getdefaultencoding() with "utf-8". But I don't think that it should be documented.

Comment threadLib/test/test_calendar.py
@Wulian233Wulian233 changed the title gh-135001: Change the default encoding parameter value of calendar.HTMLCalendar to utf-8gh-135001: Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8'Jun 6, 2025
@Wulian233

Copy link
Copy Markdown
ContributorAuthor

sys.getdefaultencoding() always returns "utf-8", so this PR doesn't change the default encoding. If you want, you can replace sys.getdefaultencoding() with "utf-8". But I don't think that it should be documented.

I just using git reset was not the right thing to do, and I apologize for that. I honestly didn’t consider this at the time

I’ve added a news entry, do you think that’s necessary?

@vstinner

Copy link
Copy Markdown
Member

I’ve added a news entry, do you think that’s necessary?

I don't think that it's necessary.

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@vstinner

Copy link
Copy Markdown
Member

test_syntax was failing on the CI. I updated the branch to try to repair the CI.

@vstinner
vstinner merged commit f90483e into python:mainJun 9, 2025
@vstinner

Copy link
Copy Markdown
Member

Merged, thanks.

@Wulian233
Wulian233 deleted the calendar branch June 9, 2025 13:51
lkollar pushed a commit to lkollar/cpython that referenced this pull request Jun 19, 2025
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Wulian233@picnixz@vstinner