- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2k
 
Aiohttp: Add pypy3 and minor optimisation #9903
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
      
      
            msmith-techempower
  merged 42 commits into
  TechEmpower:master
from
Dreamsorcerer:patch-5
  
      
      
   
  May 20, 2025 
      
    
  
     Merged
                    Changes from 22 commits
      Commits
    
    
            Show all changes
          
          
            42 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      8ab3849
              
                Aiohttp: minor optimisation
              
              
                Dreamsorcerer 690f7c6
              
                Create aiohttp-pypy.dockerfile
              
              
                Dreamsorcerer 0cbe6e5
              
                Update benchmark_config.json
              
              
                Dreamsorcerer 94f3f70
              
                Update config.toml
              
              
                Dreamsorcerer 6d05a9a
              
                Update aiohttp-pypy.dockerfile
              
              
                Dreamsorcerer 195ee97
              
                Update aiohttp-gunicorn.dockerfile
              
              
                Dreamsorcerer 69cf225
              
                Update aiohttp-nginx.dockerfile
              
              
                Dreamsorcerer 9df516c
              
                Update aiohttp-orm.dockerfile
              
              
                Dreamsorcerer 3d6f056
              
                Update aiohttp.dockerfile
              
              
                Dreamsorcerer 084db56
              
                Update requirements.txt
              
              
                Dreamsorcerer 6658cc2
              
                Create requirements-cpython.txt
              
              
                Dreamsorcerer 31be4e6
              
                Update aiohttp-gunicorn.dockerfile
              
              
                Dreamsorcerer c4b58a4
              
                Update aiohttp-nginx.dockerfile
              
              
                Dreamsorcerer 369b3b6
              
                Update aiohttp-orm.dockerfile
              
              
                Dreamsorcerer a08be64
              
                Update aiohttp.dockerfile
              
              
                Dreamsorcerer e829512
              
                Update views.py
              
              
                Dreamsorcerer b44f688
              
                Update aiohttp-nginx.dockerfile
              
              
                Dreamsorcerer f944078
              
                Update aiohttp-orm.dockerfile
              
              
                Dreamsorcerer c55253d
              
                Update aiohttp-pypy.dockerfile
              
              
                Dreamsorcerer 0205399
              
                Update aiohttp.dockerfile
              
              
                Dreamsorcerer 8e4130f
              
                Update requirements.txt
              
              
                Dreamsorcerer 6463d62
              
                Update requirements-cpython.txt
              
              
                Dreamsorcerer 535bf1f
              
                Update app.py
              
              
                Dreamsorcerer 5b9d99f
              
                Update config.toml
              
              
                Dreamsorcerer d173517
              
                Update main.py
              
              
                Dreamsorcerer 9c8f875
              
                Update requirements.txt
              
              
                Dreamsorcerer b3042ee
              
                Update requirements-cpython.txt
              
              
                Dreamsorcerer b1c551f
              
                Update main.py
              
              
                Dreamsorcerer 0126ac9
              
                Update server.py
              
              
                Dreamsorcerer 080fed1
              
                Update benchmark_config.json
              
              
                Dreamsorcerer 8234174
              
                Update aiohttp-gunicorn.dockerfile
              
              
                Dreamsorcerer 7f44af6
              
                Update aiohttp-nginx.dockerfile
              
              
                Dreamsorcerer c2a197d
              
                Update aiohttp-orm.dockerfile
              
              
                Dreamsorcerer 556f3d7
              
                Update aiohttp-pypy.dockerfile
              
              
                Dreamsorcerer fa69964
              
                Update aiohttp.dockerfile
              
              
                Dreamsorcerer 20c8e6f
              
                Update requirements-cpython.txt
              
              
                Dreamsorcerer c90154d
              
                Update aiohttp-gunicorn.dockerfile
              
              
                Dreamsorcerer c47a3e1
              
                Update aiohttp-nginx.dockerfile
              
              
                Dreamsorcerer 1c5b359
              
                Update aiohttp-orm.dockerfile
              
              
                Dreamsorcerer 62271f8
              
                Update aiohttp-pypy.dockerfile
              
              
                Dreamsorcerer 9256786
              
                Update aiohttp.dockerfile
              
              
                Dreamsorcerer 1db72b6
              
                Update aiohttp-pypy.dockerfile
              
              
                Dreamsorcerer 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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| FROM python:3.13 | ||
| FROM python:latest | ||
| 
     | 
||
| ADD ./ /aiohttp | ||
| 
     | 
||
| WORKDIR aiohttp | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 gunicorn==23.0.0 && \ | ||
| pip3 install -r /aiohttp/requirements.txt | ||
| pip3 install -r /aiohttp/requirements-cpython.txt | ||
| 
     | 
