Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 11 23:38
    zzzeek unlabeled #6470
  • May 11 23:38
    zzzeek labeled #6470
  • May 11 23:09
    bfmcneill edited #6470
  • May 11 23:09
    bfmcneill labeled #6470
  • May 11 23:09
    bfmcneill opened #6470
  • May 11 18:09
    sqlalchemy-bot closed #6464
  • May 11 18:09

    sqlalchemy-bot on master

    allow CTE to be direct DML targ… Merge "allow CTE to be direct D… (compare)

  • May 11 18:08
    zzzeek reopened #6464
  • May 11 17:32
    woocy50 closed #6464
  • May 11 16:33
    CaselIT unlabeled #6469
  • May 11 16:33
    CaselIT labeled #6469
  • May 11 16:33
    CaselIT labeled #6469
  • May 11 15:51
    jimfulton labeled #6469
  • May 11 15:51
    jimfulton opened #6469
  • May 11 13:28
    zzzeek milestoned #6468
  • May 11 13:28
    zzzeek labeled #6468
  • May 11 13:28
    zzzeek labeled #6468
  • May 11 13:28
    zzzeek unlabeled #6468
  • May 11 13:25
    jimfulton opened #6468
  • May 11 13:25
    jimfulton labeled #6468
mike bayer
@zzzeek
we don't try to detect that it;s DECIMAL(10, 2) and not DECIMAL(10, 3)
Federico Caselli
@CaselIT
Ok. I can detect if user changes from increment=2 to increment=1
So I'll limit to that.
mike bayer
@zzzeek
it might be nice to add a new class of warnings that can be enabled for all the places where alembic makes a decision like this
Federico Caselli
@CaselIT
We can add a note somewhere and that's that I guess.
mike bayer
@zzzeek
ideally this would be documented and be positively identified progammatically, im referring mostly to the type comaprison logic but then places like this also
people would like that, to see where laembic is like, "hey i cant tell if these are different btw"
it would be a very noisy warning, so like a -vv kind of flag maybe
and we could even put a hook there
Federico Caselli
@CaselIT
I can add a warning of the type "ignoring comparisons of attributes since they are at default"
mike bayer
@zzzeek
@CaselIT yes but I am envisioning a more general API, like .ambiguous_comparison("type", model_obj, reflected_obj, "attribute X Y Z")
then there's some common API that different areas, like the part that compares Identity, the part that compares CheckConstraints, the part that comapres types, etc. can all call that thing
i.e. it's more interesting to me that we identify everywhere this happens
Federico Caselli
@CaselIT
We can add that to the list :)
Federico Caselli
@CaselIT
ok I'm making progress in the identity stuff. mostly tests left
Jonathan Vanasco
@jvanasco
@CaselIT is there a public api in sqlalchemy that shows what a column is reflected as (all the attributes) or is that code deeply nested in the logic that maps the output to a class/object?
Federico Caselli
@CaselIT
This returns a lost of dicts, that is used by reflect_table
Jonathan Vanasco
@jvanasco
Thanks. I am thinking of generating a file that shows what creating columns with Identity() and Identity(increment=2) reflects as - under each database
This way we can pick up any changes in database versions on unit tests
If a new database version changes, chances are it won't affect anything - but at least we will know
Federico Caselli
@CaselIT
+1
That would he useful
Jonathan Vanasco
@jvanasco
If we catch this in the CI tests when a database version updates, then we either update the dataset the tests check against... or have a fix released before anyone files a bug report.
mike bayer
@zzzeek
@CaselIT we have found our first bug because of the asyncpg "fallback" mode :)
e.g. a bug I missed due to it
Federico Caselli
@CaselIT
Well that was a typo. I still think it's worth having the ability to run the ci in non-fallback mode. I'll try to take another look at the gerrit after the identity saga ends to see of we can simply it a bit.
Jonathan Vanasco
@jvanasco
found a 1.4 docs issue!
I can generate a gerrit
Jonathan Vanasco
@jvanasco
Something I do not like, but am not sure how to handle - docs and potential code regarding what Identity is supported on.
Federico Caselli
@CaselIT
I've also found one: in query.with_for_update the link to the select method does not work https://docs.sqlalchemy.org/en/14/orm/query.html?highlight=with_for_update#sqlalchemy.orm.Query.with_for_update
Jonathan Vanasco
@jvanasco

I just tried to run some Identity tests, and was hitting a pg9 database by accident. That just gives a generic error: sqlalchemy.exc.ProgrammingError: (psycopg2.errors.SyntaxError) syntax error at or near "GENERATED"

This could potentially be more clear via docs or code that alerts users "Postgres 10 is needed for Identity Columns"

Federico Caselli
@CaselIT
I think it's written somewhere. Or maybe I'm mistaken
Jonathan Vanasco
@jvanasco
Running the same code against a Sqlite connection string does nothing, because sqlite doesn't support it sqlalchemy doesn't try to generate it
Jonathan Vanasco
@jvanasco
I created #5741 to track deprecated docs issues.
Federico Caselli
@CaselIT
neat!
Federico Caselli
@CaselIT
@zzzeek can you rerun the profiles for this one? https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2396
Jonathan Vanasco
@jvanasco
@CaselIT wow, a 9% reduction !
Federico Caselli
@CaselIT
well that's mostly python. I just replaced out version of ordered dict with the python one
Jonathan Vanasco
@jvanasco
@CaselIT i've had those tests go up and down about 6%; @zzzeek said it can just vary on runs, and usually clears out with a retrigger on the test. but 9%! that's new to me
Gord Thompson
@gordthompson
Hmm, I guess I'm not late for the meeint after all....
Federico Caselli
@CaselIT
nope
should we shine the mike signal?
🔦🦇
mike bayer
@zzzeek
hey
sorry
Federico Caselli
@CaselIT
wow it works :D
mike bayer
@zzzeek
i bought my wife a $2600 mac book pro for her birthday in october. it just stopped working