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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Socks5 proxy. #518

Merged
merged 8 commits into from Feb 25, 2017

Conversation

Projects
None yet
3 participants
@daimajia
Contributor

daimajia commented Feb 6, 2017

fix #517

I'm not quite sure if I'm doing the right thing. 馃ぃ

Please comment if I'm making mistake. 馃棧

@jh0ker

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Feb 13, 2017

Member

It looks okay to me, did you do a manual test to see if it works for you?

Member

jh0ker commented Feb 13, 2017

It looks okay to me, did you do a manual test to see if it works for you?

@jh0ker

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Feb 13, 2017

Member

BTW, you also have to edit the requirements accordingly (at least for travis) to prevent this error:

/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/urllib3/contrib/socks.py:37: DependencyWarning: SOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks.  For more information, see https://urllib3.readthedocs.io/en/latest/contrib.html#socks-proxies```
Member

jh0ker commented Feb 13, 2017

BTW, you also have to edit the requirements accordingly (at least for travis) to prevent this error:

/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/urllib3/contrib/socks.py:37: DependencyWarning: SOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks.  For more information, see https://urllib3.readthedocs.io/en/latest/contrib.html#socks-proxies```
@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

@jh0ker Get it. Thanks for your tips.

Contributor

daimajia commented Feb 13, 2017

@jh0ker Get it. Thanks for your tips.

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

@jh0ker I did a manual test, and it works well.

Contributor

daimajia commented Feb 13, 2017

@jh0ker I did a manual test, and it works well.

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

@jh0ker Any idea on this issue?

Contributor

daimajia commented Feb 13, 2017

@jh0ker Any idea on this issue?

@jh0ker

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Feb 13, 2017

Member

@daimajia that is expected behavior, no need for your to worry

Member

jh0ker commented Feb 13, 2017

@daimajia that is expected behavior, no need for your to worry

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

BTW. This issue

It looks all right for this PR. 馃槂

Contributor

daimajia commented Feb 13, 2017

BTW. This issue

It looks all right for this PR. 馃槂

@jh0ker

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Feb 13, 2017

Member

It would be preferred to list the dependency as an extra dependency, similar to ujson. You'd have to put it in setup.py. To prevent import errors on systems where it is not installed, I recommend you move the import into the if that starts in line 97 of request.py

Member

jh0ker commented Feb 13, 2017

It would be preferred to list the dependency as an extra dependency, similar to ujson. You'd have to put it in setup.py. To prevent import errors on systems where it is not installed, I recommend you move the import into the if that starts in line 97 of request.py

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

Good suggestion. I'll finish it ASAP.

Contributor

daimajia commented Feb 13, 2017

Good suggestion. I'll finish it ASAP.

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

@jh0ker Remove the PySocks dependency from requirements.txt, right? I'm not sure.

Contributor

daimajia commented Feb 13, 2017

@jh0ker Remove the PySocks dependency from requirements.txt, right? I'm not sure.

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

@jh0ker How about now?

Contributor

daimajia commented Feb 13, 2017

@jh0ker How about now?

@jh0ker

This comment has been minimized.

Show comment
Hide comment
@jh0ker

jh0ker Feb 13, 2017

Member

@daimajia yes, please

Member

jh0ker commented Feb 13, 2017

@daimajia yes, please

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

@jh0ker Done, please check it.

Contributor

daimajia commented Feb 13, 2017

@jh0ker Done, please check it.

@tsnoam

This comment has been minimized.

Show comment
Hide comment
@tsnoam

tsnoam Feb 13, 2017

Member

@daimajia Thank you for your good work. That's something we'd really like.

  1. I performed a very minimal test for your PR with ssh socks5 proxy and it works for me 馃憤
  2. There are two minor things I would like to fix before I merge (and already have the commits ready) but I can't push to your repo/branch (and save the ping pong of asking you to do them). Can you allow the maintainers to push? See: https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/
Member

tsnoam commented Feb 13, 2017

@daimajia Thank you for your good work. That's something we'd really like.

  1. I performed a very minimal test for your PR with ssh socks5 proxy and it works for me 馃憤
  2. There are two minor things I would like to fix before I merge (and already have the commits ready) but I can't push to your repo/branch (and save the ping pong of asking you to do them). Can you allow the maintainers to push? See: https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/
@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 13, 2017

Contributor

image

right? @tsnoam

Contributor

daimajia commented Feb 13, 2017

image

right? @tsnoam

@tsnoam

This comment has been minimized.

Show comment
Hide comment
@tsnoam

tsnoam Feb 14, 2017

Member

@daimajia
yes, it is good. must have been my fault earlier. anyway i pushed my small changes and after Travis will finish unitests, I believe we'll be able to merge.

Member

tsnoam commented Feb 14, 2017

@daimajia
yes, it is good. must have been my fault earlier. anyway i pushed my small changes and after Travis will finish unitests, I believe we'll be able to merge.

@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 15, 2017

Contributor

@tsnoam Thanks. 鉂わ笍

Contributor

daimajia commented Feb 15, 2017

@tsnoam Thanks. 鉂わ笍

@tsnoam

This comment has been minimized.

Show comment
Hide comment
@tsnoam

tsnoam Feb 25, 2017

Member

@daimajia
sorry for the delay. the failure in CI is irrelevant to your changes, so I'm merging the PR.
Thanks for the good work.
BTW, I see that you haven't added yourself to AUTHORS.rst. If you'd like being mentioned there, feel free to send a second PR.

Member

tsnoam commented Feb 25, 2017

@daimajia
sorry for the delay. the failure in CI is irrelevant to your changes, so I'm merging the PR.
Thanks for the good work.
BTW, I see that you haven't added yourself to AUTHORS.rst. If you'd like being mentioned there, feel free to send a second PR.

@tsnoam tsnoam merged commit e39afad into python-telegram-bot:master Feb 25, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@daimajia

This comment has been minimized.

Show comment
Hide comment
@daimajia

daimajia Feb 26, 2017

Contributor

@tsnoam Thanks, I'm pretty willing to add myself to the contributors list, I'm proud of contributing to this lib. 馃槉

Contributor

daimajia commented Feb 26, 2017

@tsnoam Thanks, I'm pretty willing to add myself to the contributors list, I'm proud of contributing to this lib. 馃槉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment