Skip to content

Instantly share code, notes, and snippets.

@henribru
henribru / main.py
Last active April 6, 2022 19:19
`selectinload` doesn't load all relationships when used with `with_polymorphic` and subclasses have relationships with the same name
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, inspect
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, with_polymorphic, selectinload
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///:memory:', echo=True)
Session = sessionmaker(bind=engine)
Base = declarative_base()
$ poetry add google-ads
Using version ^3.2 for google-ads
Updating dependencies
Resolving dependencies...
[SolverProblemError]
The current project must support the following Python versions: ^2.7 || ^3.4
Because no versions of google-api-core match >1.7.0,<1.8.0 || >1.8.0,<1.8.1 || >1.8.1,<1.8.2 || >1.8.2,<1.9.0 || >1.9.0,<1.10.0 || >1.10.0,<1.11.0 || >1.11.0,<1.11.1 || >1.11.1,<1.12.0 || >1.12.0,<1.13.0 || >1.13.0,<1.14.0 || >1 .14.0,<1.14.1 || >1.14.1,<1.14.2 || >1.14.2,<2.0.0
and google-api-core (1.7.0) depends on futures (>=3.2.0), google-api-core (>=1.7.0,<1.8.0 || >1.8.0,<1.8.1 || >1.8. 1,<1.8.2 || >1.8.2,<1.9.0 || >1.9.0,<1.10.0 || >1.10.0,<1.11.0 || >1.11.0,<1.11.1 || >1.11.1,<1.12.0 || >1.12.0,<1.1 3.0 || >1.13.0,<1.14.0 || >1.14.0,<1.14.1 || >1.14.1,<1.14.2 || >1.14.2,<2.0.0) requires futures (>=3.2.0).
[tool.poetry]
name = "..."
version = "..."
description = "..."
authors = ["..."]
packages = [
{ include = "..." },
]
[tool.poetry.dependencies]
$ systeminfo
[...]
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17763 N/A Build 17763
[...]
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]
$ asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:IBM437 ex:IBM437)
$ systeminfo
[...]
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17763 N/A Build 17763
[...]
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]
$ asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:IBM437 ex:IBM437)