pasteorg / paste Goto Github PK
View Code? Open in Web Editor NEWPython Paste (core) repository
License: Other
Python Paste (core) repository
License: Other
The paste wheel on pypi https://pypi.org/project/Paste/#files is missing license file. Though it is present in tarball.
Please include license file in the wheel
we can use separate fields for author (Ian), and maintainer (me).
First, thank you for taking over support on this module!
I'm getting a reproducible breakage with 3.0.5 that doesn't occur with 3.0.4 (both installed with pip). This occurs on Ubuntu 16.04, 18.04, and Debian 9.
Here's a self_signed.pem to save you the trouble of generating one:
-----BEGIN PRIVATE KEY-----
MIIEuwIBADANBgkqhkiG9w0BAQEFAASCBKUwggShAgEAAoIBAQCdTcshjf4Z/skZ
pTFhWN0VxFhKSb0TOp5bNRkFsTcbIR5pCfD+5To2Hu+j6wKnhx2th4b9BGFofGmU
CGXTIuCHivNpusarr09O9pd9/1gZBCgZUS7ohl0fcgjJ6lVMdgYkW6NuU2eO5tT5
X4yJoP7FhK/ZnVG6TxWjKZYg77hmHG+RHrpAOfu3Yx7LsOsLkvnyopECc/yeWE09
3KdypOXwlgtehMhfmc3tCYzkuAsF1mr7bFdzU+dI/Q7Jvig+jypEb2Boxzl9CfsQ
+xsMlkNi6EW9l+mmJPih+N1ObKHw+7brHuzjGmMXIHdjcYXPpU/6hr+z1JN85HcB
Hc+JrjMdAgMBAAECggEAVDH9VbpwlW1gKg/XPGmZ/DqZnzmUsCQh+mOTPw65lhXF
9ybRDT2YSLuKPMxfIVgatHTj9a1QjeJ5iDhud/IlB6eB3ceQ6vfslTE7qL7xYoJt
DA/98YtpcJlSxvBcM47Aftllwnl15nD68XcI++lmNEZu8SVZR0VpKWnq5zooEs6y
uFAnD+nb3XPVMJ+DmfthRzqQ4Gt40pSVrPzdxan8Vg8WulCHdRxHq3Cpp4t5q3bM
SMAl3gdi3H0/D0DYywCHNRVww9+Sld59A4wdQ7RU+cFf8J/Rf1ZNGd3SaUZAacex
2rzJhQSDV0XTTWcqowhizyKCLzOaz9C1CiCN8QaGAQKBgQDLv7NNqej0inIvTGa6
dekbnJIJ9Fun90nC5UIYFDh2FSpMRo82GF+3WsY1m8oXFKaZ56D58UpoYrQiYxg4
XxABUHjzGREz+1Hh88hDRLJcqGsWNH6jMq9go2QShw7aOD+5cMBpZhrXtoBZ4uyO
nEilkrv3YhvVmEsfssrO47v5wQKBgQDFpPBpzIFBRdgeGVxJiG6v26JToEHcqHoY
xwTUChMnJ2XBn4DoKfp1VLWITABDFvF+UjB3sSTbVlLDtBwt4Mz8CzWZitoKi+J+
P/GMgqZJUvin5P9HXLShfsk/jcA7lbP6xksKZqMIOA31+0iF61ZvLZ4FepAbNa77
EUWeEdJ4XQJ/YeS5QZdhVh0uv4r10KDWX23avO2rHAi0Z+++0dLlTdbde8hrBpKv
amky0o8Hig9h/JBNx8km9wB1jBAQkwUZq4f+lM52dYNK1EVM8wUOrXY9/W07ay3v
FX9rlXtOp4pfE7oYuItWWk5VXNqqzdpJDURzC2kX9og1kAVXbA//QQKBgQCWL2eg
fY4ak4BOHudJ2SqC51rKQRTLIBrniRPaLG2xavaf0xyZTozLa7sl/tqUIHMRklLS
IQHoygfKPqrLEe+x9rKcIi7dpL5PQTfDlePWA/5/VjvFdmSr8zPp30UcAf3pqZSM
KsHoFPBG4tORL+tWQEu7zg6DHqAAmHdWTiSo4QKBgEOv4BRREPAQM1WGMUEtR25P
YA7G3BBnHPtQh3UPmn/xfcfYJi4T3FIsshUtL9qP9e5TfDZJxE+nYSC+D4CRC+qS
v41w2w7ReK6VNoRMjF4js2WLYhIZzx/7rYpeHjsu1DwCoyd99ESiVunMHJKbNW/2
kU+IWPinoAtqUE8j5tm/
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDAzCCAeugAwIBAgIJAPK4npdCZCtyMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
BAMMDXVzZXJpZnkubG9jYWwwHhcNMTkwMTAzMjE1NjAwWhcNMjgxMjMxMjE1NjAw
WjAYMRYwFAYDVQQDDA11c2VyaWZ5LmxvY2FsMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAnU3LIY3+Gf7JGaUxYVjdFcRYSkm9EzqeWzUZBbE3GyEeaQnw
/uU6Nh7vo+sCp4cdrYeG/QRhaHxplAhl0yLgh4rzabrGq69PTvaXff9YGQQoGVEu
6IZdH3IIyepVTHYGJFujblNnjubU+V+MiaD+xYSv2Z1Ruk8VoymWIO+4ZhxvkR66
QDn7t2Mey7DrC5L58qKRAnP8nlhNPdyncqTl8JYLXoTIX5nN7QmM5LgLBdZq+2xX
c1PnSP0Oyb4oPo8qRG9gaMc5fQn7EPsbDJZDYuhFvZfppiT4ofjdTmyh8Pu26x7s
4xpjFyB3Y3GFz6VP+oa/s9STfOR3AR3Pia4zHQIDAQABo1AwTjAdBgNVHQ4EFgQU
gfEEbH3VDCvwHAJcaNn7ANlFzdQwHwYDVR0jBBgwFoAUgfEEbH3VDCvwHAJcaNn7
ANlFzdQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAa8zkywX5Cbkg
UoBSGPdKXLVANTMPUMLiBjglONE/Dg2Jb5/xQu0AKWLFkKaxtQ4o1VpwdD89aSy8
5OBrQnCHlYiQ4V3inKJklTmMBfhMxGEYuBZca9//+bA7XTQ6ltkaaNQk1oL66cT/
iWgUPvoMM0WkBbkprsIGc6fmesWl6cJU17ODxqZXRZV0bUJ0VBlAPOpRLUZma4i1
yaxM9IEYqstk97JTja7hIn7gPdDPuAPo5BlHur/Zbe+qsXFMKYfAiujLOIVZq0ZT
0dTZbmnxssyTOQqkvyaB1tF3vFS9VxXknIIXjIlEZLfN9J65R/6BjNTZZqG8p6ZI
WchquYfo1Q==
-----END CERTIFICATE-----
Here's the very simple test script:
#! /usr/bin/env python
from paste import httpserver
def app(environ, start_response):
status = '200 OK'
output = 'Hello World!\n'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
httpserver.serve(
app, host='0.0.0.0',
port=8443, ssl_pem='self_signed.pem')
With 3.0.5 (sudo pip install paste==3.0.5
):
$ ./test.py
Traceback (most recent call last):
File "./test.py", line 15, in <module>
port=8443, ssl_pem='self_signed.pem')
File "/usr/local/lib/python2.7/dist-packages/paste/httpserver.py", line 1315, in serve
request_queue_size=request_queue_size)
File "/usr/local/lib/python2.7/dist-packages/paste/httpserver.py", line 1158, in __init__
request_queue_size=request_queue_size)
File "/usr/local/lib/python2.7/dist-packages/paste/httpserver.py", line 1137, in __init__
request_queue_size=request_queue_size)
File "/usr/local/lib/python2.7/dist-packages/paste/httpserver.py", line 399, in __init__
self.server_activate()
File "/usr/local/lib/python2.7/dist-packages/paste/httpserver.py", line 1120, in server_activate
self.socket.settimeout(1)
File "/usr/local/lib/python2.7/dist-packages/paste/httpserver.py", line 384, in settimeout
self._lock.acquire()
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 1415, in __getattr__
return getattr(self._socket, name)
AttributeError: '_socketobject' object has no attribute '_lock'
$ sudo pip install paste==3.0.4
Collecting paste==3.0.4
Using cached https://files.pythonhosted.org/packages/f8/ef/5882c90866f3cc1b285c75e1a8a8795c2207483c20480afcd9f88b5cfd49/Paste-3.0.4-py2.py3-none-any.whl
Requirement already satisfied: six>=1.4.0 in /usr/lib/python2.7/dist-packages (from paste==3.0.4) (1.10.0)
Installing collected packages: paste
Found existing installation: Paste 3.0.5
Uninstalling Paste-3.0.5:
Successfully uninstalled Paste-3.0.5
Successfully installed paste-3.0.4
$ ./test.py
serving on 0.0.0.0:8443 view at https://127.0.0.1:8443
This is Python 2.7.12 and can definitely provide versions of pyOpenSSL etc if desired.
Thank you again for your efforts on this!
The sdist package contains license in docs/license.txt
, but the package metadata does not point there. It would be great if either the PKG-INFO
contains something like (see PEP 639):
License-File: docs/license.txt
or the license is moved to LICENSE
file.
Thank you.
Hi guys,
I understand this is mostly in maintenance now, However , this is a fix that has been proposed and presented from the old repo, but at the time it wasnt being actively maintained.
Any objections? if so, what is the recommended path to adding said change?
Please see this link for background : https://bitbucket.org/ianb/paste/issues/18/add-ipv6-support
Hello,
Firstly, the code worked very well, thank you for that. I have some problems. I'd appreciate it if you could help.
1. Problem - I want to get path at the process_request. Define two separate thread pools and i want to add requests to the thread pool by paths. I can get path, but the request is terminated. My sample code is below.
def __init__(self, nworkers, daemon=False, **threadpool_options):
self.running = True
assert nworkers > 0, "ThreadPoolMixIn servers must have at least one worker"
self.thread_pool = ThreadPool(
nworkers,
"ThreadPoolMixIn HTTP server on %s:%d"
% (self.server_name, self.server_port),
daemon,
**threadpool_options)
def process_request(self, request, client_address):
request.setblocking(1)
path = str(request.makefile('rb', -1).readline(65537), 'iso-8859-1').rstrip('\r\n').split()[1]
self.thread_pool.add_task(
lambda: self.process_request_in_thread(request, client_address))
2. Problem - I want to set different timeout value of request by paths.
Thanks
I'm using Paste in combination with the Bottle framework (v0.12.16) and Python 3.7.
I get the following error when using redirects
File "C:\Users\johndoe\AppData\Local\Programs\Python\Python37-32\lib\site-packages\paste\httpserver.py", line 309, in wsgi_execute self.wsgi_write_chunk('') File "C:\Users\johndoe\AppData\Local\Programs\Python\Python37-32\lib\site-packages\paste\httpserver.py", line 167, in wsgi_write_chunk self.wfile.write(chunk) File "C:\Users\johndoe\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py", line 799, in write self._sock.sendall(b) TypeError: a bytes-like object is required, not 'str'
This seems to be caused by this line: self.wsgi_write_chunk('')
Changing it to self.wsgi_write_chunk(b'')
seems to fix the problem (in Python 3).
Hello,
paste's setup.py is not working with the latest version of setuptools 50.1+. I am getting this error:
Traceback (most recent call last):
File "/builddir/build/BUILD/Paste-3.4.0/setup.py", line 26, in <module>
setup(name="Paste",
File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python3.9/distutils/command/install.py", line 569, in run
self.run_command(cmd_name)
File "/usr/lib64/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.9/site-packages/setuptools/command/install_scripts.py", line 17, in run
import setuptools.command.easy_install as ei
File "/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 52, in <module>
from setuptools.package_index import (
File "/usr/lib/python3.9/site-packages/setuptools/package_index.py", line 13, in <module>
import html
File "/builddir/build/BUILD/Paste-3.4.0/paste/util/html.py", line 8, in <module>
from html import escape
ImportError: cannot import name 'escape' from partially initialized module 'html' (most likely due to a circular import) (/builddir/build/BUILD/Paste-3.4.0/paste/util/html.py)
Problem is that setuptools started to use the standard library html
module which name-conflicts with paste.util.html
. Paste's setup.py
inserts paste/util
tosys.path
:
https://github.com/cdent/paste/blob/3.4.0/setup.py#L19
And hence setuptools, when importing html
, imports paste/util/html.py
which tries to import html
as well, imports paste/util/html.py
...
I would suggest to delete paste/util
from sys.path
after importing finddata
. This way setuptools will use the correct html
module (or any other name-clashing module).
Have a nice day,
Tomas
I’m supporting some applications using an older version of Paste & PasteScript (1.7.5) and after the Paste 3.0.0 release, we can no longer install PasteScript from a requirements.txt file or on a single command line.
$ pip install Paste==1.7.5.1 PasteScript==1.7.5
with:
pip 18.1
setuptools 40.4.3
virtualenv 16.0.0
hits a maximum recursion depth after several minutes, while running setup.py for indirect dependency future-0.16.0:
Running future-0.16.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-J2tkub/future-0.16.0/egg-dist-tmp-CdWQdD
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-J2tkub/future-0.16.0/temp/easy_install-FpZEOa/future-0.16.0/temp/easy_install-tNYhgF/future-0.16.0/temp/easy_install-6FBafq/future-0.16.0/temp/easy_install-8E2U5i/future-0.16.0/temp/easy_install-F7xFsH/future-0.16.0/temp/easy_install-S0Urui/future-0.16.0/setup.py", line 186, in <module>
...
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 419, in _open
return _open(path, mode, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 419, in _open
return _open(path, mode, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 417, in _open
if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
RuntimeError: maximum recursion depth exceeded in cmp
PasteScript>=2 installs ok, but I don’t know whether it’s sufficiently compatible with our applications.
base64.encodestring
raises DeprecationWarning
and has been deprecated since Python 3.1 . base64.encodebytes
can be used to fix the warning.
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/webob/request.py", line 693, in body(self=<Request at 0x7f7f0059e240 POST http://sm-bli.ngrok.io/apps/outlook/user/feedbackRequest>)
self.make_body_seekable() # we need this to have content_length
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/webob/request.py", line 929, in make_body_seekable(self=<Request at 0x7f7f0059e240 POST http://sm-bli.ngrok.io/apps/outlook/user/feedbackRequest>)
self.copy_body()
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/webob/request.py", line 953, in copy_body(self=<Request at 0x7f7f0059e240 POST http://sm-bli.ngrok.io/apps/outlook/user/feedbackRequest>)
data = input.read(min(todo, 65535))
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/webob/request.py", line 1538, in readinto(self=<LimitedLengthFile(<paste.httpserver.ContinueHook object at 0x7f7f0058fc18 length=25>, maxlen=25)>, buff=<memory at 0x7f7f00ab0ac8>)
data = self.file.read(sz0)
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/paste/httpserver.py", line 493, in read(self=<paste.httpserver.ContinueHook object at 0x7f7f0058fc18 length=25>, length=25)
data = self.file.read(length)
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/paste/httpserver.py", line 93, in _ContinueFile_read(self=<paste.httpserver.ContinueHook object at 0x7f7f0058fc18>, size=25)
self._ContinueFile_send()
File "/home/vagrant/.virtualenvs/papi3/lib/python3.6/site-packages/paste/httpserver.py", line 86, in _ContinueFile_send(self=<paste.httpserver.ContinueHook object at 0x7f7f0058fc18>)
self._ContinueFile_write("HTTP/1.1 100 Continue\r\n\r\n")
File "/usr/lib/python3.6/socketserver.py", line 803, in write(self=<socketserver._SocketWriter object at 0x7f7f1c814828>, b='HTTP/1.1 100 Continue\r\n\r\n')
self._sock.sendall(b)
TypeError: a bytes-like object is required, not 'str'
It seems it is impossible to really change the TransLogger format. I can initiate the class it like this:
TransLogger(app, format=MY_FORMAT)
But MY_FORMAT really needs to align with the default one, otherwise it fails in
paste/translogger.py", line 99
There should be a CHANGELOG or similar in the docs or in the root
When I ran tox
for zopefoundation/z3c.evalexception
I got the following deprecation warning:
about to run tox for zopefoundation/z3c.evalexception, 158 of 287
/home/jugmac00/All/output_zope/zopefoundation/z3c.evalexception/.tox/4/py36/lib/python3.6/site-packages/paste/urlparser.py:10: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
tox4 run successful for zopefoundation/z3c.evalexception
disclaimer: I neither use z3c.evalexception
nor paste
, I just ran the upcoming tox4
on all Zope repositories
the server MUST NOT send a message body in the response (i.e., the response terminates at the end of the header section)
Even if the WSGI app is careful about this, the gzip middleware can violate this if the client is willing to accept gzip responses. This happens because simply opening the GzipFile
, even if no bytes are written to it, will result in writing the gzip header.
This is a problem because the spec doesn't say what happens if a server violates this MUST NOT clause. We've observed an upstream HAProxy 2 producing unexpected 502 errors to the originating client due to this (most likely in the presence of HTTP pipelining or keep-alive connections).
This can be produced easily. Given this python script, installed in a Python 3.x environment with Paste 3.2.5:
# paste_test.py
from wsgiref.simple_server import make_server
from paste.gzipper import middleware
def app(environ, start_response):
start_response('200 OK',
[('Content-Type', 'text/plain')])
return []
gzipped = middleware(app)
with make_server('', 8080, gzipped) as httpd:
httpd.serve_forever()
If we start it and make a request that doesn't allow a gzip response, we get back an empty body, and the server logs it as such:
$ python /tmp/paste_test.py &
[1] 79887
$ echo -e 'HEAD / HTTP/1.0\r\nAccept-Encoding: identity\r\n\r\n' | socat TCP4:localhost:8080 -
HTTP/1.0 200 OK
Date: Fri, 10 Jan 2020 13:08:50 GMT
Server: WSGIServer/0.2 CPython/3.8.1
Content-Type: text/plain
Content-Length: 0
127.0.0.1 - - [10/Jan/2020 07:08:50] "HEAD / HTTP/1.0" 200 0
Now, if we allow a gzip response, we can see that we get 20 bytes of gibberish data:
$ echo -e 'HEAD / HTTP/1.0\r\nAccept-Encoding: gzip\r\n\r\n' | socat TCP4:localhost:8080 -
HTTP/1.0 200 OK
Date: Fri, 10 Jan 2020 13:08:58 GMT
Server: WSGIServer/0.2 CPython/3.8.1
Content-Type: text/plain
content-encoding: gzip
Content-Length: 20
jw^�127.0.0.1 - - [10/Jan/2020 07:08:58] "HEAD / HTTP/1.0" 200 20
Which is exactly what you get simply opening and closing a GzipFile
:
>>> import io, gzip
>>> buf = io.BytesIO()
>>> f = gzip.GzipFile(mode='wb', fileobj=buf)
>>> buf.getvalue() # Header has already been written
b'\x1f\x8b\x08\x00%{\x18^\x02\xff'
>>> len(buf.getvalue())
10
>>> f.close()
None
>>> len(buf.getvalue()) # trailer has been added
20
I think a fix could be pretty simple, checking against the REQUEST_METHOD
:
--- gzipper.py.orig 2020-01-10 07:10:16.406705538 -0600
+++ gzipper.py 2020-01-10 07:11:38.635141468 -0600
@@ -25,7 +25,8 @@
self.compress_level = int(compress_level)
def __call__(self, environ, start_response):
- if 'gzip' not in environ.get('HTTP_ACCEPT_ENCODING', ''):
+ if 'gzip' not in environ.get('HTTP_ACCEPT_ENCODING', '') \
+ or environ['REQUEST_METHOD'] == 'HEAD':
# nothing for us to do, so this middleware will
# be a no-op:
return self.application(environ, start_response)
I'm happy to work up a PR if desired.
With the loss of pythonpaste.org it would be good to have a reasonable home for the docs. See https://docs.readthedocs.io/en/latest/intro/getting-started-with-sphinx.html
I'm attempting to grok this code:
If I call parse_formvars
twice, the GET parameters get duplicated since parsed.update()
is called again even when the "cached" short-circuit logic is hit. Is this behaviour desired for some usage case? The reason I am calling parse_formvars
twice is that I have some middleware that is wanting to pre-process some things before handing it off to the app.
thank you
Hello
I've some questions concerning this code from paste.deploy import loadapp
I can't find any deploy
module in the source code of paste
, also I don't find any entry_points or things like that related to deploy
your setup.py
or no dynamic definition of it in the __init__.py
mechanismes....
Maybe I missing something... so... can you indicate to me where I can find the deploy
module and the loadapp
function, and also explain how you load this module and the black magic behind that.
Do not hesitate to ask me questions if needed.
I waiting for your reply.
Thanks by advance for your help and your time :)
Looks like sphinx 4.2 shows some warnings on generate documentation.
+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.2.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 61 added, 0 changed, 0 removed
reading sources... [100%] url-parsing-with-wsgi
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/index.txt:14: WARNING: toctree contains reference to nonexisting document 'StyleGuide'
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/index.txt:14: WARNING: duplicated entry found in toctree: paste-httpserver-threadpool
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/index.txt:14: WARNING: duplicated entry found in toctree: testing-applications
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/index.txt:14: WARNING: duplicated entry found in toctree: url-parsing-with-wsgi
WARNING: autodoc: failed to import module 'fsdiff' from module 'paste.debug'; the following exception was raised:
No module named 'UserDict'
WARNING: don't know which module to import for autodocumenting 'Diff' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'Snapshot' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'File' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'Dir' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'report_expected_diffs' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'show_diff' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: autodoc: failed to import module 'prints' from module 'paste.debug'; the following exception was raised:
No module named 'cStringIO'
WARNING: don't know which module to import for autodocumenting 'PrintDebugMiddleware' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: autodoc: failed to import module 'profile' from module 'paste.debug'; the following exception was raised:
No module named 'hotshot'
WARNING: don't know which module to import for autodocumenting 'ProfileMiddleware' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'make_profile_middleware' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'profile_decorator' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: autodoc: failed to import module 'watchthreads' from module 'paste.debug'; the following exception was raised:
No module named 'cStringIO'
WARNING: don't know which module to import for autodocumenting 'WatchThreads' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'make_watch_threads' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'make_bad_app' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: autodoc: failed to import module 'wdg_validate' from module 'paste.debug'; the following exception was raised:
No module named 'cStringIO'
WARNING: don't know which module to import for autodocumenting 'WDGValidateMiddleware' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'make_wdg_validate_middleware' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: autodoc: failed to import module 'transaction' from module 'paste'; the following exception was raised:
No module named 'wsgilib'
WARNING: don't know which module to import for autodocumenting 'TransactionManagerMiddleware' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'ConnectionFactory' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: don't know which module to import for autodocumenting 'BasicTransactionHandler' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/include/reference_header.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.auth_tkt.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.basic.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.cas.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.cookie.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.digest.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.form.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.grantip.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/auth.multi.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/cascade.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/cgiapp.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/cgitb_catcher.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/debug.debugapp.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/debug.fsdiff.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/debug.prints.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/debug.profile.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/debug.watchthreads.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/debug.wdg_validate.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/errordocument.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/evalexception.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/exceptions.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/fileapp.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/fixture.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/gzipper.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/httpexceptions.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/httpheaders.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/httpserver.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/lint.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/pony.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/progress.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/proxy.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/recursive.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/registry.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/reloader.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/request.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/response.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/session.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/transaction.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/translogger.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/url.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/urlmap.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/urlparser.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/util.import_string.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/util.multidict.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/wsgilib.txt: WARNING: document isn't included in any toctree
/home/tkloczko/rpmbuild/BUILD/paste-3.5.0/docs/modules/wsgiwrappers.txt: WARNING: document isn't included in any toctree
done
writing... python-paste.3 { news future testing-applications url-parsing-with-wsgi do-it-yourself-framework paste-httpserver-threadpool developer-features DeveloperGuidelines community/index community/mailing-list community/repository download/index license } done
build succeeded, 74 warnings.
The manual pages are in build/sphinx/man.
+ /usr/bin/python3 -Bm pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/Paste-3.5.0, configfile: setup.cfg, testpaths: tests
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0
collected 151 items
tests/test_cgiapp.py .... [ 2%]
tests/test_cgitb_catcher.py .... [ 5%]
tests/test_config.py .... [ 7%]
tests/test_doctests.py .......... [ 14%]
tests/test_errordocument.py ..... [ 17%]
tests/test_fileapp.py .......... [ 24%]
tests/test_fixture.py ..... [ 27%]
tests/test_grantip.py .. [ 29%]
tests/test_gzipper.py .. [ 30%]
tests/test_httpheaders.py .......... [ 37%]
tests/test_httpserver.py ....... [ 41%]
tests/test_import_string.py .. [ 43%]
tests/test_multidict.py .. [ 44%]
tests/test_proxy.py . [ 45%]
tests/test_recursive.py .... [ 47%]
tests/test_registry.py ............. [ 56%]
tests/test_request.py .... [ 58%]
tests/test_request_form.py .. [ 60%]
tests/test_response.py . [ 60%]
tests/test_session.py .. [ 62%]
tests/test_urlmap.py .. [ 63%]
tests/test_urlparser.py ......... [ 69%]
tests/test_wsgilib.py .. [ 70%]
tests/test_wsgiwrappers.py .... [ 73%]
tests/test_auth/test_auth_cookie.py ... [ 75%]
tests/test_auth/test_auth_digest.py . [ 76%]
tests/test_auth/test_auth_tkt.py .. [ 77%]
tests/test_exceptions/test_error_middleware.py ..... [ 80%]
tests/test_exceptions/test_formatter.py ........ [ 86%]
tests/test_exceptions/test_httpexceptions.py ...... [ 90%]
tests/test_exceptions/test_reporter.py . [ 90%]
tests/test_util/test_datetimeutil.py ... [ 92%]
tests/test_util/test_mimeparse.py ......... [ 98%]
tests/test_util/test_quoting.py .. [100%]
============================================================================= warnings summary =============================================================================
tests/test_cgitb_catcher.py: 1 warning
tests/test_errordocument.py: 1 warning
tests/test_fileapp.py: 1 warning
tests/test_grantip.py: 1 warning
tests/test_recursive.py: 1 warning
tests/test_registry.py: 1 warning
tests/test_request.py: 1 warning
tests/test_urlmap.py: 1 warning
tests/test_urlparser.py: 1 warning
tests/test_exceptions/test_error_middleware.py: 1 warning
/usr/lib/python3.8/site-packages/_pytest/python.py:739: DeprecationWarning: setup_module is deprecated
func(arg)
tests/test_recursive.py::test_ForwardRequestException
/home/tkloczko/rpmbuild/BUILD/Paste-3.5.0/tests/test_recursive.py:104: DeprecationWarning: ForwardRequestException(path_info=...) has been deprecated; please use ForwardRequestException(url=...)
raise ForwardRequestException(path_info=self.url)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
===================================================================== 151 passed, 11 warnings in 2.06s =====================================================================
I would like to know what the licence of paste is 🙂. Thanks!
This project uses the imp
module which has been deprecated since Python 3.4 and removed in 3.12:
PendingDeprecationWarning
since 3.4 (2014)DeprecationWarning
since 3.5 (2015)DeprecationWarning
to say removal in 3.12 since 3.10 (2021)Python 3.12 is set for release on 2023-10-02 and this library is one of the top 5,000 most-downloaded from PyPI.
Please could you upgrade to use importlib
? The imp
docs have suggestions on what to use to replace each function and constant.
strftime %b changed to %m solves this
On create github release entry is created email notification to those whom have set in your repo the web UI Watch->Releases.
gh release can contain additional comments (li changelog) or additional assets like release tar balls (by default it contains only assets from git tag) however all those part are not obligatory.
In simplest variant gh release can be empty because subiekt of the sent email contains git tag name.
I'm asking because my automation process uses those email notifications by trying to make preliminary automated upgrades of building packages, which allows saving some time on maintaining packaging procedures.
Probably other people may be interested to be instantly informed about release new version as well.
Documentation and examples of generate gh releases:
https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
https://cli.github.com/manual/gh_release_upload/
https://github.com/marketplace/actions/github-release
https://pgjones.dev/blog/trusted-plublishing-2023/
jbms/sphinx-immaterial#281 (comment)
tox target to publish on pypi and make gh release https://github.com/jaraco/skeleton/blob/928e9a86d61d3a660948bcba7689f90216cc8243/tox.ini#L42-L58
This line in translogger.py : 99 fails if the locale is set to de_DE.UTF-8
10/M\xc3\xa4r/2023:11:32:15 +0200
Original Link plone/Products.CMFPlone#3072
Trying to install the 3.0.0 version causes a loop in the future-0.16.0 installation.
Lots of this:
Writing /tmp/easy_install-qrquXV/future-0.16.0/setup.cfg Running future-0.16.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-qrquXV/future-0.16.0/egg-dist-tmp-ig1YZv Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in save_modules saved_exc.resume() File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in resume six.reraise(type, exc, self._tb) File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in save_modules yield saved File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in run_setup _execfile(setup_script, ns) File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 45, in _execfile exec(code, globals, locals) File "/tmp/easy_install-qrquXV/future-0.16.0/temp/easy_install-dr0htN/future-0.16.0/temp/easy_install-gkS28V/future-0.16.0/temp/easy_install-doSr4k/future-0.16.0/temp/easy_install-B6piFf/future-0.16.0/temp/easy_install-oUQLUx/future-0.16.0/temp/easy_install-pqGnNg/future-0.16.0/setup.py", line 186, in <module>
...
Followed eventually by:
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 419, in _open return _open(path, mode, *args, **kw) File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 417, in _open if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): RuntimeError: maximum recursion depth exceeded in cmp
I can reproduce this with a clean install consistently.
The OpenSSL.tsafe
module has been deprecated. OpenSSL.tsafe.Connection
now simply points to OpenSSL.SSL.Connection
.
OpenSSL.tsafe
is used in httpserver.py
.
Paste uses the cgi package extensively in the main code as well as in tests.
The package is deprecated and will be removed in Python 3.13.
The main functions used are escape
and FieldStorage
. Replacing escape
is fairly straightforward, FieldStorage
less so.
This issue has been created to highlight that this is coming.
cgitb is also used and will be removed in the same Python version.
Fixes from consumers of Paste encouraged.
With Python 3.11 there is a test failure. The same test works with Python 3.10.
At first glance I would say that it's related to the DeprecationWarning
.
============================= test session starts ==============================
platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0
rootdir: /build/source, configfile: setup.cfg, testpaths: tests
collected 151 items / 2 deselected / 149 selected
tests/test_cgiapp.py .F.. [ 2%]
tests/test_cgitb_catcher.py .... [ 5%]
[...]
=================================== FAILURES ===================================
__________________________________ test_form ___________________________________
def test_form():
app = TestApp(CGIApplication({}, script='form.cgi', path=[data_dir]))
> res = app.post('', params={'name': b'joe'},
upload_files=[('up', 'file.txt', b'x'*10000)])
tests/test_cgiapp.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
paste/fixture.py:258: in post
return self._gen_request('POST', url, params=params, headers=headers,
paste/fixture.py:242: in _gen_request
return self.do_request(req, status=status)
paste/wsgilib.py:351: in raw_interactive
app_iter = application(basic_environ, start_response)
paste/lint.py:170: in lint_app
iterator = application(environ, start_response_wrapper)
paste/cgiapp.py:100: in __call__
proc_communicate(
paste/cgiapp.py:256: in proc_communicate
stderr.write(six.ensure_text(data))
paste/lint.py:221: in write
self.errors.write(s)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <paste.wsgilib.ErrorRaiser object at 0x7ffff548c9d0>
value = "/build/source/tests/cgiapp_data/form.cgi:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13\n import cgi\n"
def write(self, value):
if not value:
return
> raise AssertionError(
"No errors should be written (got: %r)" % value)
E AssertionError: No errors should be written (got: "/build/source/tests/cgiapp_data/form.cgi:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13\n import cgi\n")
paste/wsgilib.py:382: AssertionError
=============================== warnings summary ===============================
paste/request.py:20
/build/source/paste/request.py:20: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
paste/cgitb_catcher.py:12
/build/source/paste/cgitb_catcher.py:12: DeprecationWarning: 'cgitb' is deprecated and slated for removal in Python 3.13
import cgitb
paste/urlparser.py:10
/build/source/paste/urlparser.py:10: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
[...]
=========================== short test summary info ============================
I'm packaging Paste for OpenIndiana and during the package creation I run tests. Testing started to fail miserably with version 3.10.0:
============================= test session starts ==============================
platform sunos5 -- Python 3.9.19, pytest-8.1.1, pluggy-1.5.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: $(BUILD_DIR)
configfile: setup.cfg
testpaths: tests
collecting ... collected 54 items / 29 errors
==================================== ERRORS ====================================
_____________ ERROR collecting tests/test_auth/test_auth_cookie.py _____________
ImportError while importing test module '$(BUILD_DIR)/tests/test_auth/test_auth_cookie.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_auth/test_auth_cookie.py:5: in <module>
from paste.auth import cookie
E ModuleNotFoundError: No module named 'paste.auth'
_____________ ERROR collecting tests/test_auth/test_auth_digest.py _____________
ImportError while importing test module '$(BUILD_DIR)/tests/test_auth/test_auth_digest.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_auth/test_auth_digest.py:5: in <module>
from paste.auth.digest import digest_password, AuthDigestHandler
E ModuleNotFoundError: No module named 'paste.auth'
______________ ERROR collecting tests/test_auth/test_auth_tkt.py _______________
ImportError while importing test module '$(BUILD_DIR)/tests/test_auth/test_auth_tkt.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_auth/test_auth_tkt.py:4: in <module>
from paste.auth.auth_tkt import AuthTicket
E ModuleNotFoundError: No module named 'paste.auth'
____________________ ERROR collecting tests/test_cgiapp.py _____________________
ImportError while importing test module '$(BUILD_DIR)/tests/test_cgiapp.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_cgiapp.py:6: in <module>
from paste.cgiapp import CGIApplication, CGIError
E ModuleNotFoundError: No module named 'paste.cgiapp'
...
It looks like the testing started to ignore the PYTHONPATH
variable so it is unable to find the paste
that it is supposed to test.
When I do this:
--- Paste-3.10.0/tests/__init__.py.orig
+++ Paste-3.10.0/tests/__init__.py
@@ -1 +1,3 @@
"""Tests for Paste"""
+
+import pkg_resources
Then testing behaves far better and almost all tests pass, except this one:
__________________________________ test_form ___________________________________
def test_form():
app = TestApp(CGIApplication({}, script='form.cgi', path=[data_dir]))
> res = app.post('', params={'name': b'joe'},
upload_files=[('up', 'file.txt', b'x'*10000)])
tests/test_cgiapp.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
paste/fixture.py:264: in post
return self._gen_request('POST', url, params=params, headers=headers,
paste/fixture.py:248: in _gen_request
return self.do_request(req, status=status)
paste/wsgilib.py:350: in raw_interactive
app_iter = application(basic_environ, start_response)
paste/lint.py:169: in lint_app
iterator = application(environ, start_response_wrapper)
paste/cgiapp.py:105: in __call__
proc_communicate(
paste/cgiapp.py:260: in proc_communicate
stderr.write(ensure_text(data))
paste/lint.py:220: in write
self.errors.write(s)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <paste.wsgilib.ErrorRaiser object at 0x7ffface1a220>
value = 'Traceback (most recent call last):\n File "$(BUILD_DIR)/test...<module>\n from paste.util.field_storage import FieldStorage\nModuleNotFoundError: No module named \'paste.util\'\n'
def write(self, value):
if not value:
return
> raise AssertionError(
"No errors should be written (got: %r)" % value)
E AssertionError: No errors should be written (got: 'Traceback (most recent call last):\n File "$(BUILD_DIR)/tests/cgiapp_data/form.cgi", line 12, in <module>\n from paste.util.field_storage import FieldStorage\nModuleNotFoundError: No module named \'paste.util\'\n')
paste/wsgilib.py:381: AssertionError
isAlive
was deprecated and removed in Python 3.9 with python/cpython#15225 . Use is_alive
for Python 3.9 compatibility. I will raise a PR for this.
python -m paste.httpserver
serving on http://127.0.0.1:8888
^C
/home/xtreak/anaconda3/envs/nose2-venv/lib/python3.8/site-packages/paste/httpserver.py:955: DeprecationWarning: isAlive() is deprecated, use is_alive() instead
if worker.isAlive():
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.