Comments (11)
python-3.9
pip==22.0.4
setuptools==46.1.3
packaging==21.3
Sequence of commands might not be possible.
from gunicorn.
Please add the exact sequence of commands that lead you to that error, and the versions of pip
, setuptools
and packaging
.
You typically do not need a setup.py
file. If you cannot use existing wheels, you can still use our project metadata in pyproject.toml
- build using python -m build
.
If for some reason (probably involving deprecated toolchains) you absolutely must use setup.py
then use the find_packages() shortcut, like this:
from setuptools import setup, find_packages
from gunicorn import __version__
setup(
name='gunicorn', version=__version__,
packages=find_packages(exclude=['examples', 'tests']),
entry_points="[console_scripts]\ngunicorn=gunicorn.app.wsgiapp:run",
)
from gunicorn.
- My services were running on gunicorn-21.1.0
- I replaced all the occurrences of gunicorn-21.1.0 with gunicorn-22.0.0 in the codebase
- Then in my submodule where I kept gunicorn-22.0.0 source code, I created a setup.py file to build it., which has the 3 line code mentioned above.
- I associated the commit id of submodule in my main repo, where the services are using gunicorn.
- On building my main source code (which in turn builds the source code of gunicorn via my setup.py), I get this error where the services are not starting.
from gunicorn.
builds the source code of gunicorn via my setup.py
Find out what other software in your deployment directly call setup.py
- doing so for building or installing is deprecated and should usually instead let pip
or build
figure it out, e.g. python -m pip install .
to install python -m build
to build sdist+wheel
from gunicorn.
Bound to use setup.py
for all the packages because of some dependencies. Will take sometime to move to pyproject.toml
for building packages in my repo
from gunicorn.
Hi @pajod ,
I incorporated your changes of setup.py
file and tried building the package from scratch.
However, I still do not see gunicorn/app/wsgiapp.py
file inside the directory.
[root@makesh_FB222 /usr.src/contrib/python/var/python/lib/python3.9/site-packages/gunicorn-22.0.0-py3.9.egg]# ls
EGG-INFO __init__.py __main__.py __pycache__ arbiter.py config.py debug.py
errors.py glogging.py pidfile.py reloader.py sock.py systemd.py util.py
from gunicorn.
It works on my machine. If it is not the likely fully reproducible
sequence of commands that lead you to that error, or the versions of pip, setuptools and packaging
my next bet would be that it is ~𝖒𝖆𝖌𝖎𝖈~ but in that case I cannot help you, magic is illegal in my place.
from gunicorn.
I was able to install via my setup.py
file from above using pip==22.0.4 setuptools==46.1.3 packaging==21.3
just fine.
I have suggested adding an equivalent setup.cfg
file to our regular CI jobs to prove that this keeps working, for as long as Debian & Ubuntu releases shipping <v61 setuptools versions stick around: https://github.com/benoitc/gunicorn/pull/3134/files#diff-f159b002d021c363728aeff2c0d9cad2521c2cd553f77641481f2afb57ce7b73
from gunicorn.
Maybe we should try to find a way to still ship a setup.py for those who need it? We should make sure the ux is goof. thoughts?
from gunicorn.
@benoitc Well how far to we want to go?
- a) avoid all breakage: entirely revert deleting
setup.py
, as using that file for configuration is likely going to remain supported for the foreseeable future and we have no pressing need to use the toml format for out packaging needs - b) permit directly calling setup.py for some more time? a minimal stub would suffice.
- this enables only the invocation, one would still need modern libraries - possibly nil overlap between these two
- c) permit using the build .whl files on old systems? ask tox CI to try the wheels
- d) permit people using older setuptools to build/install from source themselves? then either setup.cfg or setup.py needs to be restored, either
- duplicating a minimal set of metadata (as I did for my dpkg-buildpackage test) or
- completely giving up on all the things that the toml config is better at until truly nobody out there is unable to parse that format (Ubuntu 22.04 will receive extended support until April 2034)
I favour b+c+d1, and focus packaging-ux efforts on the toml:
- just delete unnecessary
include-package-data
andzip-safe
- likely also unnecessary
license-files
,namespaces
andpytest-cov
- the
import
/ path related stuff in tests is rather inflexible (and possibly the original justification for thezip-safe
statement?)
from gunicorn.
Issue with freebsd machines on my setup. Have a workaround for now. Closing this.
from gunicorn.
Related Issues (20)
- InvalidHTTPVersion / TypeError: not all arguments converted during string formatting HOT 2
- Logging in signal handlers may be unsafe HOT 1
- 404 errors during --max-requests restarts HOT 2
- SCRIPT_NAME header is dropped/rejected by header map validation HOT 2
- Gunicorn exceeds the specified number of workers in actual processes. HOT 5
- Check that threads works well with Gunicorn and Python 3.13 (I think that It doesn't) HOT 2
- 使用Gunicorn的preload进行多进程全局变量共享,引发bug HOT 2
- Error handling request (no URI read) HOT 6
- Question: Measurement of `gunicorn.request.duration`
- "capture_output" fails when using "logconfig_dict" for logging configuration
- gunicorn/util.py set_owner_process Mangling gid on RHEL8 + Google Cloud Platform (very large int group id) HOT 1
- QdrantClient seems to crash Gunicorn HOT 1
- Multiple Vulnerability Reports and security email address issue HOT 8
- Spawning multiple workers and [ERROR] Worker (pid:699) was sent SIGILL! HOT 1
- Worker autorestarts cause worker-dependent duplicate logs HOT 3
- Workers that are not supposed to exist exit with code 255 HOT 2
- [Question] Passing server hooks as python objects to a custom BaseApplication HOT 1
- Bypass connection queue for load balancer health checks : Latest
- 模型部署问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gunicorn.