mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +03:00 
			
		
		
		
	Chore: remove coreapi/coreschema import from compat.py
This commit is contained in:
		
							parent
							
								
									f9132dc698
								
							
						
					
					
						commit
						051b6f682f
					
				| 
						 | 
					@ -23,32 +23,20 @@ except ImportError:
 | 
				
			||||||
    postgres_fields = None
 | 
					    postgres_fields = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# coreapi is required for CoreAPI schema generation
 | 
					# uritemplate is required for OpenAPI schema generation
 | 
				
			||||||
try:
 | 
					 | 
				
			||||||
    import coreapi
 | 
					 | 
				
			||||||
except ImportError:
 | 
					 | 
				
			||||||
    coreapi = None
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# uritemplate is required for OpenAPI and CoreAPI schema generation
 | 
					 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    import uritemplate
 | 
					    import uritemplate
 | 
				
			||||||
except ImportError:
 | 
					except ImportError:
 | 
				
			||||||
    uritemplate = None
 | 
					    uritemplate = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# coreschema is optional
 | 
					 | 
				
			||||||
try:
 | 
					 | 
				
			||||||
    import coreschema
 | 
					 | 
				
			||||||
except ImportError:
 | 
					 | 
				
			||||||
    coreschema = None
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# pyyaml is optional
 | 
					# pyyaml is optional
 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    import yaml
 | 
					    import yaml
 | 
				
			||||||
except ImportError:
 | 
					except ImportError:
 | 
				
			||||||
    yaml = None
 | 
					    yaml = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# inflection is optional
 | 
					# inflection is optional
 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    import inflection
 | 
					    import inflection
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user