mdeshmu commented on PR #24739:
URL: https://github.com/apache/superset/pull/24739#issuecomment-1642158085

   type hint in get_prequeries throws an error with Python 3.9 
   
   ```
   File "/app/superset/db_engine_specs/postgres.py", line 257, in 
PostgresEngineSpec
   catalog: str | None = None,
   TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
   ```
   
   So I changed it to `Optional[str] = None` in my local code. Then I get the 
below errors:
   
   1.
   ```
   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 
1086, in __getattr__
   return getattr(self.dbapi_connection, key)
   AttributeError: 'psycopg2.extensions.connection' object has no attribute 
'execute'
   ```
   2.
   ```
   File "/app/superset/models/core.py", line 524, in get_raw_connection
   for prequery in self.db_engine_spec.get_prequeries(schema=schema):
   TypeError: get_prequeries() missing 1 required positional argument: 'catalog'
   ```
   
   Happy to test further once these are addressed :)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to