uranusjr commented on PR #41048:
URL: https://github.com/apache/airflow/pull/41048#issuecomment-2257665886

   I don’t disagree that the way you want to use this sounds bad… but yeah the 
feature itself is not unreasonable. I wonder if instead of suppying kwargs, 
it’d be easier if we just `getimport` a generic callable, something like
   
   ```python
   def _default_session_maker(engine):
       return sessionmaker(
           autocommit=False,
           autoflush=False,
           bind=engine,
           expire_on_commit=False,
       )
   
   
   session_maker = conf.getimport("database", "sql_alchemy_session_maker") or 
_default_session_maker
   Session = scoped_session(session_maker(engine=engine))
   ```


-- 
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]

Reply via email to