관리-도구
편집 파일: self_outdated_check.cpython-37.pyc
B ��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(e�)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 | �}t�|��� }|S )N)r �hashlib�sha224� hexdigest)�key� key_bytes�name� r ��/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/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 | _|rjtj�|dt| j��| _y&t| j��}t� |�| _ 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 ttj�| j ��s d S ttj�| j �� | j|�t�|d�}t j |ddd�}t| j ��}|�t |�� 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)r! r r"