Closed AdamDonna closed 11 months ago
@AdamDonna - Thanks for suggesting this! If I find the bandwidth I would also help with this!
testiing with django==4.2 on my Windows machine worked fine with the following warning, which the code comments suggest to be a known issue:
Using Python version 3.11.
Using Django version 4.2
Found 74 test(s).
Creating test database for alias 'default'...
Creating test database for alias 'secondary'...
System check identified no issues (0 silenced).
........................................
\django-polymorphic\polymorphic\tests\test_orm.py:469: DeprecationWarning: Using PolymorphicModel.base_objects is deprecated.
Use PolymorphicModelBase.objects.non_polymorphic() instead.
a = Model2A.base_objects.get(field1="C1")
..................................
----------------------------------------------------------------------
Ran 74 tests in 5.491s
OK
Destroying test database for alias 'default'...
Destroying test database for alias 'secondary'...
@dancergraham - That's great to hear! Feel free to open a PR to fix that DeprecationWarning. Could you also try with Django 5? Curious to see
Hah ! a lot more deprecation warnings with 5.0rc1...
Using Python version 3.11.
Using Django version 5.0rc1
Found 74 test(s).
Creating test database for alias 'default'...
Creating test database for alias 'secondary'...
System check identified no issues (0 silenced).
...\polymorphic\tests\test_multidb.py:47: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_multidb.py:54: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_multidb.py:60: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_multidb.py:66: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
....\polymorphic\tests\test_multidb.py:29: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_multidb.py:35: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.\polymorphic\tests\test_regression.py:21: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_regression.py:26: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_regression.py:31: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
................\polymorphic\tests\test_orm.py:663: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.\polymorphic\tests\test_orm.py:534: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_orm.py:543: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(objects, [Model2B, Model2A], transform=lambda o: o.__class__)
...\polymorphic\tests\test_orm.py:348: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_orm.py:356: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_orm.py:364: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(objects, [], transform=lambda o: o.__class__)
..\polymorphic\tests\test_orm.py:574: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_orm.py:582: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_orm.py:590: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
\polymorphic\tests\test_orm.py:598: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.....\polymorphic\tests\test_orm.py:523: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
..\polymorphic\tests\test_orm.py:336: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
...\polymorphic\tests\test_orm.py:469: DeprecationWarning: Using PolymorphicModel.base_objects is deprecated.
Use PolymorphicModelBase.objects.non_polymorphic() instead.
a = Model2A.base_objects.get(field1="C1")
..\polymorphic\tests\test_orm.py:606: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.......\polymorphic\tests\test_orm.py:617: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
..............\polymorphic\tests\test_orm.py:224: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.\polymorphic\tests\test_orm.py:401: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.\polymorphic\tests\test_orm.py:767: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.\polymorphic\tests\test_orm.py:783: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
.\polymorphic\tests\test_orm.py:811: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
....\polymorphic\tests\test_utils.py:37: RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
self.assertQuerysetEqual(
...
----------------------------------------------------------------------
Ran 74 tests in 6.306s
OK
@dancergraham - Feel free to start a PR trying to update to django 4.2 and 5.2
If we get #560 and #561 merged, we'd have a good CI/CD backbone to continue on.
Django 3.2 is the lowest current version supported by Django https://endoflife.date/django We should drop support up to 3.2 and add support for 4.2