classification
Title: "will be returned as unicode" reminiscent from Python 2
Type: Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Chitrank-Dixit, Wicken, badochov, cheryl.sabella, docs@python, dorosch, iritkatriel, lukasz.langa, mdk, python-dev, sumagnadas
Priority: normal Keywords: easy, newcomer friendly, patch

Created on 2020-02-21 15:58 by mdk, last changed 2021-09-15 20:37 by lukasz.langa. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18619 closed dorosch, 2020-02-23 13:44
PR 18691 closed Wicken, 2020-02-28 20:01
PR 20551 closed Chitrank-Dixit, 2020-05-31 05:57
PR 26942 closed python-dev, 2021-06-28 23:12
PR 26985 merged badochov, 2021-07-01 22:35
Messages (7)
msg362410 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2020-02-21 15:58
In https://docs.python.org/3/library/calendar.html#calendar.LocaleTextCalendar I read "If this locale includes an encoding all strings containing month and weekday names will be returned as unicode."

`unicode` here is a mention of the `unicode` type from Python 2 which does no longer exists, so the whole sentence can just be removed.

It happen also in the next paragraph, and twice in Lib/calendar.py.

In Python 2:

>>> print type(calendar.LocaleTextCalendar(locale="C").formatmonth(2020, 1))
<type 'str'>
>>> print type(calendar.LocaleTextCalendar(locale="en_US.UTF8").formatmonth(2020, 1))
<type 'unicode'>

In Python 3:

>>> print(type(calendar.LocaleTextCalendar(locale="C").formatmonth(2020, 1)))
<class 'str'>
>>> print(type(calendar.LocaleTextCalendar(locale="en_US.UTF8").formatmonth(2020, 1)))
<class 'str'>
msg370412 - (view) Author: Chitrank-Dixit (Chitrank-Dixit) * Date: 2020-05-31 04:36
I would like to take this issue.
msg371452 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2020-06-13 12:03
@Chitrank-Dixit, thank you for your interest in contributing to CPython.  When looking for an issue to work on, please check that a pull request isn't already open against it.  If there is an open PR, you can contribute by doing a code review.  Please refer to this[1] section of the devguide for tips on reviewing a pull request.

[1] https://devguide.python.org/pullrequest/?highlight=review#leaving-a-pull-request-review-on-github
msg377830 - (view) Author: Sumagna Das (sumagnadas) Date: 2020-10-02 19:21
Can i take on this issue? If yes, what am I supposed to do except for removing those lines which are mentioned?
msg394155 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-05-21 21:00
The open PR updates the docstrings in Lib/calendar.py but the corresponding changes in Doc/ still need to be added.
msg401903 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-09-15 20:36
New changeset a75a2577259a55d816de24a4cca16aad74e02aa5 by Hubert Badocha in branch 'main':
bpo-39710: Remove Python 2-specific sentence from calendar documentation (GH-26985)
https://github.com/python/cpython/commit/a75a2577259a55d816de24a4cca16aad74e02aa5
msg401904 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-09-15 20:37
Thanks for the patch, Hubert Badocha! ✨ 🍰 ✨
History
Date User Action Args
2021-09-15 20:37:37lukasz.langasetstatus: open -> closed
resolution: fixed
messages: + msg401904

stage: patch review -> resolved
2021-09-15 20:36:45lukasz.langasetnosy: + lukasz.langa
messages: + msg401903
2021-07-01 22:35:30badochovsetnosy: + badochov
pull_requests: + pull_request25547
2021-06-28 23:12:50python-devsetnosy: + python-dev
pull_requests: + pull_request25509
2021-05-21 21:00:39iritkatrielsetnosy: + iritkatriel

messages: + msg394155
versions: + Python 3.10, Python 3.11, - Python 3.7, Python 3.8
2020-10-02 19:21:09sumagnadassetnosy: + sumagnadas
messages: + msg377830
2020-06-13 12:03:19cheryl.sabellasetnosy: + cheryl.sabella
messages: + msg371452
2020-05-31 05:57:51Chitrank-Dixitsetpull_requests: + pull_request19795
2020-05-31 04:36:58Chitrank-Dixitsetnosy: + Chitrank-Dixit
messages: + msg370412
2020-02-28 20:01:15Wickensetpull_requests: + pull_request18053
2020-02-28 20:00:10Wickensetpull_requests: - pull_request18050
2020-02-28 19:57:51Wickensetnosy: + Wicken
pull_requests: + pull_request18050
2020-02-23 13:44:29doroschsetkeywords: + patch
nosy: + dorosch

pull_requests: + pull_request17984
stage: needs patch -> patch review
2020-02-22 21:00:22terry.reedysetkeywords: + newcomer friendly
stage: needs patch
versions: + Python 3.7, Python 3.8, Python 3.9
2020-02-21 15:58:28mdkcreate