Pyfa icon indicating copy to clipboard operation
Pyfa copied to clipboard

db_update.py script warnings

Open ZeroPointEnergy opened this issue 4 years ago • 4 comments

When running the db_update.py script I noticed a new warnings is appearing now

Example (there are 10 similar warnings)

/var/tmp/portage/games-util/pyfa-2.38.0/work/Pyfa-2.38.0/./db_update.py:128: SAWarning: relationship 'DynamicItem.applicableItems' will copy column mutaplasmids.typeID to column mutaplasmidItems.typeID, which conflicts with relationship(s): 'DynamicItemItem.mutaplasmid' (copies mutaplasmids.typeID to mutaplasmidItems.typeID). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
  instance = cls()

Not sure if this requires attention or if it can just be suppressed.

ZeroPointEnergy avatar Oct 28 '21 08:10 ZeroPointEnergy

SQL Alchemy version?

DarkFenX avatar Oct 28 '21 11:10 DarkFenX

1.4.23

It's indeed possible that a new version of this package is the cause. I don't remember seeing this messages when installing pyfa 2.37.0, but when I now reinstall it they appear.

ZeroPointEnergy avatar Oct 28 '21 11:10 ZeroPointEnergy

Can confirm that it's due to a newer version of sqlalchemy. We have a specific version listed in requirements.txt, any other version is technically unsupported. But I think we should leave this open until we get some time to look into it and determine the actual cause of it, and see if any of the fixes it suggests makes sense to implement

blitzmann avatar Mar 23 '22 05:03 blitzmann

I have fixed it on dep_facelift branch btw. But, let's keep it open since it's not in master yet.

DarkFenX avatar Mar 31 '22 18:03 DarkFenX