What happened? What is the problem?
When I open a filename that is -r--r--r--, I get:
File "/usr/lib/python3.14/site-packages/copr_rpmbuild/helpers.py", line 418, in __init__
self.spec = Specfile(path, macros=macros)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/specfile/specfile.py", line 105, in __init__
self._file = Path(path).open("r+", **self.ENCODING_ARGS)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/pathlib/__init__.py", line 771, in open
return io.open(self, mode, buffering, encoding, errors, newline)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What did you expect to happen?
We aren't looking to modify the specfile; we just want to read some fields using python-specfile. I expect the Specfile class to handle this for us using read-only operations.
Example URL(s)
discussed here: fedora-copr/copr#4266
Steps to reproduce
1.call Specfile("/some-read-only-file.spec")
Workaround
Participation
What happened? What is the problem?
When I open a filename that is
-r--r--r--, I get:What did you expect to happen?
We aren't looking to modify the specfile; we just want to read some fields using python-specfile. I expect the Specfile class to handle this for us using read-only operations.
Example URL(s)
discussed here: fedora-copr/copr#4266
Steps to reproduce
1.call Specfile("/some-read-only-file.spec")Workaround
Participation