GeezerVison is showing github.com — [Bug] `python3-bpython-0:0.26-3.fc44.noarch` removes all indentation of pasted code. · Issue #1057 · bpython/bpython
[Bug] python3-bpython-0:0.26-3.fc44.noarch removes all indentation of pasted code. #1057Description1
I want to acquire version information for bugs.kde.org/show_bug.cgi?id=475304#c4. In order to work around discuss.python.org/t/108891, I attempted to paste:
#!/usr/bin/env python3
import rpm, yaml
from datetime import datetime, timezone
from shutil import which
package = which("dolphin")
header = next(
rpm.TransactionSet().dbMatch(
"basenames",
package
)
)
tags = (
"NAME",
"VERSION",
"RELEASE",
"ARCH",
"INSTALLTIME",
"SIZE",
"SIGPGP",
"SOURCERPM",
"BUILDTIME",
"BUILDHOST",
"PACKAGER",
"VENDOR",
)
properties = {}
for name in tags:
value = header[
getattr(
rpm,
f"RPMTAG_{name}"
)
]
if name in (
"INSTALLTIME",
"BUILDTIME"
):
value = (
datetime.fromtimestamp(
value,
timezone.utc
)
.isoformat(timespec="seconds")
.replace(
"+00:00",
"Z"
)
)
properties[name] = value
print(
yaml.safe_dump(
properties,
sort_keys=False,
default_flow_style=False,
)
)
…into:
NAME: python3-bpython
VERSION: '0.26'
RELEASE: 3.fc44
ARCH: noarch
INSTALLTIME: '2026-06-07T18:08:17Z'
SIZE: 1815569
SIGPGP: null
SOURCERPM: bpython-0.26-3.fc44.src.rpm
BUILDTIME: '2026-01-16T08:37:17Z'
BUILDHOST: buildvm-a64-24.rdu3.fedoraproject.org
PACKAGER: Fedora Project
VENDOR: Fedora Project
However, when I do, I observe:
PS /> bpython
bpython version 0.26 on top of Python 3.14.7 /usr/bin/python3
>>> #!/usr/bin/env python3
>>> import rpm, yaml
>>> from datetime import datetime, timezone
>>> from shutil import which
>>> package = which("dolphin")
>>> header = next(
... rpm.TransactionSet().dbMatch(
... "basenames",
... package
... )
... )
>>> tags = (
... "NAME",
... "VERSION",
... "RELEASE",
... "ARCH",
... "INSTALLTIME",
... "SIZE",
... "SIGPGP",
... "SOURCERPM",
... "BUILDTIME",
... "BUILDHOST",
... "PACKAGER",
... "VENDOR",
... )
>>> properties = {}
>>> for name in tags:
... value = header[
File "<bpython-input-30>", line 2
value = header[
^^^^^
IndentationError: expected an indented block after 'for' statement on line 1
>>> getattr(
... rpm,
... f"RPMTAG_{name}"
... )
Traceback (most recent call last):
File "<input>", line 3, in <module>
NameError: name 'name' is not defined
>>> ]
File "<input>", line 1
]
^
SyntaxError: unmatched ']'
>>> if name in (
... "INSTALLTIME",
... "BUILDTIME"
... ):
... value = (
File "<bpython-input-40>", line 5
value = (
^^^^^
IndentationError: expected an indented block after 'if' statement on line 1
>>> datetime.fromtimestamp(
... value,
... timezone.utc
... )
Traceback (most recent call last):
File "<input>", line 2, in <module>
NameError: name 'value' is not defined
>>> .isoformat(timespec="seconds")
File "<input>", line 1
.isoformat(timespec="seconds")
^
SyntaxError: invalid syntax
>>> .replace(
File "<input>", line 1
.replace(
^
SyntaxError: invalid syntax
>>> "+00:00",
('+00:00',)
>>> "Z"
'Z'
>>> )
File "<input>", line 1
)
^
SyntaxError: unmatched ')'
>>> )
File "<input>", line 1
)
^
SyntaxError: unmatched ')'
>>> properties[name] = value
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'value' is not defined
>>> print(
... yaml.safe_dump(
... properties,
... sort_keys=False,
... default_flow_style=False,
... )
... )
{}
>>>
My Environment
-
NAME: powershell
VERSION: 7.6.3
RELEASE: 1.fc44
ARCH: x86_64
INSTALLTIME: '2026-07-10T14:27:59Z'
SIZE: 80457338
SIGPGP: !!binary |
wqsEABYIAF0FgmozBp4JEADNq0PeIm1vNRQAAAAAABwAEHNhbHRAbm90YXRpb25zLm9wZW5wZ3Bq
cy5vcmeWi4zlrtA1yO8xb4OMUSU5FiEErgkVek3oi0l+odXTAM2rQ94ibW8AAKjWAQDWopeT8mCr
wyzNusrdfDlx5zGLi46YyGOQjMCm9TPg1wD/VIKQxf34I+pI8njFm6haTosAu2sJ7zAJ19vIBh+T
Uw4=
SOURCERPM: powershell-7.6.3-1.fc44.src.rpm
BUILDTIME: '2026-06-17T20:27:32Z'
BUILDHOST: bb40358eb1d9
PACKAGER: Gilver E. <[email protected]>
VENDOR: Terra
-
NAME: konsole
VERSION: 26.08.0
RELEASE: 1.fc44
ARCH: x86_64
INSTALLTIME: '2026-08-23T11:58:33Z'
SIZE: 7098104
SIGPGP: null
SOURCERPM: konsole-26.08.0-1.fc44.src.rpm
BUILDTIME: '2026-08-15T20:13:58Z'
BUILDHOST: buildvm-x86-13.rdu3.fedoraproject.org
PACKAGER: Fedora Project
VENDOR: Fedora Project
ActivityPiyush13104 commented on Sep 13, 2026 Hi @beedell-roke ! I'd like to work on fixing this indentation issue with pasted code.
Could you please assign this issue to me? beedell-roke commented on Sep 13, 2026 @Piyush22070, I am not permitted to assign issues. I believe that I would, at the least, need to be indicated as a contributor, although repository membership is likely required. Piyush13104 commented on Sep 14, 2026 Thanks for clarifying! I'll go ahead and start working on the fix. Piyush13104 commented on Oct 15, 2026 Hi @beedell-roke , I've just opened PR #1059 which fixes this indentation issue. It is ready for review whenever the repository maintainers have a chance to look at it! Reacted by Mr Beedell, Roke Julian Lockhart beedell-roke commented on Oct 15, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|