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

Initial Python>=3 support. #32

Closed
wants to merge 8 commits into from
Closed

Initial Python>=3 support. #32

wants to merge 8 commits into from

Conversation

jfsanchez91
Copy link

@jfsanchez91 jfsanchez91 commented Feb 20, 2020

Tested and working on Python2.7 and Python3 (3.5, 3.6, 3.7, 3.8).

@rgarrigue
Copy link

Hi @jfsanchez-gh

Gave a shot at your fork, it went 💥 . Tried with 3.6, 3.7, 3.8

~ ᐅ pyenv install 3.6.10
Downloading Python-3.6.10.tar.xz...
-> https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tar.xz
Installing Python-3.6.10...
Installed Python-3.6.10 to /home/remy/.pyenv/versions/3.6.10

~ ᐅ pyenv shell 3.6.10      
~ ᐅ python -mpip install pystun
Collecting pystun
  Using cached https://files.pythonhosted.org/packages/a9/72/0b6a4f8ad71f72ed3b3946a21084a8b3c17de10ddc5fc0dfec43c48fc768/pystun-0.1.0.tar.gz
Installing collected packages: pystun
  Running setup.py install for pystun ... done
Successfully installed pystun-0.1.0
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
~ ᐅ python                     
Python 3.6.10 (default, Jun  2 2020, 17:16:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import stun
>>> nat_type, external_ip, external_port = stun.get_ip_info()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/remy/.pyenv/versions/3.6.10/lib/python3.6/site-packages/stun/__init__.py", line 253, in get_ip_info
    stun_host=stun_host, stun_port=stun_port)
  File "/home/remy/.pyenv/versions/3.6.10/lib/python3.6/site-packages/stun/__init__.py", line 186, in get_nat_type
    _initialize()
  File "/home/remy/.pyenv/versions/3.6.10/lib/python3.6/site-packages/stun/__init__.py", line 93, in _initialize
    dictValToAttr.update({items[i][1]: items[i][0]})
TypeError: 'dict_items' object does not support indexing

Any advice ?

Copy link

@Ehco1996 Ehco1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks work

@jfsanchez91 jfsanchez91 closed this by deleting the head repository Jun 12, 2023
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.

None yet

3 participants