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.

classification
Title: sys.version has double space between month and date
Type: behavior Stage: resolved
Components: Versions: Python 3.10, Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ammar2, epaine, lukasz.langa, pablogsal, sy, terry.reedy
Priority: normal Keywords:

Created on 2020-10-06 03:01 by sy, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg378098 - (view) Author: E. Paine (epaine) * Date: 2020-10-06 08:45
To elaborate on the information given in the title, @sy is referring to the shell start text. More specifically, they are raising a grammatical issue with `sys.version` where there are two spaces between the shortened month form and the date (on my build this is `Sep  5`).

This is not a problem with IDLE and I doubt this is an issue generally, but is it worth nosying Lukasz? (I presume he is the person to ask?)
msg378102 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-06 09:10
>>> sys.version
'3.10.0a1 (tags/v3.10.0a1:8e9afaf, Oct  5 2020, 20:32:52) [MSC v.1927 64 bit (AMD64)]'

I am guessing that the template is leaving spaces for 2 digits.  Intentional?  I see the same thing in local repository debug builds.

Pablo is the release manager for 3.10/11.
msg378128 - (view) Author: E. Paine (epaine) * Date: 2020-10-06 16:53
I just confirmed (compiling the master having changed the system date) that this double space does not occur when the date is double-digits (`Oct 10`), suggesting that this is almost certainly intentional.
msg378129 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2020-10-06 17:22
For reference, this comes from https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Modules/getbuildinfo.c#L45-L46
and is set by the compiler `__DATE__` macro. 

GCC documentation says:

> If the day of the month is less than 10, it is padded with a space on the left.

and MSVC documentation says:

> The first character of date dd is a space if the value is less than 10. This macro is always defined.


So I think we can close this as working-as-intended.
History
Date User Action Args
2022-04-11 14:59:36adminsetgithub: 86118
2020-10-07 22:20:19steve.dowersetstatus: open -> closed
resolution: not a bug
stage: resolved
2020-10-06 17:22:47ammar2setnosy: + ammar2
messages: + msg378129
2020-10-06 16:53:49epainesetmessages: + msg378128
2020-10-06 09:10:51terry.reedysetversions: + Python 3.9
nosy: + lukasz.langa, pablogsal

messages: + msg378102

assignee: terry.reedy ->
type: enhancement -> behavior
2020-10-06 08:45:54epainesetnosy: + epaine
versions: + Python 3.10, - Python 3.9
messages: + msg378098

components: - IDLE
title: Top Sentence Had a Extra Space Between "Oct" and "5" -> sys.version has double space between month and date
2020-10-06 03:09:15sysettitle: Extra Space Between "Oct" and "5" -> Top Sentence Had a Extra Space Between "Oct" and "5"
2020-10-06 03:01:39sycreate