Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT Make Python 3.9 minimum supported version - #1669

Merged
tomMoral merged 6 commits into
joblib:mainfrom
lesteve:drop-python3.8
Feb 27, 2025
Merged

MNT Make Python 3.9 minimum supported version#1669
tomMoral merged 6 commits into
joblib:mainfrom
lesteve:drop-python3.8

Conversation

@lesteve

@lesteve lesteve commented Feb 27, 2025

Copy link
Copy Markdown
Member

need numpy>=1.22.2 somehow otherwise there is an error with Python 3.9 CI:

With Python 3.9 numpy 1.22.0 I get the failure below (no idea where this comes from):

pytest joblib/test/test_memmapping.py joblib/test/test_memory.py -k 'test_info_log or memmap_based' -v
❯ pytest joblib/test/test_memmapping.py joblib/test/test_memory.py -k 'test_info_log or memmap_based' -v
================================================= test session starts =================================================
platform linux -- Python 3.9.21, pytest-8.3.4, pluggy-1.5.0 -- /home/lesteve/micromamba/envs/bla/bin/python
cachedir: .pytest_cache
rootdir: /home/lesteve/dev/joblib
configfile: pyproject.toml
collected 117 items / 115 deselected / 2 selected                                                                     

joblib/test/test_memmapping.py::test_memmap_based_array_reducing PASSED                                         [ 50%]
joblib/test/test_memory.py::test_info_log FAILED                                                                [100%]

====================================================== FAILURES =======================================================
____________________________________________________ test_info_log ____________________________________________________

tmpdir = local('/tmp/pytest-of-lesteve/pytest-34/test_info_log0')
caplog = <_pytest.logging.LogCaptureFixture object at 0x71368c1fa670>

    def test_info_log(tmpdir, caplog):
        caplog.set_level(logging.INFO)
        x = 3
    
        memory = Memory(location=tmpdir.strpath, verbose=20)
    
        @memory.cache
        def f(x):
            return x ** 2
    
        _ = f(x)
>       assert "Querying" in caplog.text
E       AssertionError: assert 'Querying' in 'WARNING  joblib:logger.py:80 [MemorizedFunc(func=<function test_info_log.<locals>.f at 0x71368c65d4c0>, location=/tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib)]: Computing func f, argument hash e553a9724fb4db27304cf433c6999883 in location /tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib/joblib/test/test_memory/test_info_log/<locals>/f\n'
E        +  where 'WARNING  joblib:logger.py:80 [MemorizedFunc(func=<function test_info_log.<locals>.f at 0x71368c65d4c0>, location=/tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib)]: Computing func f, argument hash e553a9724fb4db27304cf433c6999883 in location /tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib/joblib/test/test_memory/test_info_log/<locals>/f\n' = <_pytest.logging.LogCaptureFixture object at 0x71368c1fa670>.text

joblib/test/test_memory.py:1411: AssertionError
------------------------------------------------ Captured stdout call -------------------------------------------------
[MemorizedFunc(func=<function test_info_log.<locals>.f at 0x71368c65d4c0>, location=/tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib)]: 
Querying f with signature
f(3).

(argument hash e553a9724fb4db27304cf433c6999883)

The store location is /tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib/joblib/test/test_memory/test_info_log/<locals>/f.

________________________________________________________________________________
[Memory] Calling joblib.test.test_memory.test_info_log.<locals>.f...
f(3)
Persisting in /tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib/joblib/test/test_memory/test_info_log/<locals>/f/e553a9724fb4db27304cf433c6999883
________________________________________________________________f - 0.0s, 0.0min
-------------------------------------------------- Captured log call --------------------------------------------------
WARNING  joblib:logger.py:80 [MemorizedFunc(func=<function test_info_log.<locals>.f at 0x71368c65d4c0>, location=/tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib)]: Computing func f, argument hash e553a9724fb4db27304cf433c6999883 in location /tmp/pytest-of-lesteve/pytest-34/test_info_log0/joblib/joblib/test/test_memory/test_info_log/<locals>/f
================================================== warnings summary ===================================================
joblib/testing.py:22
  /home/lesteve/dev/joblib/joblib/testing.py:22: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    timeout = pytest.mark.timeout

joblib/executor.py:107
  /home/lesteve/dev/joblib/joblib/executor.py:107: PytestCollectionWarning: cannot collect test class '_TestingMemmappingExecutor' because it has a __init__ constructor (from: joblib/test/test_memmapping.py)
    class _TestingMemmappingExecutor(MemmappingExecutor):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== short test summary info ===============================================
FAILED joblib/test/test_memory.py::test_info_log - AssertionError: assert 'Querying' in 'WARNING  joblib:logger.py:80 [MemorizedFunc(func=<function test_info_log.<lo...
=============================== 1 failed, 1 passed, 115 deselected, 2 warnings in 0.23s ===============================
[INFO:MainProcess:MainThread] process shutting down
[DEBUG:MainProcess:MainThread] running all "atexit" finalizers with priority >= 0
[DEBUG:MainProcess:MainThread] running the remaining "atexit" finalizers

@codecov

codecov Bot commented Feb 27, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.78%. Comparing base (91b34a9) to head (91b48db).
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1669      +/-   ##
==========================================
+ Coverage   95.75%   95.78%   +0.02%     
==========================================
  Files          46       46              
  Lines        7829     7827       -2     
==========================================
  Hits         7497     7497              
+ Misses        332      330       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomMoral tomMoral left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM up to the removed tests

Comment thread joblib/test/test_memmapping.py Outdated
Comment thread joblib/test/test_memmapping.py Outdated
Comment thread .github/workflows/test.yml
@tomMoral
tomMoral merged commit 578c82a into joblib:main Feb 27, 2025
@lesteve
lesteve deleted the drop-python3.8 branch February 27, 2025 14:30
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