Giter VIP home page Giter VIP logo

Comments (16)

regit avatar regit commented on July 30, 2024 15

Any news on this ? there is more and more problems with keeping an old urllib3

from django-revproxy.

eiva avatar eiva commented on July 30, 2024 4

It's become a problem...

from django-revproxy.

albertored avatar albertored commented on July 30, 2024 1

I tried the fix from @aausch and it seems to work (I'm using urllib3 1.22).
It has not been accepted yet because is still in testing?

from django-revproxy.

brianmay avatar brianmay commented on July 30, 2024 1

This version fixes all known issues, and all tests pass: master...brianmay:master

If/when I get push access to git, I also plan on merging #76.

from django-revproxy.

brianmay avatar brianmay commented on July 30, 2024 1

from django-revproxy.

seocam avatar seocam commented on July 30, 2024

Can you try to update the version and run the tests to make sure it still working?

from django-revproxy.

seocam avatar seocam commented on July 30, 2024

Looks like it's not working properly with newer versions because of their implementation of HTTPHeaderDict (https://github.com/shazow/urllib3/blob/118a936e1a44598aa2b2eed0e361310e05e47c6c/urllib3/_collections.py#L101). Last time this happened I had to work on there to fix what we needed. That might be the case again.

from django-revproxy.

brianmay avatar brianmay commented on July 30, 2024

There are problems with the latest urllib3 and the custom pool manager not taking a request_context parameter:

Traceback (most recent call last):
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/channels/handler.py", line 243, in process_exception_by_middleware
    return super(AsgiHandler, self).process_exception_by_middleware(exception, request)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 53, in inner
    return func(*args, **kwds)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/braces/views/_access.py", line 201, in dispatch
    request, *args, **kwargs)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/revproxy/views.py", line 200, in dispatch
    proxy_response = self._created_proxy_response(request, path)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/revproxy/views.py", line 157, in _created_proxy_response
    preload_content=False)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/urllib3/poolmanager.py", line 311, in urlopen
    conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/urllib3/poolmanager.py", line 227, in connection_from_host
    return self.connection_from_context(request_context)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/urllib3/poolmanager.py", line 240, in connection_from_context
    return self.connection_from_pool_key(pool_key, request_context=request_context)
  File "/Users/brianmay/.virtualenvs/myro/myrocc/lib/python3.6/site-packages/urllib3/poolmanager.py", line 261, in connection_from_pool_key
    pool = self._new_pool(scheme, host, port, request_context=request_context)
TypeError: _new_pool() got an unexpected keyword argument 'request_context'

For a similar bug report in requests, see psf/requests#4010

from django-revproxy.

brianmay avatar brianmay commented on July 30, 2024

Also, note that upgrading requests will result in urllib3 being upgraded too. Even if it does break this dependency.

from django-revproxy.

studio-salamander avatar studio-salamander commented on July 30, 2024

Hi for all!
Author, when will be fixed this issue:
django-revproxy 0.9.14 has requirement urllib3<1.17,>=1.12, but you'll have urllib3 1.22 which is incompatible.

from django-revproxy.

Blisk avatar Blisk commented on July 30, 2024

I still have the same problem on centos 7
django-revproxy 0.9.14 has requirement urllib3<1.17,>=1.12, but you'll have urllib3 1.21.1 which is incompatible.

from django-revproxy.

brianmay avatar brianmay commented on July 30, 2024

Version 0.9.14 included the following change:

class PoolManager(PoolManager_):
-    def _new_pool(self, scheme, host, port):
+    def _new_pool(self, scheme, host, port, request_context=None):
         """
         Create a new :class:`ConnectionPool` based on host, port and scheme.
         This method is used to actually create the connection pools handed out

Unfortunately, it did not update the bad requirements in setup.py.

Is this change still required?

Is django-revproxy now compatible with urllib 1.22? If so, How can we fix the requirement in setup.py?

If django-revproxy is still incompatible with urllib 1.22, how do we get this change merged?

Is this project dead?

from django-revproxy.

Herst avatar Herst commented on July 30, 2024

Is this project dead?

Ping @seocam, @rougeth, and @matheus-morfi.

from django-revproxy.

seocam avatar seocam commented on July 30, 2024

Hello @Herst and @brianmay!

Honestly I'm not having much time to maintain it. If you or anyone here is interested in help let me know and I'll add you as maintainers as well.

from django-revproxy.

brianmay avatar brianmay commented on July 30, 2024

from django-revproxy.

seocam avatar seocam commented on July 30, 2024

@brianmay for the sake of clarity would you mind doing a PR for each known issue instead of merging your master here?
Also please remember to update the Changelog! ;)

Your access is granted.

from django-revproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.