U ��.e�l � @ s� d dl mZmZmZ d dlZd dlZd dlZd dlZddlm Z m Z ddlmZm Z mZ G dd� de�ZG dd � d e eje��ZG d d� de�ZG dd � d e�Zdd� ZG dd� de�Ze�d�Zdd� Zdd� ZG dd� de�ZdS )� )�absolute_import�division�print_functionN� )�string_types�with_metaclass)�Version� LegacyVersion�parsec @ s e Zd ZdZdS )�InvalidSpecifierzH An invalid specifier was found, users should refer to PEP 440. N)�__name__� __module__�__qualname__�__doc__� r r �D/usr/lib/python3.8/site-packages/pip/_vendor/packaging/specifiers.pyr s r c @ s� e Zd Zejdd� �Zejdd� �Zejdd� �Zejdd� �Zej d d � �Z e jdd � �Z ejdd d��Zejddd��Z dS )� BaseSpecifierc C s dS )z� Returns the str representation of this Specifier like object. This should be representative of the Specifier itself. Nr ��selfr r r �__str__ s zBaseSpecifier.__str__c C s dS )zF Returns a hash value for this Specifier like object. Nr r r r r �__hash__ s zBaseSpecifier.__hash__c C s dS )zq Returns a boolean representing whether or not the two Specifier like objects are equal. Nr �r �otherr r r �__eq__# s zBaseSpecifier.__eq__c C s dS )zu Returns a boolean representing whether or not the two Specifier like objects are not equal. Nr r r r r �__ne__* s zBaseSpecifier.__ne__c C s dS )zg Returns whether or not pre-releases as a whole are allowed by this specifier. Nr r r r r �prereleases1 s zBaseSpecifier.prereleasesc C s dS )zd Sets whether or not pre-releases as a whole are allowed by this specifier. Nr �r �valuer r r r 8 s Nc C s dS )zR Determines if the given item is contained within this specifier. Nr �r �itemr r r r �contains? s zBaseSpecifier.containsc C s dS )z� Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it. Nr )r �iterabler r r r �filterE s zBaseSpecifier.filter)N)N)r r r �abc�abstractmethodr r r r �abstractpropertyr �setterr r" r r r r r s r c @ s� e Zd Zi Zd dd�Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zedd� �Z edd� �Zedd� �Zejdd� �Zdd� Zd!dd�Zd"dd�ZdS )#�_IndividualSpecifier� Nc C sF | j �|�}|std�|���|�d��� |�d��� f| _|| _d S )NzInvalid specifier: '{0}'�operator�version)�_regex�searchr �format�group�strip�_spec�_prereleases)r �specr �matchr r r �__init__Q s z_IndividualSpecifier.__init__c C s0 | j d k rd�| j�nd}d�| jjt| �|�S )N�, prereleases={0!r}r( z<{0}({1!r}{2})>)r1 r- r � __class__r �str�r Zprer r r �__repr__[ s ��z_IndividualSpecifier.__repr__c C s dj | j� S )Nz{0}{1})r- r0 r r r r r d s z_IndividualSpecifier.__str__c C s t | j�S �N)�hashr0 r r r r r g s z_IndividualSpecifier.__hash__c C sP t |t�r4z| �|�}W qD tk r0 t Y S X nt || j�sDtS | j|jkS r: �� isinstancer r6 r �NotImplementedr0 r r r r r j s z_IndividualSpecifier.__eq__c C sP t |t�r4z| �|�}W qD tk r0 t Y S X nt || j�sDtS | j|jkS r: r<