[Bug 1228868] New: Incorrect count of requests in `call_count`
https://bugzilla.suse.com/show_bug.cgi?id=1228868 Bug ID: 1228868 Summary: Incorrect count of requests in `call_count` Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.6 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Python Assignee: python-maintainers@suse.com Reporter: ahasenkopf@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Created attachment 876481 --> https://bugzilla.suse.com/attachment.cgi?id=876481&action=edit Small script to reproduce the bug The `call_count` attribute of mocks differs from upstream packages. When using `urllib3.Retry` and using `responses` to mock a request, the resulting call count is wrong. With the attached example script, all Python versions and upstream packages from PyPI result in a call count of 7. On Leap 15.5 and Leap 15.6 the value is 11. Installed RPMs (excerpt): * python3-base-3.6.15-150300.10.65.1.x86_64 * libpython3_6m1_0-3.6.15-150300.10.65.1.x86_64 * python3-3.6.15-150300.10.65.2.x86_64 * python3-urllib3-1.25.10-150300.4.9.1.noarch * python3-requests-2.25.1-150300.3.6.1.noarch * python3-responses-0.21.0-150300.3.3.1.noarch Steps to reproduce: ``` docker run -it --rm registry.opensuse.org/opensuse/leap:15.6 zypper in python3-responses python3 <path-to-example-script> ``` -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c2 Markéta Machová <mmachova@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|python-maintainers@suse.com |mmachova@suse.com CC| |mmachova@suse.com --- Comment #2 from Markéta Machová <mmachova@suse.com> --- Hi, I see you have an ancient version of python3-requests and that you are running on python 3.6. Could you try it with python311-requests? Also, why is this important? -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c3 --- Comment #3 from Markéta Machová <mmachova@suse.com> --- Also, have you tried with v2.25.1 downloaded from PyPI? -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c4 --- Comment #4 from Andreas Hasenkopf <ahasenkopf@suse.com> ---
you are running on python 3.6. Could you try it with python311?
Python 3.6 is still the default version on Leap/SLE 15 and some Python packages (e.g. python3-libsolv) are not available for Python 3.11. So, we need to build and test against Python 3.6 on Leap/SLE.
Also, why is this important?
python-osc-tiny cannot be built successfully for Leap/SLE, because its tests fail because of this miscount.
have you tried with v2.25.1 downloaded from PyPI?
Certainly, if I only use upstream packages I am not affected by this. But, in the build pipeline in OBS I can't just download a package from PyPI. In this situation I have to use the RPMs provided by the distro. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c5 Daniel Garcia <daniel.garcia@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.garcia@suse.com --- Comment #5 from Daniel Garcia <daniel.garcia@suse.com> --- I've been testing the script in Tumbleweed, with python 3.11 and a virtualenv and I've discovered that the problem is solved since version 0.22.0. And doing a git bisect we can find the exact commit that makes this script to work: https://github.com/getsentry/responses/commit/60931f1 So applying that upstream patch fixes the problem. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c6 --- Comment #6 from Markéta Machová <mmachova@suse.com> --- Thank you, Daniel, for the quick fix. You are a rockstar :) . -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c9 Markéta Machová <mmachova@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(jhura@suse.com) CC| |jhura@suse.com --- Comment #9 from Markéta Machová <mmachova@suse.com> --- My request to IBS has been rejected. Where should I fix this codestream, please? -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 Maurizio Galli <maurizio.galli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maurizio.galli@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 Juraj Hura <jhura@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jhura@suse.com) | -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228868 https://bugzilla.suse.com/show_bug.cgi?id=1228868#c12 --- Comment #12 from Maintenance Automation <maint-coord+maintenance-robot@suse.de> --- SUSE-RU-2024:3892-1: An update that has one fix can now be installed. URL: https://www.suse.com/support/update/announcement/2024/suse-ru-20243892-1 Category: recommended (moderate) Bug References: 1228868 Maintenance Incident: [SUSE:Maintenance:35935](https://smelt.suse.de/incident/35935/) Sources used: openSUSE Leap 15.3 (src): python-responses-0.21.0-150300.3.6.1 openSUSE Leap 15.5 (src): python-responses-0.21.0-150300.3.6.1 SUSE Package Hub 15 15-SP5 (src): python-responses-0.21.0-150300.3.6.1 SUSE Package Hub 15 15-SP6 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP4 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP4 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise Desktop 15 SP4 LTSS 15-SP4 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise Server 15 SP4 LTSS 15-SP4 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): python-responses-0.21.0-150300.3.6.1 SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): python-responses-0.21.0-150300.3.6.1 SUSE Enterprise Storage 7.1 (src): python-responses-0.21.0-150300.3.6.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com