||
| ENV CONNECTION=RAW | ||
| 
     | 
||
| EXPOSE 8080 | ||
| 
     | 
||
| CMD python3 -O -m gunicorn app.gunicorn:app -c gunicorn_conf.py | ||
| CMD python3 -O -m gunicorn app.gunicorn:app -c gunicorn_conf.py | ||
  
    
      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 | 
|---|---|---|
| @@ -1,20 +1,18 @@ | ||
| FROM python:3.13 | ||
| 
     | 
||
| ADD ./requirements.txt /aiohttp/requirements.txt | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements.txt | ||
| FROM python:latest | ||
| 
     | 
||
| RUN apt-get update && apt-get install -y nginx | ||
| 
     | 
||
| ADD ./ /aiohttp | ||
| 
     | 
||
| WORKDIR /aiohttp | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements-cpython.txt | ||
| 
     | 
||
| ENV CONNECTION=RAW | ||
| 
     | 
||
| EXPOSE 8080 | ||
| 
     | 
||
| RUN chmod +x /aiohttp/nginx-entrypoint.sh | ||
| 
     | 
||
| ENTRYPOINT ["/aiohttp/nginx-entrypoint.sh"] | ||
| ENTRYPOINT ["/aiohttp/nginx-entrypoint.sh"] | 
  
    
      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 | 
|---|---|---|
| @@ -1,16 +1,14 @@ | ||
| FROM python:3.13 | ||
| 
     | 
||
| ADD ./requirements.txt /aiohttp/requirements.txt | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements.txt | ||
| FROM python:latest | ||
| 
     | 
||
| ADD ./ /aiohttp | ||
| 
     | 
||
| WORKDIR /aiohttp | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements-cpython.txt | ||
| 
     | 
||
| ENV CONNECTION=ORM | ||
| 
     | 
||
| EXPOSE 8080 | ||
| 
     | 
||
| CMD python3 -O -m app.server | ||
| CMD python3 -O -m app.server | 
  
    
      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,14 @@ | ||
| FROM pypy:3.11 | ||
| 
     | 
||
| ADD ./ /aiohttp | ||
| 
     | 
||
| WORKDIR /aiohttp | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements.txt | ||
| 
     | 
||
| ENV CONNECTION=RAW | ||
| 
     | 
||
| EXPOSE 8080 | ||
| 
     | 
||
| CMD python3 -O -m app.server | 
  
    
      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 | 
|---|---|---|
| @@ -1,16 +1,14 @@ | ||
| FROM python:3.13 | ||
| 
     | 
||
| ADD ./requirements.txt /aiohttp/requirements.txt | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements.txt | ||
| FROM python:latest | ||
| 
     | 
||
| ADD ./ /aiohttp | ||
| 
     | 
||
| WORKDIR /aiohttp | ||
| 
     | 
||
| RUN pip3 install cython==3.0.11 && \ | ||
| pip3 install -r /aiohttp/requirements-cpython.txt | ||
| 
     | 
||
| ENV CONNECTION=RAW | ||
| 
     | 
||
| EXPOSE 8080 | ||
| 
     | 
||
| CMD python3 -O -m app.server | ||
| CMD python3 -O -m app.server | 
  
    
      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
    
  
  
    
              
  
    
      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,4 @@ | ||
| -r requirements.txt | ||
| 
     | 
||
| orjson==3.10.16 | ||
| uvloop==0.21.0 | 
  
    
      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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -2,5 +2,3 @@ aiohttp==3.11.18 | |
| asyncpg==0.30.0 | ||
| jinja2==3.1.6 | ||
| SQLAlchemy==2.0.40 | ||
| orjson==3.10.16 | ||
| uvloop==0.21.0 | ||
      
      Oops, something went wrong.
        
    
  
  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.
FROM python:3it's better.If python use SEM versioning is not problem.
But
latestis NOT so !!!If you will be here for some years, and fix the problems it's OK, but now this line create a problem in the future.
Thank you !!
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.
I'm not sure it'll make any difference. Any changes for a v4 are no more likely to break the small amount of code here than a minor release would. Ideally we'd be able to have Dependabot bump the pinned version automatically...
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.
I think I'm okay with going withlatestand if it breaks something we'll see it pretty plainly.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.
Actually, thinking on this for more than one second, it would make it harder for people to understand what version was run on any given continuous benchmark run from day to day. Imagine some breaking change from 3.13 to 3.14 (as a contrived example) but this dockerfile says
latest- might be hard without some guesswork what's going on. Agreeing with @joanhey that this should be returned to sem. ver.