scrapy / protego

A pure-Python robots.txt parser with support for modern conventions.
BSD 3-Clause "New" or "Revised" License
54 stars 28 forks source link

python-protego fails to build with Python 3.12: AttributeError: 'TestProtego' object has no attribute 'assertEquals'. #36

Closed rosset closed 1 year ago

rosset commented 1 year ago

Bug 2175156 - python-protego fails to build with Python 3.12: AttributeError: 'TestProtego' object has no attribute 'assertEquals'.

python-protego fails to build with Python 3.12.0a5.

=================================== FAILURES =================================== _____ TestProtego.test_sitemaps_comefirst ____

self =

def test_sitemaps_come_first(self):
    """Some websites have sitemaps before any robots directives"""
    content = ("Sitemap: [https://www.foo.bar/sitmap.xml\n](https://www.foo.bar/sitmap.xml/n)"
               "User-Agent: FootBot\n"
               "Disallow: /something")
    rp = Protego.parse(content=content)
  self.assertEquals(list(rp.sitemaps), ["https://www.foo.bar/sitmap.xml"])

E AttributeError: 'TestProtego' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_protego.py:1055: AttributeError =========================== short test summary info ============================ FAILED tests/test_protego.py::TestProtego::test_sitemaps_come_first - Attribu... ======================== 1 failed, 4337 passed in 5.62s ========================

Removed many old deprecated unittest features:

You can use https://github.com/isidentical/teyit to automatically modernise your unit tests.

(Contributed by Serhiy Storchaka in bpo-45162.) https://bugs.python.org/issue?@action=redirect&bpo=45162 https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05576684-python-protego/

For all our attempts to build python-protego with Python 3.12, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-protego/

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

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12. 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.