관리-도구
편집 파일: self_outdated_check.cpython-36.pyc
3 �Re{ � @ s" d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dlm Z d dlmZ d dlmZ d dlmZ d dlmZmZmZ d d lmZmZmZ d d lmZ d dlmZ er�d dl Z d dl!m"Z"m#Z#m$Z$m%Z% d d l&m'Z' dZ(ej)e*�Z+dd� Z,G dd� de-�Z.dd� Z/dd� Z0dS )� )�absolute_importN)�version)� ensure_binary)� LinkCollector)� PackageFinder)�SelectionPreferences)�adjacent_tmp_file�check_path_owner�replace)� ensure_dir�get_distribution�get_installed_version)� get_installer)�MYPY_CHECK_RUNNING)�Any�Dict�Text�Union)� PipSessionz%Y-%m-%dT%H:%M:%SZc C s t | �}tj|�j� }|S )N)r �hashlib�sha224� hexdigest)�key� key_bytes�name� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/self_outdated_check.py�_get_statefile_name* s r c @ s( e Zd Zdd� Zedd� �Zdd� ZdS )�SelfCheckStatec C sn i | _ d | _|rjtjj|dt| j��| _y&t| j��}tj |�| _ W d Q R X W n t ttfk rh Y nX d S )N� selfcheck) �state�statefile_path�os�path�joinr r �open�json�load�IOError� ValueError�KeyError)�self� cache_dir� statefiler r r �__init__2 s zSelfCheckState.__init__c C s t jS )N)�sys�prefix)r+ r r r r D s zSelfCheckState.keyc C s� | j s d S ttjj| j ��s d S ttjj| j �� | j|jt�|d�}t j |ddd�}t| j ��}|jt |�� W d Q R X yt|j| j � W n tk r� Y nX d S )N)r � last_check�pypi_versionT�,�:)� sort_keys� separators)r3 r4 )r! r r"