- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.9k
feat:add tests with uv #13825
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
          
     Open
      
      
            sgaist
  wants to merge
  7
  commits into
  pytest-dev:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
sgaist:feat/tests-with-uv
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +131
        
        
          −19
        
        
          
        
      
    
  
  
     Open
                    feat:add tests with uv #13825
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            7 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      03c6b83
              
                feat: add configuration for running tox with uv
              
              
                sgaist d9e087f
              
                feat: add test workflow using uv
              
              
                sgaist 55e8763
              
                chore: don't add coverage for uv dedicated tests
              
              
                sgaist 364d604
              
                chore: move uv powered tests into test workflow
              
              
                sgaist 4a2feb8
              
                chore: add explanation for assert check change in acceptance_test
              
              
                sgaist 94c93c1
              
                chore: add changelog entry
              
              
                sgaist 576f3a4
              
                Merge branch 'main' into feat/tests-with-uv
              
              
                sgaist File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Raised minimal versions of ``exceptiongroup``, ``iniconfig`` and ``pygments`` following uv powered test runs using the ``lowest-direct`` resolution strategy. | ||
|  | ||
| -- by :user:`sgaist` | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| [tox] | ||
|         
                  sgaist marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| requires = | ||
| tox>=4 | ||
| tox-uv>=1 | ||
| isolated_build = True | ||
| distshare = {homedir}/.tox/uv-distshare | ||
| envlist = | ||
| py310 | ||
|  | ||
| [testenv] | ||
| description = | ||
| run the tests | ||
| under `{basepython}` | ||
| uv_resolution = lowest-direct | ||
| uv_python_preference = only-managed | ||
| commands = | ||
| {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} --maxfail=1 --pdb | ||
| passenv = | ||
| PYTEST_ADDOPTS | ||
| TERM | ||
| SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST | ||
| CI | ||
| setenv = | ||
| _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:} | ||
|  | ||
| extras = dev | ||
| deps = | ||
| {env:_PYTEST_TOX_EXTRA_DEP:} | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these changes needed? Is it from testing with lowest-direct?
For the dev deps I don't mind much, perhaps except for
attrsandmockwhich we use for testing pytest integration features so being able to test with older versions is somewhat useful.But for the runtime dependencies, how did you determine the lower bounds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct,
lowest-directshowed that the oldest version it could get were sometimes using obsolete APIs.My first tries were to slowly bump the versions of the dependencies that were posing problems. Since some of them were a bit less cooperative, I went to check which years the packages had releases around Python 3.10 initial release. So, in the absolute, I would say it's worth revisiting them to ensure I did not miss something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your method sounds good to me (cc @RonnyPfannschmidt on iniconfig).
Could you add a
packagingchangelog entry detailing the changes to the lower bounds ofexceptiongroup,iniconfigandpygments?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done but I may have been a bit short