URLValidator optional schemes causes backward incompatible changes
    
    
    
      
      
      
        
For people who were using custom regex to restrict uri schemes this new optional feature causes a backwards incompatible change, because any scheme not listed in schemes param will not be validated, even if the regex matches the given url.
It would be nice to have a note in the backward incompatible changes documentation of Django 1.7.
       
     
   
 
      
        
        
          Change History
          (8)
        
          
  
  
  
    
      | Component: | Uncategorized → Core (Other) | 
    
      | Triage Stage: | Unreviewed → Accepted | 
    
      | Type: | Uncategorized → Cleanup/optimization | 
  
 
           
          
  
  
  
    
      | Component: | Core (Other) → Documentation | 
  
 
           
          
          
  
  
  
    
      | Triage Stage: | Accepted → Ready for checkin | 
  
 
           
          
  
  
  
    
      | Resolution: | → fixed | 
    
      | Status: | new → closed | 
  
 
           
          
          
          
          
         
       
     
        
    
    
    
Hi,
I'm not sure what the benefit of using a
URLValidatorover a plainRegexvalidatoris if you're using a customregexbut still, I think you're right.The following (simplified) code would pass under Django 1.6 but raises a
ValidationErrorunder 1.7:I wonder if there's a way to fix the backwards-compatibility issue rather than documenting it (maybe by disabling
schemesif a customregexhas been given but that might not be feasible in practice).If we can't fix the issue, then we should certainly document it.
Thanks.