From bcfeed0d5fe79d842029a3ff6e915f6219c4eaef Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Mon, 18 Jan 2010 23:53:23 +0100 Subject: [PATCH] change code header to redirect to NOTICE file for more info. --- LICENSE | 4 ++-- Manifest.in | 1 + NOTICE | 4 ++++ gunicorn/__init__.py | 26 +++----------------------- gunicorn/arbiter.py | 32 ++++---------------------------- gunicorn/http/__init__.py | 26 +++----------------------- gunicorn/http/http_parser.py | 25 +++---------------------- gunicorn/http/request.py | 26 +++----------------------- gunicorn/http/response.py | 25 ++----------------------- gunicorn/http/tee.py | 25 +++---------------------- gunicorn/main.py | 26 +++----------------------- gunicorn/util.py | 26 +++----------------------- gunicorn/worker.py | 26 +++----------------------- setup.py | 27 +++------------------------ 14 files changed, 40 insertions(+), 259 deletions(-) create mode 100644 NOTICE diff --git a/LICENSE b/LICENSE index 8ac4ebd3..b0b7ce99 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -2009 (c) Benoît Chesneau -2009 (c) Paul J. Davis +2009,2010 (c) Benoît Chesneau +2009,2010 (c) Paul J. Davis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/Manifest.in b/Manifest.in index 9c8317c4..196a71f7 100644 --- a/Manifest.in +++ b/Manifest.in @@ -1,2 +1,3 @@ include LICENSE +include NOTICE include README.rst \ No newline at end of file diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..3cf3b5db --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +gnicorn + +2009,2010 (c) Benoît Chesneau +2009,2010 (c) Paul J. Davis \ No newline at end of file diff --git a/gunicorn/__init__.py b/gunicorn/__init__.py index 299982df..d336db47 100644 --- a/gunicorn/__init__.py +++ b/gunicorn/__init__.py @@ -1,27 +1,7 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + __version__ = "0.1" diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 6223504a..1872006b 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + import errno import fcntl @@ -133,7 +113,6 @@ class Arbiter(object): sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_CORK, 1) elif hasattr(socket, "TCP_NOPUSH"): sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NOPUSH, 1) - def run(self): self.manage_workers() @@ -157,10 +136,7 @@ class Arbiter(object): log.error("Unhandled signal: %s" % signame) continue log.info("Handling signal: %s" % signame) - handler() - - - + handler() except StopIteration: break except KeyboardInterrupt: diff --git a/gunicorn/http/__init__.py b/gunicorn/http/__init__.py index ebe3dccf..3ddbe476 100644 --- a/gunicorn/http/__init__.py +++ b/gunicorn/http/__init__.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + from gunicorn.http.request import HTTPRequest, RequestError from gunicorn.http.response import HTTPResponse \ No newline at end of file diff --git a/gunicorn/http/http_parser.py b/gunicorn/http/http_parser.py index 4043cf07..791d6e98 100644 --- a/gunicorn/http/http_parser.py +++ b/gunicorn/http/http_parser.py @@ -1,27 +1,8 @@ # -*- coding: utf-8 - # -# 2010 (c) Benoit Chesneau -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + class HttpParser(object): diff --git a/gunicorn/http/request.py b/gunicorn/http/request.py index 4a13d3e9..6c66d447 100644 --- a/gunicorn/http/request.py +++ b/gunicorn/http/request.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + import errno from ctypes import * diff --git a/gunicorn/http/response.py b/gunicorn/http/response.py index 50c943a4..1badefcc 100644 --- a/gunicorn/http/response.py +++ b/gunicorn/http/response.py @@ -1,28 +1,7 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. import errno import socket diff --git a/gunicorn/http/tee.py b/gunicorn/http/tee.py index e3e72817..2f42505b 100644 --- a/gunicorn/http/tee.py +++ b/gunicorn/http/tee.py @@ -1,27 +1,8 @@ # -*- coding: utf-8 - # -# 2010 (c) Benoit Chesneau -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + """ TeeInput replace old FileInput. It use a file diff --git a/gunicorn/main.py b/gunicorn/main.py index 714d727a..d8fbcc44 100644 --- a/gunicorn/main.py +++ b/gunicorn/main.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + import logging import optparse as op diff --git a/gunicorn/util.py b/gunicorn/util.py index dfd34587..9aa81d00 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + import errno import select diff --git a/gunicorn/worker.py b/gunicorn/worker.py index 6f7b3f4f..e16cbb2a 100644 --- a/gunicorn/worker.py +++ b/gunicorn/worker.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + import errno import fcntl diff --git a/setup.py b/setup.py index fb887381..39636002 100644 --- a/setup.py +++ b/setup.py @@ -1,29 +1,8 @@ -#!/usr/bin/env python # -*- coding: utf-8 - # -# 2009 (c) Benoit Chesneau -# 2009 (c) Paul J. Davis -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# This file is part of gunicorn. See the NOTICE file included +# with this release for more information. + import os