Giter Site home page Giter Site logo

Comments (5)

jaheba avatar jaheba commented on May 20, 2024

Note The ConfigParser module has been renamed to configparser in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3.

I guess ConfigParser is used hard in __init__.py

from pyhdb.

Balauue avatar Balauue commented on May 20, 2024

It is. For me it looks like the code was developed for 2.7 and not fully tested for python 3, although python 3.4 compatibility is advertised.

In the meantime I pulled the current version 0.3.0 from git and ran setup.py, resulting in various syntax errors (see below):

mbp:pyhdb balauue$ python3 setup.py install
running install
running bdist_egg
running egg_info
creating pyhdb.egg-info
writing pyhdb.egg-info/PKG-INFO
writing top-level names to pyhdb.egg-info/top_level.txt
writing dependency_links to pyhdb.egg-info/dependency_links.txt
writing manifest file 'pyhdb.egg-info/SOURCES.txt'
reading manifest file 'pyhdb.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyhdb.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/pyhdb
copying pyhdb/__init__.py -> build/lib/pyhdb
[...]
byte-compiling build/bdist.macosx-10.6-intel/egg/pyhdb/cursor.py to cursor.cpython-34.pyc
  File "build/bdist.macosx-10.6-intel/egg/pyhdb/cursor.py", line 37
    except TypeError, msg:
                    ^
SyntaxError: invalid syntax

[...]

byte-compiling build/bdist.macosx-10.6-intel/egg/pyhdb/protocol/parts.py to parts.cpython-34.pyc
  File "build/bdist.macosx-10.6-intel/egg/pyhdb/protocol/parts.py", line 555
    print 'writing lob buffers', row_lobs
                              ^
SyntaxError: Missing parentheses in call to 'print'

[...]

creating dist
creating 'dist/pyhdb-0.3.0-py3.4.egg' and adding 'build/bdist.macosx-10.6-intel/egg' to it
removing 'build/bdist.macosx-10.6-intel/egg' (and everything under it)
Processing pyhdb-0.3.0-py3.4.egg
creating /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyhdb-0.3.0-py3.4.egg
Extracting pyhdb-0.3.0-py3.4.egg to /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyhdb-0.3.0-py3.4.egg/pyhdb/cursor.py", line 37
    except TypeError, msg:
                    ^
SyntaxError: invalid syntax

  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyhdb-0.3.0-py3.4.egg/pyhdb/protocol/parts.py", line 555
    print 'writing lob buffers', row_lobs
                              ^
SyntaxError: Missing parentheses in call to 'print'

Adding pyhdb 0.3.0 to easy-install.pth file

Installed /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyhdb-0.3.0-py3.4.egg
Processing dependencies for pyhdb==0.3.0
Finished processing dependencies for pyhdb==0.3.0

from pyhdb.

ralhei avatar ralhei commented on May 20, 2024

Hi everyone,

it is true - although the code is announced as being 3.4 ready, the latest version(s) are actually not, simply because we had a lot of pressure to provide functionality for 2.7 without being able to make it compliant for 3.4 (again). This is definitely an issue and should be addressed but it is not clear (to me) how quickly this can be achieved.
@bsrdjan, @jarus : Should we remove the 3.4 compatibility flag for the moment until this issue is fixed?

from pyhdb.

Balauue avatar Balauue commented on May 20, 2024

Hi,

thanks for clarification. I really hope for a quick 3.4 compliance. For you experts it is probably not even big effort as you know your code.

I tried using 2to3 tool and manually migrating obvious problems. Now I can include the library but a single SELECT query already yields exceptions:

  File "[...]/pyhdb/protocol/segments.py", line 150, in unpack_from
    raise error.parts[0].errors[0]
pyhdb.exceptions.DatabaseError: error while parsing protocol

from pyhdb.

jarus avatar jarus commented on May 20, 2024

Fixed by d2be2fb.

from pyhdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.