GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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. #1057

New issue
Copy link
New issue
Copy link
Open
#1059
Open
[Bug] python3-bpython-0:0.26-3.fc44.noarch removes all indentation of pasted code.#1057
#1059
Copy link

Description

@beedell-roke
beedell-roke
opened on Sep 12, 2026
Issue body actions

1

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

Footnotes

  1. chatgpt.com/s/p_6aa58aef674c8191b00358e3cca801ef 2 ↩

  2. chatgpt.com/share/6aa58ab2-8448-83eb-9256-dc7dab6a3468 3 ↩

  3. chatgpt.com/c/6a9c5957-ad88-83eb-be41-fcdaa2588944 ↩

Activity

  1. Piyush13104 commented on Sep 13, 2026

    @Piyush13104
    Piyush13104
    on Sep 13, 2026
    More actions

    Hi @beedell-roke ! I'd like to work on fixing this indentation issue with pasted code.
    Could you please assign this issue to me?

  2. beedell-roke commented on Sep 13, 2026

    @beedell-roke
    beedell-roke
    on Sep 13, 2026
    Author
    More actions

    @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.

  3. Piyush13104 commented on Sep 14, 2026

    @Piyush13104
    Piyush13104
    on Sep 14, 2026
    More actions

    Thanks for clarifying! I'll go ahead and start working on the fix.

  4. Piyush13104 commented on Oct 15, 2026

    @Piyush13104
    Piyush13104
    on Oct 15, 2026
    More actions

    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
  5. beedell-roke commented on Oct 15, 2026

    @beedell-roke
    beedell-roke
    on Oct 15, 2026
    Author
    More actions

    In retrospect, I wonder whether this relates to what python/cpython/issues/159478 describes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.