Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing proxy property to docstring #756

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

Gr3at
Copy link
Contributor

@Gr3at Gr3at commented Oct 8, 2023

Closes issues #461.

It's been quite some time since the issue was created and things might have changed.
While attempting to replicate the silent failure (mentioned by the issue creator), I received an informative error message from the PySocks package (socks.ProxyConnectionError: Error connecting to HTTP proxy example-proxy.com:8080: timed out).

To get the above error I just extended the basic publish example to include the proxy_args dictionary, including only the required keys.

# examples/publish_single.py
import context  # Ensures paho is in PYTHONPATH

import paho.mqtt.publish as publish
import socks

proxy_dict={
    "proxy_type": socks.HTTP,
    "proxy_addr": "example-proxy.com",
}

publish.single("paho/test/single", "boo", hostname="mqtt.eclipseprojects.io", proxy_args=proxy_dict)

The fact that I received an error for port 8080 raised a flag of a default value, which is the case.
PySocks has a DEFAULT_PORTS dictionary.

I extended the docstring, adding the port as optional.

@petersilva
Copy link
Contributor

can't accept a contribution with ECA...

@PierreF
Copy link
Contributor

PierreF commented Dec 31, 2023

For your contribution to be accepted, you will need to sign the ECA with the email used to do the commit: https://accounts.eclipse.org/user/eca

@Gr3at
Copy link
Contributor Author

Gr3at commented Jan 2, 2024

For your contribution to be accepted, you will need to sign the ECA with the email used to do the commit: https://accounts.eclipse.org/user/eca

happy new year.
signed the ECA.
also made a new commit to actually commit with a reply capable email (same as in the ECA)

@PierreF
Copy link
Contributor

PierreF commented Jan 3, 2024

Thank for your contribution.

@PierreF PierreF merged commit 3f71356 into eclipse:master Jan 3, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants