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

Added unicode value test and a bunch of unicode quoting fixes. #128

Merged
merged 1 commit into from
Oct 22, 2015

Conversation

obi1kenobi
Copy link
Contributor

If an ASCII-encodable unicode value is passed in as an argument for a String property, pyorient fails to quote it, generating queries like this one:

CREATE VERTEX unicode SET name='unicode test',value=unicode value

This is obviously not legal OrientDB SQL, and it caused parsing errors:

======================================================================
ERROR: testUnicode (tests.test_ogm.OGMUnicodeTestCase)
----------------------------------------------------------------------
...
PyOrientSQLParsingException: com.orientechnologies.orient.core.sql.OCommandSQLParsingException - Error on parsing command at position #0: Encountered " <IDENTIFIER> "value "" at line 1, column 61.
Was expecting one of:
    <EOF> 
...
----------------------------------------------------------------------

This PR partially fixes the problem -- general Unicode still doesn't work due to ASCII conversion issues, but ASCII-encodable unicode values work fine.

@Ostico
Copy link
Collaborator

Ostico commented Oct 22, 2015

Thank you @obi1kenobi

@obi1kenobi obi1kenobi deleted the unicode_representation_fixes branch October 22, 2015 22:24
@obi1kenobi
Copy link
Contributor Author

Thank you for accepting the fix! Any plans on when a new release is going to come out? I'm very interested in having an updated version up on PyPI.

@Ostico
Copy link
Collaborator

Ostico commented Oct 23, 2015

Hi @obi1kenobi ,
I upgraded to Version 1.4.6 last night on pypi also. Let me know if it works.

@obi1kenobi
Copy link
Contributor Author

I have a weird problem. I can see 1.4.6 as the newest version on PyPI, and yolk confirms this:

$ yolk -V pyorient
pyorient 1.4.6

However, when I try to install pyorient, it does two weird things. First, it installs version 1.4.4 as the newest version, and second, it claims 1.4.6 doesn't exist, and the only version in between is 1.4.5rc0.

$ pip install pyorient
Collecting pyorient
Installing collected packages: pyorient
Successfully installed pyorient-1.4.4
$ pip install pyorient --upgrade
Requirement already up-to-date: pyorient in <...>
<...>
$ pip install pyorient==1.4.6
Collecting pyorient==1.4.6
  Could not find a version that satisfies the requirement pyorient==1.4.6 (from versions: 1.0.0, 1.2.4, 1.2.5, 1.3.1, 1.4, 1.4.1, 1.4.2a0, 1.4.2, 1.4.3, 1.4.4, 1.4.5rc0)
No matching distribution found for pyorient==1.4.6

Any thoughts on why this is happening, or if this is something you can fix?

@Ostico
Copy link
Collaborator

Ostico commented Oct 23, 2015

Thank you for the feedback, I asked you to check because me too i had problems with pypi. I will fix as soon as possible upgrading to new version.

@mogui mogui self-assigned this Oct 28, 2015
@obi1kenobi
Copy link
Contributor Author

Any luck getting the new version up on pypi? I still can't update to 1.4.6 and I'd really love to have access to all the bugfixes that were recently made.

@mogui
Copy link
Owner

mogui commented Nov 9, 2015

Hi @obi1kenobi don't know what happened with pypi, hope that by uploading next version 1.4.7 it will fix the thing.
I'll work on that.
The quick fix is:

pip install pyorient --upgrade --pre 

it will install 1.4.6a

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