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

Python 3.6.x support #1

Open
jefft opened this issue Jan 3, 2018 · 4 comments
Open

Python 3.6.x support #1

jefft opened this issue Jan 3, 2018 · 4 comments

Comments

@jefft
Copy link

jefft commented Jan 3, 2018

As the README notes, this works up to Python 3.5. Trying with 3.6.3 (the default in recent Ubuntu) yields sadness:

(testpynfsn) jturner@jturner-desktop:/tmp$ pynfsn member jturner accounts
Traceback (most recent call last):
  File "/tmp/testpynfsn/bin/pynfsn", line 7, in <module>
    from nfsn.cli import main
  File "/tmp/testpynfsn/lib/python3.6/site-packages/nfsn/__init__.py", line 2, in <module>
    from .nfsnbeanbag import NfsnBeanBag
  File "/tmp/testpynfsn/lib/python3.6/site-packages/nfsn/nfsnbeanbag.py", line 7, in <module>
    class NfsnBeanBag(BeanBag):
TypeError: __class__ set to <class 'nfsn.nfsnbeanbag.NfsnBeanBagBase'> defining 'NfsnBeanBag' as <class 'nfsn.nfsnbeanbag.NfsnBeanBag'>

I'm not sufficiently up to scratch on Python to offer a fix. A workaround is to install a local Python 3.5.4. On Ubuntu this works for me:

# Install Python 3.5.4
apt install libssl-dev openssl
cd /tmp
curl -OJ https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tar.xz
tar xf Python-3.5.4.tar.xz
cd Python-3.5.4/
./configure --prefix=$HOME/python3
make altinstall   # Per https://askubuntu.com/questions/682869/how-do-i-install-a-different-python-version-using-apt-get61249593366
cd /tmp
virtualenv --python=$HOME/python3/bin/python3.5 virtualenv
source virtualenv/bin/activate
pip install python-nfsn
pynfsn member jturner accounts   # Now works!
@ktdreyer
Copy link
Owner

ktdreyer commented Jan 3, 2018

Hi Jeff, you're right, this is broken in Python 3.6. I'm sorry I have not made time yet to look into whether it's python-nfsn or Beanbag itself that is broken here, though I'm definitely interested in resolving this.

@ktdreyer
Copy link
Owner

ktdreyer commented Jan 3, 2018

Possibly related: ajtowns/beanbag#11

joshkunz added a commit to joshkunz/nfsn-pingbot that referenced this issue Jul 28, 2019
* Fixes security vulnerability alert in urllib3 (requests dependency)
* Updates Bazel rules for new python_version semantics

Note: This is know not to work with python 3.6+ due to issue
ktdreyer/python-nfsn#1
@jeff-bowman
Copy link

For the time being, I've worked around the issue by running pip3 install git+https://github.com/stratakis/beanbag@8cea464660194f2628f9ae5fe797be8e690015c1, as that matches the ready-but-stale pull request ajtowns/beanbag#10. It would likely be sufficient to install git+https://github.com/stratakis/beanbag if you don't mind a branch that may change, or you could even refer to the pull request exactly.

I suppose you could also list one of those alternatives in python-nfsn's setup.py, though I don't know the rules or etiquette of listing a GitHub fork as a requirement instead of an officially-listed PyPI entry.

(Thank you for making and sharing this package, by the way! I'm glad there are still options to consume it.)

@ktdreyer
Copy link
Owner

ktdreyer commented Sep 9, 2021

Yeah we need to switch entirely away from Beanbag at this point.

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

No branches or pull requests

3 participants