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

Is Python 3 supported #71

Open
mschop opened this issue Feb 25, 2020 · 6 comments
Open

Is Python 3 supported #71

mschop opened this issue Feb 25, 2020 · 6 comments

Comments

@mschop
Copy link

mschop commented Feb 25, 2020

Hi all,

I am irritated because of the inconsistency between the docs and the PIP package. Here (https://pypi.org/project/bots/) it says, that bots is compatible with Python 2.7, 3.4 and 3.5. But the docs explicitly says in multiple places, that Python >= 3.0 does not work. (Example: https://bots-edi.github.io/bots/installation.html#nix-installation)

Which information is correct?

Best Regards
mschop

@jwaschkau
Copy link

Hey,

we are using bots with Python 3.6 with some minor changes without problems. I think that all Python 3 versions are not officially support by bots and you may run into problems with some features.

@djfurman
Copy link
Member

@mschop you're very right and I apologize for the frustration in the inconsistencies. My own and several other core maintainers' schedules have the docs and even the code more than slightly out of date.

@jwaschkau is correct that there are some minor issues but we need to do a full update to not only python 3.x but also with all of the Django dependencies.

I'm leaving this issue open until we can correct it.

@djfurman
Copy link
Member

3.5 and 3.6 should work with the current version but please open issues for any incompatibilities and we'll get them patched as quickly as we can.

@AustEcon
Copy link

AustEcon commented May 30, 2020

I've been trying to get this working for python 3.5 on windows but no luck so far...

First one was
AttributeError: module 'html.parser' has no attribute 'HTMLParseError'
required django 1.8

which leads to:

Created a postgres db to match the settings.py and then tried using the bots-updatedb.py script but doesn't work with: "CRITICAL !Bots database is locked!"

Is python 3.5 supposed to be working for me on Windows? I tried 3.6 aswell and 3.7 but no luck...

@jwaschkau
Copy link

We have done following changes to get Python 3.6 compatibility for the features we use.

# lib/site-packages/django/utils/html_parser.py
try:
    HTMLParseError = _html_parser.HTMLParseError
except AttributeError:
    # create a dummy class for Python 3.5+ where it's been removed
    class HTMLParseError(Exception):
        pass
# lib/site.packages/cheroot/server.py
import six
from six.moves import queue
from six.moves import urllib
from six.moves import urllib_parse
urllib.parse = urllib_parse

@AustEcon
Copy link

AustEcon commented Jun 5, 2020

Brilliant - thanks for the response.

I was able to get python3.6 working with SQLite after some modifications.
Postgres doesn't work for me for some reason - something about user auth iirc...

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

4 participants