Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update requirements #26

Closed
wants to merge 31 commits into from

Conversation

ColeDCrawford
Copy link
Contributor

Make the requirements.txt more flexible, so other applications can more easily incorporate Catchpy.

d-flood and others added 30 commits February 20, 2024 17:14
Make the requirements.txt more flexible, so other applications can more easily incorporate Catchpy.
3.12 was failing to install (pointing at old beta).

Could move to a GHA matrix strategy instead of tox.
@ColeDCrawford
Copy link
Contributor Author

ColeDCrawford commented May 28, 2024

@nmaekawa these errors don't look related to the changes? Any idea why these are failing?

Failing tests

Github Actions Run

tests

   =================================== FAILURES ===================================
______________ TestConsumer.test_create_user_profile_consumer_ok _______________

self = <consumer.tests.test_models.TestConsumer object at 0x7f7a25bdde10>

    def test_create_user_profile_consumer_ok(self):
>       u = User._default_manager.create(
                username='fake_user',
                password='fake_pwd',
                email='fake_email@fake.org')

consumer/tests/test_models.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py311/lib/python3.11/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
.tox/py311/lib/python3.11/site-packages/django/db/models/query.py:679: in create
    obj.save(force_insert=True, using=self.db)
.tox/py311/lib/python3.11/site-packages/django/contrib/auth/base_user.py:78: in save
    super().save(*args, **kwargs)
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:822: in save
    self.save_base(
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:924: in save_base
    post_save.send(
.tox/py311/lib/python3.11/site-packages/django/dispatch/dispatcher.py:189: in send
    response = receiver(signal=self, sender=sender, **named)
consumer/models.py:45: in create_or_update_user_profile
    Profile.objects.create(user=instance)
.tox/py311/lib/python3.11/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
.tox/py311/lib/python3.11/site-packages/django/db/models/query.py:679: in create
    obj.save(force_insert=True, using=self.db)
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:822: in save
    self.save_base(
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:924: in save_base
    post_save.send(
.tox/py311/lib/python3.11/site-packages/django/dispatch/dispatcher.py:189: in send
    response = receiver(signal=self, sender=sender, **named)
consumer/models.py:86: in create_or_update_profile_consumer
    Consumer.objects.create(prime_profile=instance)
.tox/py311/lib/python3.11/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <QuerySet []>, kwargs = {'prime_profile': fake_user}
reverse_one_to_one_fields = frozenset({'prime_profile'})

    def create(self, **kwargs):
        """
        Create a new object with the given kwargs, saving it to the database
        and returning the created object.
        """
        reverse_one_to_one_fields = frozenset(kwargs).intersection(
            self.model._meta._reverse_one_to_one_field_names
        )
        if reverse_one_to_one_fields:
>           raise ValueError(
                "The following fields do not exist in this model: %s"
                % ", ".join(reverse_one_to_one_fields)
            )
E           ValueError: The following fields do not exist in this model: prime_profile

.tox/py311/lib/python3.11/site-packages/django/db/models/query.py:672: ValueError
___________ TestConsumer.test_create_consumer_with_parent_profile_ok ___________

self = <consumer.tests.test_models.TestConsumer object at 0x7f7a25bdc410>

    def test_create_consumer_with_parent_profile_ok(self):
>       u = User._default_manager.create(
                username='fake_user',
                password='fake_pwd',
                email='fake_email@fake.org')

consumer/tests/test_models.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py311/lib/python3.11/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
.tox/py311/lib/python3.11/site-packages/django/db/models/query.py:679: in create
    obj.save(force_insert=True, using=self.db)
.tox/py311/lib/python3.11/site-packages/django/contrib/auth/base_user.py:78: in save
    super().save(*args, **kwargs)
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:822: in save
    self.save_base(
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:924: in save_base
    post_save.send(
.tox/py311/lib/python3.11/site-packages/django/dispatch/dispatcher.py:[189](https://github.com/nmaekawa/catchpy/actions/runs/9277512733/job/25526835011#step:5:190): in send
    response = receiver(signal=self, sender=sender, **named)
consumer/models.py:45: in create_or_update_user_profile
    Profile.objects.create(user=instance)
.tox/py311/lib/python3.11/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
.tox/py311/lib/python3.11/site-packages/django/db/models/query.py:679: in create
    obj.save(force_insert=True, using=self.db)
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:822: in save
    self.save_base(
.tox/py311/lib/python3.11/site-packages/django/db/models/base.py:924: in save_base
    post_save.send(
.tox/py311/lib/python3.11/site-packages/django/dispatch/dispatcher.py:189: in send
    response = receiver(signal=self, sender=sender, **named)
consumer/models.py:86: in create_or_update_profile_consumer
    Consumer.objects.create(prime_profile=instance)
.tox/py311/lib/python3.11/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <QuerySet []>, kwargs = {'prime_profile': fake_user}
reverse_one_to_one_fields = frozenset({'prime_profile'})

    def create(self, **kwargs):
        """
        Create a new object with the given kwargs, saving it to the database
        and returning the created object.
        """
        reverse_one_to_one_fields = frozenset(kwargs).intersection(
            self.model._meta._reverse_one_to_one_field_names
        )
        if reverse_one_to_one_fields:
>           raise ValueError(
                "The following fields do not exist in this model: %s"
                % ", ".join(reverse_one_to_one_fields)
            )
E           ValueError: The following fields do not exist in this model: prime_profile

.tox/py311/lib/python3.11/site-packages/django/db/models/query.py:672: ValueError
=========================== short test summary info ============================
FAILED consumer/tests/test_models.py::TestConsumer::test_create_user_profile_consumer_ok
FAILED consumer/tests/test_models.py::TestConsumer::test_create_consumer_with_parent_profile_ok
=================== 2 failed, 78 passed, 3 skipped in 7.66s ====================
py311: exit 1 (8.27 seconds) /code> pytest -v pid=94
py311: FAIL ✖ in 20.85 seconds
py312: skipped because could not find python interpreter with spec(s): py312
  py38: SKIP (0.79 seconds)
  py39: SKIP (0.01 seconds)
  py310: SKIP (0.01 seconds)
  py311: FAIL code 1 (20.85=setup[12.58]+cmd[8.27] seconds)
  py312: SKIP (0.01 seconds)
  evaluation failed :( (21.73 seconds)
Error: Process completed with exit code 255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants