Coder Social home page Coder Social logo

Comments (9)

zzzeek avatar zzzeek commented on May 27, 2024

pyodbc connector would appear to have been written as:

        if 'odbc_connect' in keys:
            connectors = [util.unquote_plus(keys.pop('odbc_connect'))]

for decades. so we'd have to do something with that. likely would be very backwards incompatible for those who are working around this right now (Which you can do using an escape code for the + sign)

from sqlalchemy.

CaselIT avatar CaselIT commented on May 27, 2024

Could we just document that the odbc_connect requeires escaping, like user and passwords?

from sqlalchemy.

zzzeek avatar zzzeek commented on May 27, 2024

we could do that!

from sqlalchemy.

zzzeek avatar zzzeek commented on May 27, 2024

but it looks like the current implementation is really wrong, is the thing. that unquote is likely left over from when the unquoting wasnt happening elsewhere.

from sqlalchemy.

gordthompson avatar gordthompson commented on May 27, 2024

but it looks like the current implementation is really wrong, is the thing. that unquote is likely left over from when the unquoting wasnt happening elsewhere.

That is true. The string is now already unquoted by that point, so the unquote_plus() is superfluous. I will submit a Gerrit patch shortly.

from sqlalchemy.

zzzeek avatar zzzeek commented on May 27, 2024

right but....if someone is sending + sign like you are because they want a space character....

thiis would need LOTS of test cases

from sqlalchemy.

sqla-tester avatar sqla-tester commented on May 27, 2024

Gord Thompson has proposed a fix for this issue in the main branch:

Avoid removing + from odbc_connect parameter values https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5248

from sqlalchemy.

gordthompson avatar gordthompson commented on May 27, 2024

if someone is sending + sign like you are because they want a space character....

Then the string would have to be completely manually quoted, and the + will have already been unquoted to a space before it hit that line in connectors/pyodbc.py

connectors = [unquote_plus(keys.pop("odbc_connect"))]

from sqlalchemy.

zzzeek avatar zzzeek commented on May 27, 2024

We need to have test cases both for string URLs that include ?connect_args=... as well as the form that you are using. We must exhaustively test that not a single URL that worked before would have any change in behavior whatsoever.

We've yet to have any changes to URL of any kind that have not produced immediate blowback and arguments.

from sqlalchemy.

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.