Bug 2460533
| Summary: | alot fails to build with Python 3.15: TypeError: 'Mock' object cannot be interpreted as an integer | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Karolina Surma <ksurma> |
| Component: | alot | Assignee: | Dick Marinus <dick> |
| Status: | ASSIGNED --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | dick, ksurma, mhroncok, ttomecek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2412434 | ||
Python 3.15 does some formatting on sys.stderr for argparse and this doesn't work with a Mock object (it tries call fileno and expects an integer). I've created a PR upstream to fix this: https://github.com/pazz/alot/pull/1717 |
alot fails to build with Python 3.15.0a8. ERROR: test_validates (tests.utils.test_argparse.TestValidatedStore.test_validates) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/alot-0.12-build/alot-0.12/alot/utils/argparse.py", line 140, in __call__ self.validator(values) ~~~~~~~~~~~~~~^^^^^^^^ File "/builddir/build/BUILD/alot-0.12-build/alot-0.12/tests/utils/test_argparse.py", line 46, in validator raise cargparse.ValidationFailed alot.utils.argparse.ValidationFailed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.15/argparse.py", line 2124, in _parse_known_args2 namespace, args = self._parse_known_args(args, namespace, intermixed) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2379, in _parse_known_args stop_index = consume_positionals(start_index) File "/usr/lib64/python3.15/argparse.py", line 2331, in consume_positionals take_action(action, args) ~~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2200, in take_action action(self, namespace, argument_values, option_string) ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/alot-0.12-build/alot-0.12/alot/utils/argparse.py", line 142, in __call__ raise argparse.ArgumentError(self, str(e)) argparse.ArgumentError: argument foo: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/builddir/build/BUILD/alot-0.12-build/alot-0.12/tests/utils/test_argparse.py", line 60, in test_validates self._argparse(['fail']) ~~~~~~~~~~~~~~^^^^^^^^^^ File "/builddir/build/BUILD/alot-0.12-build/alot-0.12/tests/utils/test_argparse.py", line 54, in _argparse return parser.parse_args(args) ~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2085, in parse_args args, argv = self.parse_known_args(args, namespace) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2095, in parse_known_args return self._parse_known_args2(args, namespace, intermixed=False) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2126, in _parse_known_args2 self.error(str(err)) ~~~~~~~~~~^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2884, in error self.print_usage(_sys.stderr) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 2829, in print_usage formatter = self._get_formatter(file=file) File "/usr/lib64/python3.15/argparse.py", line 2812, in _get_formatter formatter._set_color(self.color, file=file) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.15/argparse.py", line 201, in _set_color if color and can_colorize(file=file): ~~~~~~~~~~~~^^^^^^^^^^^ File "/usr/lib64/python3.15/_colorize.py", line 486, in can_colorize return os.isatty(file.fileno()) ~~~~~~~~~^^^^^^^^^^^^^^^ TypeError: 'Mock' object cannot be interpreted as an integer https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10339174-alot/ For all our attempts to build alot with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/alot/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.