This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Refactoring the repr() of the _Environ class (os module)
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Leonardofreua, eric.araujo, lukasz.langa
Priority: normal Keywords: patch

Created on 2021-07-13 22:04 by Leonardofreua, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27128 merged Leonardofreua, 2021-07-13 22:18
Messages (3)
msg397448 - (view) Author: Leonardo Freua (Leonardofreua) * Date: 2021-07-13 22:04
Currently, the repr() code of the _Environ class does many things in a bunched way, making it difficult to read and difficult to determine the result returned by the method.

Therefore, I propose an adjustment in the code to make it more readable, as well as your test.
msg397647 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2021-07-16 18:35
Hello!  I’ve seen your name on a few recent tickets, thanks for contributing and welcome here! 

In general, the CPython project doesn’t do esthetic code changes for their own sake.  Not all code is changed from %-formatting when format is added, not all code using format changes to f-string, and code that works is left alone.  Each change merged takes resources to run tests, build packages, update clones; it changes the history of the files touched (which is important when investigating a bug months or years later); it takes time to review (pre or post-commit); it has the opportunity of introducing bugs.  Therefore, in the absence of a bug to fix or a new feature that is made easier by prior changes, I think this should be closed as not a bug.
msg397888 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-07-20 17:15
New changeset 85fa3b6b7c11897732fedc443db0e4e8e380c8f8 by Leonardo Freua in branch 'main':
bpo-44631: Make the repr() of the _Environ class more readable. (#27128)
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88797
2021-07-20 17:16:06lukasz.langasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-07-20 17:15:49lukasz.langasetmessages: + msg397888
2021-07-16 18:35:23eric.araujosetnosy: + eric.araujo, lukasz.langa

messages: + msg397647
versions: - Python 3.6, Python 3.7, Python 3.8, Python 3.9, Python 3.10
2021-07-13 22:18:08Leonardofreuasetkeywords: + patch
stage: patch review
pull_requests: + pull_request25671
2021-07-13 22:04:27Leonardofreuacreate