Skip to content

updated whoosh backend to utilize datetime from the standard library #1937

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

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

Naggafin
Copy link
Contributor

@Naggafin Naggafin commented Jan 21, 2024

Updated the whoosh backend to reflect Django 5.0's decision to remove the datetime_safe library. It now uses Python's standard library. All tests pass, although I am getting an unhandled exception near the end which seems to be unrelated to the tests.

/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/var/www/example.com/django-haystack/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_integration/setuptools.py:90: UserWarning: version of django-haystack already set
  warnings.warn(f"version of {dist_name} already set")
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/command/test.py:193: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  ir_d = dist.fetch_build_eggs(dist.install_requires)
/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/command/test.py:194: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  tr_d = dist.fetch_build_eggs(dist.tests_require or [])
/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/command/test.py:195: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  er_d = dist.fetch_build_eggs(
running egg_info
writing django_haystack.egg-info/PKG-INFO
writing dependency_links to django_haystack.egg-info/dependency_links.txt
writing requirements to django_haystack.egg-info/requires.txt
writing top-level names to django_haystack.egg-info/top_level.txt
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file 'django_haystack.egg-info/SOURCES.txt'
running build_ext
Found 49 test(s).
System check identified no issues (0 silenced).
..............s.......s..........................
----------------------------------------------------------------------
Ran 49 tests in 12.398s

OK (skipped=2)
Traceback (most recent call last):
  File "/var/www/example.com/django-haystack/setup.py", line 19, in <module>
    setup(
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/command/test.py", line 223, in run
    self.run_tests()
  File "/var/www/example.com/.venv/lib/python3.11/site-packages/setuptools/command/test.py", line 226, in run_tests
    test = unittest.main(
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/main.py", line 101, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python3.11/unittest/main.py", line 150, in parseArgs
    self.createTests()
  File "/usr/lib/python3.11/unittest/main.py", line 161, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 232, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 232, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 223, in loadTestsFromName
    raise TypeError("calling %s returned %s, not a test" %
TypeError: calling <function run_all at 0x7ff027563a60> returned None, not a test

@cclauss cclauss self-assigned this Jan 22, 2024
@cclauss cclauss enabled auto-merge (squash) January 22, 2024 00:13
Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@cclauss cclauss merged commit c0b1984 into django-haystack:master Jan 22, 2024
dwasyl pushed a commit to dwasyl/django-haystack that referenced this pull request Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants