Show all deprecation warnings occurring within corepos pkg
				
					
				
			This commit is contained in:
		
							parent
							
								
									cb58a26cb1
								
							
						
					
					
						commit
						e11963c4fc
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -24,6 +24,8 @@ | |||
| Rattail-COREPOS Config Extension | ||||
| """ | ||||
| 
 | ||||
| import warnings | ||||
| 
 | ||||
| from rattail.config import ConfigExtension | ||||
| from rattail.db.config import get_engines | ||||
| 
 | ||||
|  | @ -36,6 +38,11 @@ class RattailCOREPOSExtension(ConfigExtension): | |||
| 
 | ||||
|     def configure(self, config): | ||||
| 
 | ||||
|         # show deprecation warnings by default, when they occur in corepos | ||||
|         # (nb. rattail_corepos warnings are already shown, per rattail) | ||||
|         warnings.filterwarnings('default', category=DeprecationWarning, | ||||
|                                 module=r'^corepos') | ||||
| 
 | ||||
|         # office_op | ||||
|         from corepos.db.office_op import Session | ||||
|         engines = get_engines(config, section='corepos.db.office_op') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar