Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1958221 - python-freezegun fails to build with Python 3.10: TypeError: Tester.helper() takes 0 positional arguments but 1 was given
Summary: python-freezegun fails to build with Python 3.10: TypeError: Tester.helper() ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-freezegun
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-05-07 13:27 UTC by Tomáš Hrnčiar
Modified: 2021-06-02 20:38 UTC (History)
6 users (show)

Fixed In Version: python-freezegun-1.0.0-5.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-02 20:38:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github spulec freezegun issues 396 0 None open Python 3.10: TypeError: Tester.helper() takes 0 positional arguments but 1 was given 2021-06-02 20:36:01 UTC
Github spulec freezegun pull 397 0 None open Fix decorate_class for Python 3.10 where staticmethod is callable. 2021-06-02 20:36:01 UTC

Description Tomáš Hrnčiar 2021-05-07 13:27:04 UTC
python-freezegun fails to build with Python 3.10.0b1.

=================================== FAILURES ===================================
______________ Tester.test_class_decorator_respects_staticmethod _______________

self = <tests.test_datetimes.Tester object at 0x7f27f2554d60>

    def test_class_decorator_respects_staticmethod(self):
>       assert self.helper() == datetime.date(2012, 1, 14)

tests/test_datetimes.py:422: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.test_datetimes.Tester object at 0x7f27f2554d60>,), kwargs = {}
time_factory = <freezegun.api.FrozenDateTimeFactory object at 0x7f27f2557100>

    def wrapper(*args, **kwargs):
        with self as time_factory:
            if self.as_arg and self.as_kwarg:
                assert False, "You can't specify both as_arg and as_kwarg at the same time. Pick one."
            elif self.as_arg:
                result = func(time_factory, *args, **kwargs)
            elif self.as_kwarg:
                kwargs[self.as_kwarg] = time_factory
                result = func(*args, **kwargs)
            else:
>               result = func(*args, **kwargs)
E               TypeError: Tester.helper() takes 0 positional arguments but 1 was given


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/02168142-python-freezegun/

For all our attempts to build python-freezegun with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-freezegun/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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.

Comment 1 Miro Hrončok 2021-06-02 20:38:41 UTC
I've backported that PR.


Note You need to log in before you can comment on or make changes to this bug.