Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!LJHrmPosts_model.phpnu[db->get('employee'); return $query->result(); } public function get_one_employee($id) { $this->db->where('id', $id); $query = $this->db->get('employee'); return $query->result(); } public function get_leave_types() { $query = $this->db->get('tbl_leave'); return $query->result(); } public function get_all_department() { $query = $this->db->get('tbl_department'); return $query->result(); } public function get_all_title() { $query = $this->db->get('tbl_title'); return $query->result(); } public function get_theme() { $query = $this->db->get('tbl_theme'); return $query->result(); } public function get_theme_selected() { $this->db->order_by('date', 'desc'); $this->db->limit(1); $query = $this->db->get('tbl_theme'); return $query->result(); } } PK!y/FFLogin_model.phpnu[load->database(); } public function validate_user1($data) { $this->db->where('user_name', $data['user_name']); $this->db->where('password', $data['password']); return $this->db->get('users')->row(); } public function validate_user2($data) { $this->db->where('user_name', $data['user_name']); $this->db->where('password', $data['password']); return $this->db->get('customers')->row(); } public function remember_password1(){ $user_name= $this->security->xss_clean($this->input->post('user_name')); $this->db->where('school_email',$email); $this->db->where('user_name', $user_name); return $this->db->get('users')->row(); } public function remember_password2(){ $user_name= $this->security->xss_clean($this->input->post('user_name')); $this->db->where('email',$email); $this->db->where('user_name', $user_name); return $this->db->get('customers')->row(); } /* public function remember_password2(){ $email= $this->security->xss_clean($this->input->post('email')); $reg_number= $this->security->xss_clean($this->input->post('reg_number')); $this->db->where('email',$email); $this->db->where('reg_number', $reg_number); return $this->db->get('teachers')->row(); } */ } function __destruct() { $this->db->close(); } PK!( index.htmlnu[ 403 Forbidden

Directory access is forbidden.

PK! Post_model.phpnu[db->get('tbl_uni'); return $query->result_array(); } public function get_uni($id) { $this->db->where('id', $id); $query = $this->db->get('tbl_uni'); return $query->result(); } public function get_col($id) { $this->db->where('uni_id', $id); $query = $this->db->get('tbl_col'); return $query->result(); } public function get_one_col($id) { $this->db->where('id', $id); $query = $this->db->get('tbl_col'); return $query->result(); } public function count_position_votes($id){ $this->db->select ( '*' ); $this->db->from ( 'tbl_category' ); $this->db->join ( 'tbl_candidates', 'tbl_candidates.position_id = tbl_category.id' , 'left' ); $this->db->join ( 'tbl_poll', 'tbl_poll.candidate_id = tbl_candidates.id' , 'left' ); $this->db->where ( 'tbl_candidates.position_id',$id); $query = $this->db->get (); return $query->num_rows (); } public function get_col_categories($id) { $this->db->where('col_id', $id); $query = $this->db->get('tbl_category'); return $query->result(); } public function get_col_categories_voter() { $id_uni=$this->session->userdata('uni_id'); $id_col=$this->session->userdata('col_id'); $this->db->where('uni_id', $id_uni); $this->db->where('col_id', $id_col); $query = $this->db->get('tbl_category'); return $query->result(); } public function get_uni_uni_categories($id) { $this->db->where('position_level', 'uni'); $this->db->where('uni_id', $id); $query = $this->db->get('tbl_category'); return $query->result(); } public function get_admin($id) { $this->db->where('uni_id', $id); $query = $this->db->get('tbl_admins'); return $query->result(); } public function get_one_category($id) { $this->db->where('id', $id); $query = $this->db->get('tbl_category'); return $query->result(); } public function get_category_by_col($id) { // $where=array( // 'uni_id'=>'', // 'uni_col'=>'', // 'year'=>'' // ); $this->db->where('id', $id); $query = $this->db->get('tbl_category'); return $query->result(); } public function get_candidates_by_col($id) { $this->db->where('id', $id); $query = $this->db->get('tbl_candidates'); return $query->result(); } public function get_candidates_by_uni($id) { $this->db->where('id', $id); $query = $this->db->get('tbl_candidates'); return $query->result(); } public function check_user_email($id) { $this->db->where('username', $id); $query = $this->db->get('tbl_admins'); return $query->num_rows(); } } PK!ڰ6ASSUser_model.phpnu[db->select_sum('quantity')->from('branchStock') ->where('type','transfer') ->where('item_id',$item) ->where('inOut','transfer')->where('branch_id',$this->session->userdata('branch_id')) ->get()->result() as $row_sum){ $trfqty=$row_sum->quantity; } //transfered quantity sum... $rcvdqty=0; foreach($this->db->select_sum('quantity')->from('branchStock') ->where('type','transfer') ->where('item_id',$item) ->where('inOut','in')->where('branch_id',$this->session->userdata('branch_id')) ->get()->result() as $row_sum){ $rcvdqty=$row_sum->quantity; } $total2=0; $qty2=$qty=0; $this->db->where('type','normal'); $this->db->where('inOut','in'); $this->db->where('item_id',$item); $this->db->where('branch_id',$this->session->userdata('branch_id')); $query = $this->db->get('branchStock'); foreach ($query->result() as $rows) { $qty=$qty+$rows->quantity; } //items out $total2=0; $qty2=0; $this->db->where('type','normal'); $this->db->where('inOut','out'); $this->db->where('item_id',$item); $this->db->where('branch_id',$this->session->userdata('branch_id')); $query2 = $this->db->get('branchStock'); foreach ($query2->result() as $rows2) { $qty2=$qty2+$rows2->quantity; } $netqty=$qty-$qty2-$trfqty+$rcvdqty; return $netqty; } public function checkItemSold($item) { //sold quantity sum... $trfqty=0; foreach($this->db->select_sum('quantity')->from('branchStock') ->where('type','normal') ->where('item_id',$item) ->where('inOut','out')->where('branch_id',$this->session->userdata('branch_id')) ->get()->result() as $row_sum){ $trfqty=$row_sum->quantity; } return $trfqty; } public function change_passwords_reset() { $_SESSION['school_id'] = $this->session->userdata('school_id'); $pass = $this->security->xss_clean($this->input->post('password1')); $data1 = array( 'password_recover' => $pass, ); $this->db->select('password_recover'); $this->db->where('school_id', $_SESSION['school_id']); $this->db->update('schools', $data1); } public function check_password1() { $_SESSION['school_id'] = $this->session->userdata('school_id'); $_SESSION['reg_number'] = $this->session->userdata('reg_number'); $pass = $this->security->xss_clean($this->input->post('password')); $this->db->where('school_id', $_SESSION['school_id']); $this->db->where('reg_number', $_SESSION['reg_number']); $this->db->where('password', MD5($pass)); $query = $this->db->get('staffs'); return $query->num_rows(); } public function change_passwords1() { $_SESSION['school_id'] = $this->session->userdata('school_id'); $_SESSION['reg_number'] = $this->session->userdata('reg_number'); $pass = $this->security->xss_clean($this->input->post('password1')); $data1 = array( 'password' => MD5($pass), ); $this->db->select('passwaord'); $this->db->where('school_id', $_SESSION['school_id']); $this->db->where('reg_number', $_SESSION['reg_number']); $this->db->update('staffs', $data1); } public function change_passwords_reset1() { $_SESSION['school_id'] = $this->session->userdata('school_id'); $_SESSION['reg_number'] = $this->session->userdata('reg_number'); $pass = $this->security->xss_clean($this->input->post('password1')); $data1 = array( 'password_reset' => $pass, ); $this->db->select('password_reset'); $this->db->where('school_id', $_SESSION['school_id']); $this->db->where('reg_number', $_SESSION['reg_number']); $this->db->update('staffs', $data1); } } PK!news.phpnu[db->select('*'); $this->db->order_by("news.id", "desc"); $this->db->from('news'); $query = $this->db->get(); return $query->result_array(); } }PK!οE11 Newsmodel.phpnu[array('name'=>'ANDORRA','code'=>'376'), 'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'), 'AF'=>array('name'=>'AFGHANISTAN','code'=>'93'), 'AG'=>array('name'=>'ANTIGUA AND BARBUDA','code'=>'1268'), 'AI'=>array('name'=>'ANGUILLA','code'=>'1264'), 'AL'=>array('name'=>'ALBANIA','code'=>'355'), 'AM'=>array('name'=>'ARMENIA','code'=>'374'), 'AN'=>array('name'=>'NETHERLANDS ANTILLES','code'=>'599'), 'AO'=>array('name'=>'ANGOLA','code'=>'244'), 'AQ'=>array('name'=>'ANTARCTICA','code'=>'672'), 'AR'=>array('name'=>'ARGENTINA','code'=>'54'), 'AS'=>array('name'=>'AMERICAN SAMOA','code'=>'1684'), 'AT'=>array('name'=>'AUSTRIA','code'=>'43'), 'AU'=>array('name'=>'AUSTRALIA','code'=>'61'), 'AW'=>array('name'=>'ARUBA','code'=>'297'), 'AZ'=>array('name'=>'AZERBAIJAN','code'=>'994'), 'BA'=>array('name'=>'BOSNIA AND HERZEGOVINA','code'=>'387'), 'BB'=>array('name'=>'BARBADOS','code'=>'1246'), 'BD'=>array('name'=>'BANGLADESH','code'=>'880'), 'BE'=>array('name'=>'BELGIUM','code'=>'32'), 'BF'=>array('name'=>'BURKINA FASO','code'=>'226'), 'BG'=>array('name'=>'BULGARIA','code'=>'359'), 'BH'=>array('name'=>'BAHRAIN','code'=>'973'), 'BI'=>array('name'=>'BURUNDI','code'=>'257'), 'BJ'=>array('name'=>'BENIN','code'=>'229'), 'BL'=>array('name'=>'SAINT BARTHELEMY','code'=>'590'), 'BM'=>array('name'=>'BERMUDA','code'=>'1441'), 'BN'=>array('name'=>'BRUNEI DARUSSALAM','code'=>'673'), 'BO'=>array('name'=>'BOLIVIA','code'=>'591'), 'BR'=>array('name'=>'BRAZIL','code'=>'55'), 'BS'=>array('name'=>'BAHAMAS','code'=>'1242'), 'BT'=>array('name'=>'BHUTAN','code'=>'975'), 'BW'=>array('name'=>'BOTSWANA','code'=>'267'), 'BY'=>array('name'=>'BELARUS','code'=>'375'), 'BZ'=>array('name'=>'BELIZE','code'=>'501'), 'CA'=>array('name'=>'CANADA','code'=>'1'), 'CC'=>array('name'=>'COCOS (KEELING) ISLANDS','code'=>'61'), 'CD'=>array('name'=>'CONGO, THE DEMOCRATIC REPUBLIC OF THE','code'=>'243'), 'CF'=>array('name'=>'CENTRAL AFRICAN REPUBLIC','code'=>'236'), 'CG'=>array('name'=>'CONGO','code'=>'242'), 'CH'=>array('name'=>'SWITZERLAND','code'=>'41'), 'CI'=>array('name'=>'COTE D IVOIRE','code'=>'225'), 'CK'=>array('name'=>'COOK ISLANDS','code'=>'682'), 'CL'=>array('name'=>'CHILE','code'=>'56'), 'CM'=>array('name'=>'CAMEROON','code'=>'237'), 'CN'=>array('name'=>'CHINA','code'=>'86'), 'CO'=>array('name'=>'COLOMBIA','code'=>'57'), 'CR'=>array('name'=>'COSTA RICA','code'=>'506'), 'CU'=>array('name'=>'CUBA','code'=>'53'), 'CV'=>array('name'=>'CAPE VERDE','code'=>'238'), 'CX'=>array('name'=>'CHRISTMAS ISLAND','code'=>'61'), 'CY'=>array('name'=>'CYPRUS','code'=>'357'), 'CZ'=>array('name'=>'CZECH REPUBLIC','code'=>'420'), 'DE'=>array('name'=>'GERMANY','code'=>'49'), 'DJ'=>array('name'=>'DJIBOUTI','code'=>'253'), 'DK'=>array('name'=>'DENMARK','code'=>'45'), 'DM'=>array('name'=>'DOMINICA','code'=>'1767'), 'DO'=>array('name'=>'DOMINICAN REPUBLIC','code'=>'1809'), 'DZ'=>array('name'=>'ALGERIA','code'=>'213'), 'EC'=>array('name'=>'ECUADOR','code'=>'593'), 'EE'=>array('name'=>'ESTONIA','code'=>'372'), 'EG'=>array('name'=>'EGYPT','code'=>'20'), 'ER'=>array('name'=>'ERITREA','code'=>'291'), 'ES'=>array('name'=>'SPAIN','code'=>'34'), 'ET'=>array('name'=>'ETHIOPIA','code'=>'251'), 'FI'=>array('name'=>'FINLAND','code'=>'358'), 'FJ'=>array('name'=>'FIJI','code'=>'679'), 'FK'=>array('name'=>'FALKLAND ISLANDS (MALVINAS)','code'=>'500'), 'FM'=>array('name'=>'MICRONESIA, FEDERATED STATES OF','code'=>'691'), 'FO'=>array('name'=>'FAROE ISLANDS','code'=>'298'), 'FR'=>array('name'=>'FRANCE','code'=>'33'), 'GA'=>array('name'=>'GABON','code'=>'241'), 'GB'=>array('name'=>'UNITED KINGDOM','code'=>'44'), 'GD'=>array('name'=>'GRENADA','code'=>'1473'), 'GE'=>array('name'=>'GEORGIA','code'=>'995'), 'GH'=>array('name'=>'GHANA','code'=>'233'), 'GI'=>array('name'=>'GIBRALTAR','code'=>'350'), 'GL'=>array('name'=>'GREENLAND','code'=>'299'), 'GM'=>array('name'=>'GAMBIA','code'=>'220'), 'GN'=>array('name'=>'GUINEA','code'=>'224'), 'GQ'=>array('name'=>'EQUATORIAL GUINEA','code'=>'240'), 'GR'=>array('name'=>'GREECE','code'=>'30'), 'GT'=>array('name'=>'GUATEMALA','code'=>'502'), 'GU'=>array('name'=>'GUAM','code'=>'1671'), 'GW'=>array('name'=>'GUINEA-BISSAU','code'=>'245'), 'GY'=>array('name'=>'GUYANA','code'=>'592'), 'HK'=>array('name'=>'HONG KONG','code'=>'852'), 'HN'=>array('name'=>'HONDURAS','code'=>'504'), 'HR'=>array('name'=>'CROATIA','code'=>'385'), 'HT'=>array('name'=>'HAITI','code'=>'509'), 'HU'=>array('name'=>'HUNGARY','code'=>'36'), 'ID'=>array('name'=>'INDONESIA','code'=>'62'), 'IE'=>array('name'=>'IRELAND','code'=>'353'), 'IL'=>array('name'=>'ISRAEL','code'=>'972'), 'IM'=>array('name'=>'ISLE OF MAN','code'=>'44'), 'IN'=>array('name'=>'INDIA','code'=>'91'), 'IQ'=>array('name'=>'IRAQ','code'=>'964'), 'IR'=>array('name'=>'IRAN, ISLAMIC REPUBLIC OF','code'=>'98'), 'IS'=>array('name'=>'ICELAND','code'=>'354'), 'IT'=>array('name'=>'ITALY','code'=>'39'), 'JM'=>array('name'=>'JAMAICA','code'=>'1876'), 'JO'=>array('name'=>'JORDAN','code'=>'962'), 'JP'=>array('name'=>'JAPAN','code'=>'81'), 'KE'=>array('name'=>'KENYA','code'=>'254'), 'KG'=>array('name'=>'KYRGYZSTAN','code'=>'996'), 'KH'=>array('name'=>'CAMBODIA','code'=>'855'), 'KI'=>array('name'=>'KIRIBATI','code'=>'686'), 'KM'=>array('name'=>'COMOROS','code'=>'269'), 'KN'=>array('name'=>'SAINT KITTS AND NEVIS','code'=>'1869'), 'KP'=>array('name'=>'KOREA DEMOCRATIC PEOPLES REPUBLIC OF','code'=>'850'), 'KR'=>array('name'=>'KOREA REPUBLIC OF','code'=>'82'), 'KW'=>array('name'=>'KUWAIT','code'=>'965'), 'KY'=>array('name'=>'CAYMAN ISLANDS','code'=>'1345'), 'KZ'=>array('name'=>'KAZAKSTAN','code'=>'7'), 'LA'=>array('name'=>'LAO PEOPLES DEMOCRATIC REPUBLIC','code'=>'856'), 'LB'=>array('name'=>'LEBANON','code'=>'961'), 'LC'=>array('name'=>'SAINT LUCIA','code'=>'1758'), 'LI'=>array('name'=>'LIECHTENSTEIN','code'=>'423'), 'LK'=>array('name'=>'SRI LANKA','code'=>'94'), 'LR'=>array('name'=>'LIBERIA','code'=>'231'), 'LS'=>array('name'=>'LESOTHO','code'=>'266'), 'LT'=>array('name'=>'LITHUANIA','code'=>'370'), 'LU'=>array('name'=>'LUXEMBOURG','code'=>'352'), 'LV'=>array('name'=>'LATVIA','code'=>'371'), 'LY'=>array('name'=>'LIBYAN ARAB JAMAHIRIYA','code'=>'218'), 'MA'=>array('name'=>'MOROCCO','code'=>'212'), 'MC'=>array('name'=>'MONACO','code'=>'377'), 'MD'=>array('name'=>'MOLDOVA, REPUBLIC OF','code'=>'373'), 'ME'=>array('name'=>'MONTENEGRO','code'=>'382'), 'MF'=>array('name'=>'SAINT MARTIN','code'=>'1599'), 'MG'=>array('name'=>'MADAGASCAR','code'=>'261'), 'MH'=>array('name'=>'MARSHALL ISLANDS','code'=>'692'), 'MK'=>array('name'=>'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF','code'=>'389'), 'ML'=>array('name'=>'MALI','code'=>'223'), 'MM'=>array('name'=>'MYANMAR','code'=>'95'), 'MN'=>array('name'=>'MONGOLIA','code'=>'976'), 'MO'=>array('name'=>'MACAU','code'=>'853'), 'MP'=>array('name'=>'NORTHERN MARIANA ISLANDS','code'=>'1670'), 'MR'=>array('name'=>'MAURITANIA','code'=>'222'), 'MS'=>array('name'=>'MONTSERRAT','code'=>'1664'), 'MT'=>array('name'=>'MALTA','code'=>'356'), 'MU'=>array('name'=>'MAURITIUS','code'=>'230'), 'MV'=>array('name'=>'MALDIVES','code'=>'960'), 'MW'=>array('name'=>'MALAWI','code'=>'265'), 'MX'=>array('name'=>'MEXICO','code'=>'52'), 'MY'=>array('name'=>'MALAYSIA','code'=>'60'), 'MZ'=>array('name'=>'MOZAMBIQUE','code'=>'258'), 'NA'=>array('name'=>'NAMIBIA','code'=>'264'), 'NC'=>array('name'=>'NEW CALEDONIA','code'=>'687'), 'NE'=>array('name'=>'NIGER','code'=>'227'), 'NG'=>array('name'=>'NIGERIA','code'=>'234'), 'NI'=>array('name'=>'NICARAGUA','code'=>'505'), 'NL'=>array('name'=>'NETHERLANDS','code'=>'31'), 'NO'=>array('name'=>'NORWAY','code'=>'47'), 'NP'=>array('name'=>'NEPAL','code'=>'977'), 'NR'=>array('name'=>'NAURU','code'=>'674'), 'NU'=>array('name'=>'NIUE','code'=>'683'), 'NZ'=>array('name'=>'NEW ZEALAND','code'=>'64'), 'OM'=>array('name'=>'OMAN','code'=>'968'), 'PA'=>array('name'=>'PANAMA','code'=>'507'), 'PE'=>array('name'=>'PERU','code'=>'51'), 'PF'=>array('name'=>'FRENCH POLYNESIA','code'=>'689'), 'PG'=>array('name'=>'PAPUA NEW GUINEA','code'=>'675'), 'PH'=>array('name'=>'PHILIPPINES','code'=>'63'), 'PK'=>array('name'=>'PAKISTAN','code'=>'92'), 'PL'=>array('name'=>'POLAND','code'=>'48'), 'PM'=>array('name'=>'SAINT PIERRE AND MIQUELON','code'=>'508'), 'PN'=>array('name'=>'PITCAIRN','code'=>'870'), 'PR'=>array('name'=>'PUERTO RICO','code'=>'1'), 'PT'=>array('name'=>'PORTUGAL','code'=>'351'), 'PW'=>array('name'=>'PALAU','code'=>'680'), 'PY'=>array('name'=>'PARAGUAY','code'=>'595'), 'QA'=>array('name'=>'QATAR','code'=>'974'), 'RO'=>array('name'=>'ROMANIA','code'=>'40'), 'RS'=>array('name'=>'SERBIA','code'=>'381'), 'RU'=>array('name'=>'RUSSIAN FEDERATION','code'=>'7'), 'RW'=>array('name'=>'RWANDA','code'=>'250'), 'SA'=>array('name'=>'SAUDI ARABIA','code'=>'966'), 'SB'=>array('name'=>'SOLOMON ISLANDS','code'=>'677'), 'SC'=>array('name'=>'SEYCHELLES','code'=>'248'), 'SD'=>array('name'=>'SUDAN','code'=>'249'), 'SE'=>array('name'=>'SWEDEN','code'=>'46'), 'SG'=>array('name'=>'SINGAPORE','code'=>'65'), 'SH'=>array('name'=>'SAINT HELENA','code'=>'290'), 'SI'=>array('name'=>'SLOVENIA','code'=>'386'), 'SK'=>array('name'=>'SLOVAKIA','code'=>'421'), 'SL'=>array('name'=>'SIERRA LEONE','code'=>'232'), 'SM'=>array('name'=>'SAN MARINO','code'=>'378'), 'SN'=>array('name'=>'SENEGAL','code'=>'221'), 'SO'=>array('name'=>'SOMALIA','code'=>'252'), 'SR'=>array('name'=>'SURINAME','code'=>'597'), 'ST'=>array('name'=>'SAO TOME AND PRINCIPE','code'=>'239'), 'SV'=>array('name'=>'EL SALVADOR','code'=>'503'), 'SY'=>array('name'=>'SYRIAN ARAB REPUBLIC','code'=>'963'), 'SZ'=>array('name'=>'SWAZILAND','code'=>'268'), 'TC'=>array('name'=>'TURKS AND CAICOS ISLANDS','code'=>'1649'), 'TD'=>array('name'=>'CHAD','code'=>'235'), 'TG'=>array('name'=>'TOGO','code'=>'228'), 'TH'=>array('name'=>'THAILAND','code'=>'66'), 'TJ'=>array('name'=>'TAJIKISTAN','code'=>'992'), 'TK'=>array('name'=>'TOKELAU','code'=>'690'), 'TL'=>array('name'=>'TIMOR-LESTE','code'=>'670'), 'TM'=>array('name'=>'TURKMENISTAN','code'=>'993'), 'TN'=>array('name'=>'TUNISIA','code'=>'216'), 'TO'=>array('name'=>'TONGA','code'=>'676'), 'TR'=>array('name'=>'TURKEY','code'=>'90'), 'TT'=>array('name'=>'TRINIDAD AND TOBAGO','code'=>'1868'), 'TV'=>array('name'=>'TUVALU','code'=>'688'), 'TW'=>array('name'=>'TAIWAN, PROVINCE OF CHINA','code'=>'886'), 'TZ'=>array('name'=>'TANZANIA, UNITED REPUBLIC OF','code'=>'255'), 'UA'=>array('name'=>'UKRAINE','code'=>'380'), 'UG'=>array('name'=>'UGANDA','code'=>'256'), 'US'=>array('name'=>'UNITED STATES','code'=>'1'), 'UY'=>array('name'=>'URUGUAY','code'=>'598'), 'UZ'=>array('name'=>'UZBEKISTAN','code'=>'998'), 'VA'=>array('name'=>'HOLY SEE (VATICAN CITY STATE)','code'=>'39'), 'VC'=>array('name'=>'SAINT VINCENT AND THE GRENADINES','code'=>'1784'), 'VE'=>array('name'=>'VENEZUELA','code'=>'58'), 'VG'=>array('name'=>'VIRGIN ISLANDS, BRITISH','code'=>'1284'), 'VI'=>array('name'=>'VIRGIN ISLANDS, U.S.','code'=>'1340'), 'VN'=>array('name'=>'VIET NAM','code'=>'84'), 'VU'=>array('name'=>'VANUATU','code'=>'678'), 'WF'=>array('name'=>'WALLIS AND FUTUNA','code'=>'681'), 'WS'=>array('name'=>'SAMOA','code'=>'685'), 'XK'=>array('name'=>'KOSOVO','code'=>'381'), 'YE'=>array('name'=>'YEMEN','code'=>'967'), 'YT'=>array('name'=>'MAYOTTE','code'=>'262'), 'ZA'=>array('name'=>'SOUTH AFRICA','code'=>'27'), 'ZM'=>array('name'=>'ZAMBIA','code'=>'260'), 'ZW'=>array('name'=>'ZIMBABWE','code'=>'263') ); return $countryArray; } private function countrySelector($defaultCountry = ""){ $countryArray = $this->country_list(); $output=""; foreach($countryArray as $code => $country){ if($code==strtoupper($defaultCountry)){ $output .= ""; break; } //$countryName = ucwords(strtolower($country["name"])); // Making it look good //$output .= ""; } return $output; // or echo $output; to print directly } private function ip_info($ip = NULL, $purpose = "countrycode", $deep_detect = TRUE) { $output = NULL; if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) { $ip = $_SERVER["REMOTE_ADDR"]; if ($deep_detect) { if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_CLIENT_IP']; } } $purpose = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose))); $support = array("country", "countrycode", "state", "region", "city", "location", "address"); $continents = array( "AF" => "Africa", "AN" => "Antarctica", "AS" => "Asia", "EU" => "Europe", "OC" => "Australia (Oceania)", "NA" => "North America", "SA" => "South America" ); if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip)); if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { switch ($purpose) { case "location": $output = array( "city" => @$ipdat->geoplugin_city, "state" => @$ipdat->geoplugin_regionName, "country" => @$ipdat->geoplugin_countryName, "country_code" => @$ipdat->geoplugin_countryCode, "continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)], "continent_code" => @$ipdat->geoplugin_continentCode ); break; case "address": $address = array($ipdat->geoplugin_countryName); if (@strlen($ipdat->geoplugin_regionName) >= 1) $address[] = $ipdat->geoplugin_regionName; if (@strlen($ipdat->geoplugin_city) >= 1) $address[] = $ipdat->geoplugin_city; $output = implode(", ", array_reverse($address)); break; case "city": $output = @$ipdat->geoplugin_city; break; case "state": $output = @$ipdat->geoplugin_regionName; break; case "region": $output = @$ipdat->geoplugin_regionName; break; case "country": $output = @$ipdat->geoplugin_countryName; break; case "countrycode": $output = @$ipdat->geoplugin_countryCode; break; } } } return $output; } public function myCountry(){ $countryCode=""; if(isset($_SERVER['REMOTE_ADDR'])){ $ip = $_SERVER['REMOTE_ADDR']; $countryCode = $this->ip_info($ip); } $select = $this->countrySelector($countryCode); return $select; } } PK!l.GPost.phpnu[tblName = 'posts'; } /* * Fetch posts data from the database * @param id returns a single record if specified, otherwise all records */ function getRows($params = array()){ $this->db->select('*'); $this->db->from($this->tblName); //fetch data by conditions if(array_key_exists("where",$params)){ foreach ($params['where'] as $key => $value){ $this->db->where($key,$value); } } if(array_key_exists("order_by",$params)){ $this->db->order_by($params['order_by']); } if(array_key_exists("id",$params)){ $this->db->where('id',$params['id']); $query = $this->db->get(); $result = $query->row_array(); }else{ //set start and limit if(array_key_exists("start",$params) && array_key_exists("limit",$params)){ $this->db->limit($params['limit'],$params['start']); }elseif(!array_key_exists("start",$params) && array_key_exists("limit",$params)){ $this->db->limit($params['limit']); } if(array_key_exists("returnType",$params) && $params['returnType'] == 'count'){ $result = $this->db->count_all_results(); }else{ $query = $this->db->get(); $result = ($query->num_rows() > 0)?$query->result_array():FALSE; } } //return fetched data return $result; } }PK!gGG __init__.pynu[from pip.models.index import Index, PyPI __all__ = ["Index", "PyPI"] PK!g'' __pycache__/index.cpython-36.pycnu[3 Pf@s(ddlmZGdddeZedZdS))parsec@seZdZddZddZdS)IndexcCs<||_tj|j|_|jd|_|jd|_|jd|_dS)NZsimpleZpypiz pypi/pip/json)url urllib_parseZurlsplitZnetloc url_to_pathZ simple_urlZpypi_urlZ pip_json_url)selfrr/usr/lib/python3.6/index.py__init__s   zIndex.__init__cCstj|j|S)N)rZurljoinr)rpathrrr r szIndex.url_to_pathN)__name__ __module__ __qualname__r rrrrr rsrzhttps://pypi.python.org/N)Zpip._vendor.six.moves.urllibrrobjectrZPyPIrrrr s  PK!~{C#__pycache__/__init__.cpython-36.pycnu[3 PfG@sddlmZmZddgZdS))IndexPyPIrrN)Zpip.models.indexrr__all__rr/usr/lib/python3.6/__init__.pysPK!~{C)__pycache__/__init__.cpython-36.opt-1.pycnu[3 PfG@sddlmZmZddgZdS))IndexPyPIrrN)Zpip.models.indexrr__all__rr/usr/lib/python3.6/__init__.pysPK!g''&__pycache__/index.cpython-36.opt-1.pycnu[3 Pf@s(ddlmZGdddeZedZdS))parsec@seZdZddZddZdS)IndexcCs<||_tj|j|_|jd|_|jd|_|jd|_dS)NZsimpleZpypiz pypi/pip/json)url urllib_parseZurlsplitZnetloc url_to_pathZ simple_urlZpypi_urlZ pip_json_url)selfrr/usr/lib/python3.6/index.py__init__s   zIndex.__init__cCstj|j|S)N)rZurljoinr)rpathrrr r szIndex.url_to_pathN)__name__ __module__ __qualname__r rrrrr rsrzhttps://pypi.python.org/N)Zpip._vendor.six.moves.urllibrrobjectrZPyPIrrrr s  PK!hN2mindex.pynu[from pip._vendor.six.moves.urllib import parse as urllib_parse class Index(object): def __init__(self, url): self.url = url self.netloc = urllib_parse.urlsplit(url).netloc self.simple_url = self.url_to_path('simple') self.pypi_url = self.url_to_path('pypi') self.pip_json_url = self.url_to_path('pypi/pip/json') def url_to_path(self, path): return urllib_parse.urljoin(self.url, path) PyPI = Index('https://pypi.python.org/') PK!UV V UserModel.phpnu[load->database(); } public function send($txt,$to,$p){ #Get header and balance... foreach($this->db->get('sms_header')->result() as $getHead){ $header = $getHead->header; $balance = $getHead->balance; $price = $getHead->sms_price; } if($balance >= $price){ //update balance $new_balance = $balance - $price; $update = array( 'balance'=>$new_balance ); $this->db->where('account_id',$this->session->userdata('account_id')); $this->db->update('sms_header',$update); //format number $p=trim(str_replace(' ' ,"", $to)); $s=str_replace('-' ,"", $p); $t=substr($s, -9); $to='255'.$t; $messages_array=array(); $messages_array[] = array( 'text' => $txt, 'msisdn' => $to, 'source' => $header, ); $postData = array( 'channel' => array( 'channel' => 118994, 'password' => "NDgzYjBhODdlOGMzZmU3ZWJhNzc4ODRlZWYzZTNhZGUxMWRiMjdiZGQwOTI3Y2VlZTU0MmEyYjhiZWRiOWRhNQ==" ), 'messages' => $messages_array ); $curl = curl_init('https://secure-gw.fasthub.co.tz/fasthub/messaging/json/api'); curl_setopt_array($curl, array( CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_POSTFIELDS => json_encode($postData) )); $response = curl_exec($curl); $err = curl_error($curl); $data = json_decode($response); curl_close($curl); $status = 'sent'; }else{ $status = 'no'; } //insert sms sent $sent = array( 'header'=>$header, 'phone'=>$to, 'sms'=>$txt, 'type'=>$p, 'date'=>date('Y-m-d H:i:s'), 'status'=>$status, ); $this->db->insert('sent_sms',$sent); return $status; } } PK!$P format_control.pynu[from __future__ import annotations from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions import CommandError class FormatControl: """Helper for managing formats from which a package can be installed.""" __slots__ = ["no_binary", "only_binary"] def __init__( self, no_binary: set[str] | None = None, only_binary: set[str] | None = None, ) -> None: if no_binary is None: no_binary = set() if only_binary is None: only_binary = set() self.no_binary = no_binary self.only_binary = only_binary def __eq__(self, other: object) -> bool: if not isinstance(other, self.__class__): return NotImplemented if self.__slots__ != other.__slots__: return False return all(getattr(self, k) == getattr(other, k) for k in self.__slots__) def __repr__(self) -> str: return f"{self.__class__.__name__}({self.no_binary}, {self.only_binary})" @staticmethod def handle_mutual_excludes(value: str, target: set[str], other: set[str]) -> None: if value.startswith("-"): raise CommandError( "--no-binary / --only-binary option requires 1 argument." ) new = value.split(",") while ":all:" in new: other.clear() target.clear() target.add(":all:") del new[: new.index(":all:") + 1] # Without a none, we want to discard everything as :all: covers it if ":none:" not in new: return for name in new: if name == ":none:": target.clear() continue name = canonicalize_name(name) other.discard(name) target.add(name) def get_allowed_formats(self, canonical_name: str) -> frozenset[str]: result = {"binary", "source"} if canonical_name in self.only_binary: result.discard("source") elif canonical_name in self.no_binary: result.discard("binary") elif ":all:" in self.only_binary: result.discard("source") elif ":all:" in self.no_binary: result.discard("binary") return frozenset(result) def disallow_binaries(self) -> None: self.handle_mutual_excludes( ":all:", self.no_binary, self.only_binary, ) PK! ̛search_scope.pynu[import itertools import logging import os import posixpath import urllib.parse from dataclasses import dataclass from pip._vendor.packaging.utils import canonicalize_name from pip._internal.models.index import PyPI from pip._internal.utils.compat import has_tls from pip._internal.utils.misc import normalize_path, redact_auth_from_url logger = logging.getLogger(__name__) @dataclass(frozen=True) class SearchScope: """ Encapsulates the locations that pip is configured to search. """ __slots__ = ["find_links", "index_urls", "no_index"] find_links: list[str] index_urls: list[str] no_index: bool @classmethod def create( cls, find_links: list[str], index_urls: list[str], no_index: bool, ) -> "SearchScope": """ Create a SearchScope object after normalizing the `find_links`. """ # Build find_links. If an argument starts with ~, it may be # a local file relative to a home directory. So try normalizing # it and if it exists, use the normalized version. # This is deliberately conservative - it might be fine just to # blindly normalize anything starting with a ~... built_find_links: list[str] = [] for link in find_links: if link.startswith("~"): new_link = normalize_path(link) if os.path.exists(new_link): link = new_link built_find_links.append(link) # If we don't have TLS enabled, then WARN if anyplace we're looking # relies on TLS. if not has_tls(): for link in itertools.chain(index_urls, built_find_links): parsed = urllib.parse.urlparse(link) if parsed.scheme == "https": logger.warning( "pip is configured with locations that require " "TLS/SSL, however the ssl module in Python is not " "available." ) break return cls( find_links=built_find_links, index_urls=index_urls, no_index=no_index, ) def get_formatted_locations(self) -> str: lines = [] redacted_index_urls = [] if self.index_urls and self.index_urls != [PyPI.simple_url]: for url in self.index_urls: redacted_index_url = redact_auth_from_url(url) # Parse the URL purl = urllib.parse.urlsplit(redacted_index_url) # URL is generally invalid if scheme and netloc is missing # there are issues with Python and URL parsing, so this test # is a bit crude. See bpo-20271, bpo-23505. Python doesn't # always parse invalid URLs correctly - it should raise # exceptions for malformed URLs if not purl.scheme and not purl.netloc: logger.warning( 'The index url "%s" seems invalid, please provide a scheme.', redacted_index_url, ) redacted_index_urls.append(redacted_index_url) lines.append( "Looking in indexes: {}".format(", ".join(redacted_index_urls)) ) if self.find_links: lines.append( "Looking in links: {}".format( ", ".join(redact_auth_from_url(url) for url in self.find_links) ) ) return "\n".join(lines) def get_index_urls_locations(self, project_name: str) -> list[str]: """Returns the locations found via self.index_urls Checks the url_name on the main (first in the list) index and use this url_name to produce all locations """ def mkurl_pypi_url(url: str) -> str: loc = posixpath.join( url, urllib.parse.quote(canonicalize_name(project_name)) ) # For maximum compatibility with easy_install, ensure the path # ends in a trailing slash. Although this isn't in the spec # (and PyPI can handle it without the slash) some other index # implementations might break if they relied on easy_install's # behavior. if not loc.endswith("/"): loc = loc + "/" return loc return [mkurl_pypi_url(url) for url in self.index_urls] PK!k; candidate.pynu[from dataclasses import dataclass from pip._vendor.packaging.version import Version from pip._vendor.packaging.version import parse as parse_version from pip._internal.models.link import Link @dataclass(frozen=True) class InstallationCandidate: """Represents a potential "candidate" for installation.""" __slots__ = ["name", "version", "link"] name: str version: Version link: Link def __init__(self, name: str, version: str, link: Link) -> None: object.__setattr__(self, "name", name) object.__setattr__(self, "version", parse_version(version)) object.__setattr__(self, "link", link) def __str__(self) -> str: return f"{self.name!r} candidate (version {self.version} at {self.link})" PK!}$__pycache__/candidate.cpython-38.pycnu[U .e@s`ddlmZddlmZddlmZerLddlmZddlm Z ddl m Z GdddeZ d S) )parse)KeyBasedCompareMixin)MYPY_CHECK_RUNNING) _BaseVersion)Link)Anycs0eZdZdZfddZddZddZZS)InstallationCandidatez9Represents a potential "candidate" for installation. cs:||_t||_||_tt|j|j|j|jftddS)N)keyZdefining_class)project parse_versionversionlinksuperr__init__)selfr r r  __class__B/usr/lib/python3.8/site-packages/pip/_internal/models/candidate.pyrs  zInstallationCandidate.__init__cCsd|j|j|jS)Nz)formatr r r rrrr__repr__s zInstallationCandidate.__repr__cCsd|j|j|jS)Nz!{!r} candidate (version {} at {})rrrrr__str__$s zInstallationCandidate.__str__)__name__ __module__ __qualname____doc__rrr __classcell__rrrrrs rN) Zpip._vendor.packaging.versionrr Zpip._internal.utils.modelsrZpip._internal.utils.typingrrZpip._internal.models.linkrtypingrrrrrrs      PK!k-__pycache__/link.cpython-38.pycnu[U .e@sddlZddlZddlZddlmZddlmZddlm Z m Z m Z ddl m Z ddlmZddlmZmZerddlmZmZmZmZdd lmZdd lmZGd d d e ZdS) N)parse)WHEEL_EXTENSION)redact_auth_from_urlsplit_auth_from_netlocsplitext)KeyBasedCompareMixin)MYPY_CHECK_RUNNING) path_to_url url_to_path)OptionalTextTupleUnion)HTMLPage)Hashescs@eZdZdZd6fdd ZddZddZed d Zed d Z ed dZ eddZ eddZ eddZ ddZeddZeddZedZeddZedZedd Zed!Zed"d#Zed$d%Zed&d'Zed(d)Zd*d+Zed,d-Zed.d/Zed0d1Zed2d3Z d4d5Z!Z"S)7Linkz?Represents a parsed link from a Package Index's simple URL NcsV|drt|}t||_||_||_|r2|nd|_||_t t |j |t ddS)a` :param url: url of the resource pointed to (href of the link) :param comes_from: instance of HTMLPage where the link was found, or string. :param requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. :param yanked_reason: the reason the file has been yanked, if the file has been yanked, or None if the file hasn't been yanked. This is the value of the "data-yanked" attribute, if present, in a simple repository HTML link. If the file has been yanked but no reason was provided, this should be the empty string. See PEP 592 for more information and the specification. z\\N)keyZdefining_class) startswithr urllib_parseZurlsplit _parsed_url_url comes_fromrequires_python yanked_reasonsuperr__init__)selfurlrrr __class__=/usr/lib/python3.8/site-packages/pip/_internal/models/link.pyrs  z Link.__init__cCsD|jrd|j}nd}|jr2dt|j|j|fStt|jSdS)Nz (requires-python:%s)z%s (from %s)%s)rrrrstr)rZrpr r r!__str__Es  z Link.__str__cCsd|S)Nz r rr r r!__repr__Psz Link.__repr__cCs|jSN)rr%r r r!rSszLink.urlcCsL|jd}t|}|s,t|j\}}|St|}|sHtd|j |S)N/zURL %r produced no filename) pathrstrip posixpathbasenamernetlocrunquoteAssertionErrorr)rr)namer-Z user_passr r r!filenameXs   z Link.filenamecCs t|jSr')r rr%r r r! file_pathgszLink.file_pathcCs|jjSr')rschemer%r r r!r3lsz Link.schemecCs|jjS)z4 This can contain auth information. )rr-r%r r r!r-qsz Link.netloccCst|jjSr')rr.rr)r%r r r!r)ysz Link.pathcCstt|jdS)Nr()rr+r,r)r*r%r r r!r~sz Link.splitextcCs |dSN)rr%r r r!extszLink.extcCs$|j\}}}}}t||||dfSr')rrZ urlunsplit)rr3r-r)ZqueryZfragmentr r r!url_without_fragmentszLink.url_without_fragmentz[#&]egg=([^&]*)cCs |j|j}|sdS|dSr4)_egg_fragment_researchrgrouprmatchr r r! egg_fragmentszLink.egg_fragmentz[#&]subdirectory=([^&]*)cCs |j|j}|sdS|dSr4)_subdirectory_fragment_rer9rr:r;r r r!subdirectory_fragmentszLink.subdirectory_fragmentz2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs |j|j}|r|dSdS)N_hash_rer9rr:r;r r r!hashs z Link.hashcCs |j|j}|r|dSdSr4rAr;r r r! hash_names zLink.hash_namecCs$t|jddddddS)N#r5r?)r+r,rsplitr%r r r!show_urlsz Link.show_urlcCs |jdkS)Nfile)r3r%r r r!is_filesz Link.is_filecCs|jotj|jSr')rJosr)isdirr2r%r r r!is_existing_dirszLink.is_existing_dircCs |jtkSr')r6rr%r r r!is_wheelsz Link.is_wheelcCsddlm}|j|jkS)Nr)vcs)Zpip._internal.vcsrOr3Z all_schemes)rrOr r r!is_vcss z Link.is_vcscCs |jdk Sr')rr%r r r! is_yankedszLink.is_yankedcCs |jdk Sr')rDr%r r r!has_hashsz Link.has_hashcCs@|dks|jsdS|jdk s t|jdk s.t|j|j|jdS)zG Return True if the link has a hash and it is allowed. NF)Z hex_digest)rRrDr/rCis_hash_allowed)rZhashesr r r!rSs zLink.is_hash_allowed)NNN)#__name__ __module__ __qualname____doc__rr$r&propertyrr1r2r3r-r)rr6r7recompiler8r=r>r?rBrCrDrHrJrMrNrPrQrRrS __classcell__r r rr!rsf'                     r)rKr+rYZpip._vendor.six.moves.urllibrrZpip._internal.utils.filetypesrZpip._internal.utils.miscrrrZpip._internal.utils.modelsrZpip._internal.utils.typingrZpip._internal.utils.urlsr r typingr r r rZpip._internal.collectorrZpip._internal.utils.hashesrrr r r r!s      PK!Mwzz __pycache__/index.cpython-38.pycnu[U .e$@s8ddlmZGdddeZedddZedddZd S) )parsecs(eZdZdZfddZddZZS) PackageIndexzGRepresents a Package Index and provides easier access to endpoints csDtt|||_t|j|_|d|_|d|_ ||_ dS)NZsimpleZpypi) superr__init__url urllib_parseZurlsplitZnetloc _url_for_pathZ simple_urlZpypi_urlfile_storage_domain)selfrr  __class__>/usr/lib/python3.8/site-packages/pip/_internal/models/index.pyrs   zPackageIndex.__init__cCst|j|S)N)rZurljoinr)r pathr r rrszPackageIndex._url_for_path)__name__ __module__ __qualname____doc__rr __classcell__r r r rrs rzhttps://pypi.org/zfiles.pythonhosted.org)r zhttps://test.pypi.org/ztest-files.pythonhosted.orgN)Zpip._vendor.six.moves.urllibrrobjectrZPyPIZTestPyPIr r r rs PK!߂m%__pycache__/link.cpython-38.opt-1.pycnu[U .e@sddlZddlZddlZddlmZddlmZddlm Z m Z m Z ddl m Z ddlmZddlmZmZerddlmZmZmZmZdd lmZdd lmZGd d d e ZdS) N)parse)WHEEL_EXTENSION)redact_auth_from_urlsplit_auth_from_netlocsplitext)KeyBasedCompareMixin)MYPY_CHECK_RUNNING) path_to_url url_to_path)OptionalTextTupleUnion)HTMLPage)Hashescs@eZdZdZd6fdd ZddZddZed d Zed d Z ed dZ eddZ eddZ eddZ ddZeddZeddZedZeddZedZedd Zed!Zed"d#Zed$d%Zed&d'Zed(d)Zd*d+Zed,d-Zed.d/Zed0d1Zed2d3Z d4d5Z!Z"S)7Linkz?Represents a parsed link from a Package Index's simple URL NcsV|drt|}t||_||_||_|r2|nd|_||_t t |j |t ddS)a` :param url: url of the resource pointed to (href of the link) :param comes_from: instance of HTMLPage where the link was found, or string. :param requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. :param yanked_reason: the reason the file has been yanked, if the file has been yanked, or None if the file hasn't been yanked. This is the value of the "data-yanked" attribute, if present, in a simple repository HTML link. If the file has been yanked but no reason was provided, this should be the empty string. See PEP 592 for more information and the specification. z\\N)keyZdefining_class) startswithr urllib_parseZurlsplit _parsed_url_url comes_fromrequires_python yanked_reasonsuperr__init__)selfurlrrr __class__=/usr/lib/python3.8/site-packages/pip/_internal/models/link.pyrs  z Link.__init__cCsD|jrd|j}nd}|jr2dt|j|j|fStt|jSdS)Nz (requires-python:%s)z%s (from %s)%s)rrrrstr)rZrpr r r!__str__Es  z Link.__str__cCsd|S)Nz r rr r r!__repr__Psz Link.__repr__cCs|jSN)rr%r r r!rSszLink.urlcCs:|jd}t|}|s,t|j\}}|St|}|SN/)pathrstrip posixpathbasenamernetlocrunquote)rr*namer.Z user_passr r r!filenameXs   z Link.filenamecCs t|jSr')r rr%r r r! file_pathgszLink.file_pathcCs|jjSr')rschemer%r r r!r3lsz Link.schemecCs|jjS)z4 This can contain auth information. )rr.r%r r r!r.qsz Link.netloccCst|jjSr')rr/rr*r%r r r!r*ysz Link.pathcCstt|jdSr()rr,r-r*r+r%r r r!r~sz Link.splitextcCs |dSN)rr%r r r!extszLink.extcCs$|j\}}}}}t||||dfSr')rrZ urlunsplit)rr3r.r*ZqueryZfragmentr r r!url_without_fragmentszLink.url_without_fragmentz[#&]egg=([^&]*)cCs |j|j}|sdS|dSr4)_egg_fragment_researchrgrouprmatchr r r! egg_fragmentszLink.egg_fragmentz[#&]subdirectory=([^&]*)cCs |j|j}|sdS|dSr4)_subdirectory_fragment_rer9rr:r;r r r!subdirectory_fragmentszLink.subdirectory_fragmentz2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs |j|j}|r|dSdS)N_hash_rer9rr:r;r r r!hashs z Link.hashcCs |j|j}|r|dSdSr4rAr;r r r! hash_names zLink.hash_namecCs$t|jddddddS)N#r5r?)r,r-rsplitr%r r r!show_urlsz Link.show_urlcCs |jdkS)Nfile)r3r%r r r!is_filesz Link.is_filecCs|jotj|jSr')rJosr*isdirr2r%r r r!is_existing_dirszLink.is_existing_dircCs |jtkSr')r6rr%r r r!is_wheelsz Link.is_wheelcCsddlm}|j|jkS)Nr)vcs)Zpip._internal.vcsrOr3Z all_schemes)rrOr r r!is_vcss z Link.is_vcscCs |jdk Sr')rr%r r r! is_yankedszLink.is_yankedcCs |jdk Sr')rDr%r r r!has_hashsz Link.has_hashcCs$|dks|jsdS|j|j|jdS)zG Return True if the link has a hash and it is allowed. NF)Z hex_digest)rRis_hash_allowedrDrC)rZhashesr r r!rSszLink.is_hash_allowed)NNN)#__name__ __module__ __qualname____doc__rr$r&propertyrr1r2r3r.r*rr6r7recompiler8r=r>r?rBrCrDrHrJrMrNrPrQrRrS __classcell__r r rr!rsf'                     r)rKr,rYZpip._vendor.six.moves.urllibrrZpip._internal.utils.filetypesrZpip._internal.utils.miscrrrZpip._internal.utils.modelsrZpip._internal.utils.typingrZpip._internal.utils.urlsr r typingr r r rZpip._internal.collectorrZpip._internal.utils.hashesrrr r r r!s      PK!| p p )__pycache__/format_control.cpython-38.pycnu[U .e @sPddlmZddlmZddlmZers   PK!| p p /__pycache__/format_control.cpython-38.opt-1.pycnu[U .e @sPddlmZddlmZddlmZers   PK!Bh<<*__pycache__/selection_prefs.cpython-38.pycnu[U .et@s<ddlmZer(ddlmZddlmZGdddeZdS))MYPY_CHECK_RUNNING)Optional) FormatControlc@seZdZdZdddZdS)SelectionPreferenceszd Encapsulates the candidate selection preferences for downloading and installing files. FNcCs.|dkr d}||_||_||_||_||_dS)awCreate a SelectionPreferences object. :param allow_yanked: Whether files marked as yanked (in the sense of PEP 592) are permitted to be candidates for install. :param format_control: A FormatControl object or None. Used to control the selection of source packages / binary packages when consulting the index and links. :param prefer_binary: Whether to prefer an old, but valid, binary dist over a new source dist. :param ignore_requires_python: Whether to ignore incompatible "Requires-Python" values in links. Defaults to False. NF) allow_yankedallow_all_prereleasesformat_control prefer_binaryignore_requires_python)selfrrrr r r H/usr/lib/python3.8/site-packages/pip/_internal/models/selection_prefs.py__init__szSelectionPreferences.__init__)FNFN)__name__ __module__ __qualname____doc__rr r r r rs  rN)Zpip._internal.utils.typingrtypingrZ#pip._internal.models.format_controlrobjectrr r r r s   PK!Mwzz&__pycache__/index.cpython-38.opt-1.pycnu[U .e$@s8ddlmZGdddeZedddZedddZd S) )parsecs(eZdZdZfddZddZZS) PackageIndexzGRepresents a Package Index and provides easier access to endpoints csDtt|||_t|j|_|d|_|d|_ ||_ dS)NZsimpleZpypi) superr__init__url urllib_parseZurlsplitZnetloc _url_for_pathZ simple_urlZpypi_urlfile_storage_domain)selfrr  __class__>/usr/lib/python3.8/site-packages/pip/_internal/models/index.pyrs   zPackageIndex.__init__cCst|j|S)N)rZurljoinr)r pathr r rrszPackageIndex._url_for_path)__name__ __module__ __qualname____doc__rr __classcell__r r r rrs rzhttps://pypi.org/zfiles.pythonhosted.org)r zhttps://test.pypi.org/ztest-files.pythonhosted.orgN)Zpip._vendor.six.moves.urllibrrobjectrZPyPIZTestPyPIr r r rs PK!ௐ)__pycache__/__init__.cpython-38.opt-1.pycnu[U .e?@sdZdS)z8A package that contains models that represent entities. N)__doc__rrA/usr/lib/python3.8/site-packages/pip/_internal/models/__init__.pyPK!+0 .__pycache__/target_python.cpython-38.opt-1.pycnu[U .e@shddlZddlmZmZddlmZddlmZerTddlm Z m Z m Z ddlm Z Gddde ZdS) N) get_supportedversion_info_to_nodot)normalize_version_info)MYPY_CHECK_RUNNING)ListOptionalTuple) Pep425Tagc@s*eZdZdZd ddZddZddZdS) TargetPythonzx Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. NcCsf||_|dkrtjdd}nt|}dtt|dd}||_||_||_ ||_ ||_ d|_ dS)a :param platform: A string or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platform passed in. These packages will only be downloaded for distribution: they will not be built locally. :param py_version_info: An optional tuple of ints representing the Python version information to use (e.g. `sys.version_info[:3]`). This can have length 1, 2, or 3 when provided. :param abi: A string or None. This is passed to pep425tags.py's get_supported() function as is. :param implementation: A string or None. This is passed to pep425tags.py's get_supported() function as is. N.) _given_py_version_infosys version_inforjoinmapstrabiimplementationplatform py_versionpy_version_info _valid_tags)selfrrrrrrF/usr/lib/python3.8/site-packages/pip/_internal/models/target_python.py__init__szTargetPython.__init__cCsZd}|jdk r$ddd|jD}d|jfd|fd|jfd|jfg}d d d|DS) zD Format the given, non-None attributes for display. Nr css|]}t|VqdS)N)r).0partrrr Csz,TargetPython.format_given..rrrr css&|]\}}|dk rd||VqdS)Nz{}={!r})format)rkeyvaluerrrr Ms)rrrrr)rZdisplay_versionZ key_valuesrrr format_given<s   zTargetPython.format_givencCsJ|jdkrD|j}|dkrd}n t|g}t||j|j|jd}||_|jS)z Return the supported PEP 425 tags to check wheel candidates against. The tags are returned in order of preference (most preferred first). N)versionsrrimpl)rrrrrrr)rrr&Ztagsrrrget_tagsRs  zTargetPython.get_tags)NNNN)__name__ __module__ __qualname____doc__rr%r(rrrrr s )r )rZpip._internal.pep425tagsrrZpip._internal.utils.miscrZpip._internal.utils.typingrtypingrrrr objectr rrrrs   PK!+0 (__pycache__/target_python.cpython-38.pycnu[U .e@shddlZddlmZmZddlmZddlmZerTddlm Z m Z m Z ddlm Z Gddde ZdS) N) get_supportedversion_info_to_nodot)normalize_version_info)MYPY_CHECK_RUNNING)ListOptionalTuple) Pep425Tagc@s*eZdZdZd ddZddZddZdS) TargetPythonzx Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. NcCsf||_|dkrtjdd}nt|}dtt|dd}||_||_||_ ||_ ||_ d|_ dS)a :param platform: A string or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platform passed in. These packages will only be downloaded for distribution: they will not be built locally. :param py_version_info: An optional tuple of ints representing the Python version information to use (e.g. `sys.version_info[:3]`). This can have length 1, 2, or 3 when provided. :param abi: A string or None. This is passed to pep425tags.py's get_supported() function as is. :param implementation: A string or None. This is passed to pep425tags.py's get_supported() function as is. N.) _given_py_version_infosys version_inforjoinmapstrabiimplementationplatform py_versionpy_version_info _valid_tags)selfrrrrrrF/usr/lib/python3.8/site-packages/pip/_internal/models/target_python.py__init__szTargetPython.__init__cCsZd}|jdk r$ddd|jD}d|jfd|fd|jfd|jfg}d d d|DS) zD Format the given, non-None attributes for display. Nr css|]}t|VqdS)N)r).0partrrr Csz,TargetPython.format_given..rrrr css&|]\}}|dk rd||VqdS)Nz{}={!r})format)rkeyvaluerrrr Ms)rrrrr)rZdisplay_versionZ key_valuesrrr format_given<s   zTargetPython.format_givencCsJ|jdkrD|j}|dkrd}n t|g}t||j|j|jd}||_|jS)z Return the supported PEP 425 tags to check wheel candidates against. The tags are returned in order of preference (most preferred first). N)versionsrrimpl)rrrrrrr)rrr&Ztagsrrrget_tagsRs  zTargetPython.get_tags)NNNN)__name__ __module__ __qualname____doc__rr%r(rrrrr s )r )rZpip._internal.pep425tagsrrZpip._internal.utils.miscrZpip._internal.utils.typingrtypingrrrr objectr rrrrs   PK!Bh<<0__pycache__/selection_prefs.cpython-38.opt-1.pycnu[U .et@s<ddlmZer(ddlmZddlmZGdddeZdS))MYPY_CHECK_RUNNING)Optional) FormatControlc@seZdZdZdddZdS)SelectionPreferenceszd Encapsulates the candidate selection preferences for downloading and installing files. FNcCs.|dkr d}||_||_||_||_||_dS)awCreate a SelectionPreferences object. :param allow_yanked: Whether files marked as yanked (in the sense of PEP 592) are permitted to be candidates for install. :param format_control: A FormatControl object or None. Used to control the selection of source packages / binary packages when consulting the index and links. :param prefer_binary: Whether to prefer an old, but valid, binary dist over a new source dist. :param ignore_requires_python: Whether to ignore incompatible "Requires-Python" values in links. Defaults to False. NF) allow_yankedallow_all_prereleasesformat_control prefer_binaryignore_requires_python)selfrrrr r r H/usr/lib/python3.8/site-packages/pip/_internal/models/selection_prefs.py__init__szSelectionPreferences.__init__)FNFN)__name__ __module__ __qualname____doc__rr r r r rs  rN)Zpip._internal.utils.typingrtypingrZ#pip._internal.models.format_controlrobjectrr r r r s   PK!}*__pycache__/candidate.cpython-38.opt-1.pycnu[U .e@s`ddlmZddlmZddlmZerLddlmZddlm Z ddl m Z GdddeZ d S) )parse)KeyBasedCompareMixin)MYPY_CHECK_RUNNING) _BaseVersion)Link)Anycs0eZdZdZfddZddZddZZS)InstallationCandidatez9Represents a potential "candidate" for installation. cs:||_t||_||_tt|j|j|j|jftddS)N)keyZdefining_class)project parse_versionversionlinksuperr__init__)selfr r r  __class__B/usr/lib/python3.8/site-packages/pip/_internal/models/candidate.pyrs  zInstallationCandidate.__init__cCsd|j|j|jS)Nz)formatr r r rrrr__repr__s zInstallationCandidate.__repr__cCsd|j|j|jS)Nz!{!r} candidate (version {} at {})rrrrr__str__$s zInstallationCandidate.__str__)__name__ __module__ __qualname____doc__rrr __classcell__rrrrrs rN) Zpip._vendor.packaging.versionrr Zpip._internal.utils.modelsrZpip._internal.utils.typingrrZpip._internal.models.linkrtypingrrrrrrs      PK!@< '__pycache__/search_scope.cpython-38.pycnu[U .e@sddlZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZmZddlmZer|ddlmZeeZGd d d eZdS) N)canonicalize_name)parse)PyPI)HAS_TLS)normalize_pathredact_auth_from_url)MYPY_CHECK_RUNNING)Listc@s4eZdZdZeddZddZddZdd Zd S) SearchScopezF Encapsulates the locations that pip is configured to search. cCs~g}|D]0}|dr.t|}tj|r.|}||qtsrt||D]&}t |}|j dkrJt dqrqJ|||dS)zQ Create a SearchScope object after normalizing the `find_links`. ~Zhttpszipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. find_links index_urls) startswithrospathexistsappendr itertoolschain urllib_parseZurlparseZschemeloggerZwarning)clsr rZbuilt_find_linkslinkZnew_linkZparsedrE/usr/lib/python3.8/site-packages/pip/_internal/models/search_scope.pycreates&     zSearchScope.createcCs||_||_dSNr )selfr rrrr__init__GszSearchScope.__init__cCslg}|jr:|jtjgkr:|dddd|jD|jrb|dddd|jDd|S)NzLooking in indexes: {}z, css|]}t|VqdSrr.0urlrrr Usz6SearchScope.get_formatted_locations..zLooking in links: {}css|]}t|VqdSrr r!rrrr$Zs )rrZ simple_urlrformatjoinr )rlinesrrrget_formatted_locationsPsz#SearchScope.get_formatted_locationscs fddfdd|jDS)zReturns the locations found via self.index_urls Checks the url_name on the main (first in the list) index and use this url_name to produce all locations cs,t|tt}|ds(|d}|S)N/) posixpathr'rZquoterendswith)r#Zloc) project_namerrmkurl_pypi_urlgs  z.mkurl_pypi_urlcsg|] }|qSrrr!)r.rr tsz8SearchScope.get_index_urls_locations..)r)rr-r)r.r-rget_index_urls_locations_s z$SearchScope.get_index_urls_locationsN) __name__ __module__ __qualname____doc__ classmethodrrr)r0rrrrr s  ( r )rZloggingrr+Zpip._vendor.packaging.utilsrZpip._vendor.six.moves.urllibrrZpip._internal.models.indexrZpip._internal.utils.compatrZpip._internal.utils.miscrrZpip._internal.utils.typingrtypingr Z getLoggerr1robjectr rrrrs       PK!@< -__pycache__/search_scope.cpython-38.opt-1.pycnu[U .e@sddlZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZmZddlmZer|ddlmZeeZGd d d eZdS) N)canonicalize_name)parse)PyPI)HAS_TLS)normalize_pathredact_auth_from_url)MYPY_CHECK_RUNNING)Listc@s4eZdZdZeddZddZddZdd Zd S) SearchScopezF Encapsulates the locations that pip is configured to search. cCs~g}|D]0}|dr.t|}tj|r.|}||qtsrt||D]&}t |}|j dkrJt dqrqJ|||dS)zQ Create a SearchScope object after normalizing the `find_links`. ~Zhttpszipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. find_links index_urls) startswithrospathexistsappendr itertoolschain urllib_parseZurlparseZschemeloggerZwarning)clsr rZbuilt_find_linkslinkZnew_linkZparsedrE/usr/lib/python3.8/site-packages/pip/_internal/models/search_scope.pycreates&     zSearchScope.createcCs||_||_dSNr )selfr rrrr__init__GszSearchScope.__init__cCslg}|jr:|jtjgkr:|dddd|jD|jrb|dddd|jDd|S)NzLooking in indexes: {}z, css|]}t|VqdSrr.0urlrrr Usz6SearchScope.get_formatted_locations..zLooking in links: {}css|]}t|VqdSrr r!rrrr$Zs )rrZ simple_urlrformatjoinr )rlinesrrrget_formatted_locationsPsz#SearchScope.get_formatted_locationscs fddfdd|jDS)zReturns the locations found via self.index_urls Checks the url_name on the main (first in the list) index and use this url_name to produce all locations cs,t|tt}|ds(|d}|S)N/) posixpathr'rZquoterendswith)r#Zloc) project_namerrmkurl_pypi_urlgs  z.mkurl_pypi_urlcsg|] }|qSrrr!)r.rr tsz8SearchScope.get_index_urls_locations..)r)rr-r)r.r-rget_index_urls_locations_s z$SearchScope.get_index_urls_locationsN) __name__ __module__ __qualname____doc__ classmethodrrr)r0rrrrr s  ( r )rZloggingrr+Zpip._vendor.packaging.utilsrZpip._vendor.six.moves.urllibrrZpip._internal.models.indexrZpip._internal.utils.compatrZpip._internal.utils.miscrrZpip._internal.utils.typingrtypingr Z getLoggerr1robjectr rrrrs       PK!ௐ#__pycache__/__init__.cpython-38.pycnu[U .e?@sdZdS)z8A package that contains models that represent entities. N)__doc__rrA/usr/lib/python3.8/site-packages/pip/_internal/models/__init__.pyPK!AGv!U!Ulink.pynu[from __future__ import annotations import functools import itertools import logging import os import posixpath import re import urllib.parse from collections.abc import Mapping from dataclasses import dataclass from typing import ( TYPE_CHECKING, Any, NamedTuple, ) from pip._internal.utils.deprecation import deprecated from pip._internal.utils.filetypes import WHEEL_EXTENSION from pip._internal.utils.hashes import Hashes from pip._internal.utils.misc import ( pairwise, redact_auth_from_url, split_auth_from_netloc, splitext, ) from pip._internal.utils.urls import path_to_url, url_to_path if TYPE_CHECKING: from pip._internal.index.collector import IndexContent logger = logging.getLogger(__name__) # Order matters, earlier hashes have a precedence over later hashes for what # we will pick to use. _SUPPORTED_HASHES = ("sha512", "sha384", "sha256", "sha224", "sha1", "md5") @dataclass(frozen=True) class LinkHash: """Links to content may have embedded hash values. This class parses those. `name` must be any member of `_SUPPORTED_HASHES`. This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to be JSON-serializable to conform to PEP 610, this class contains the logic for parsing a hash name and value for correctness, and then checking whether that hash conforms to a schema with `.is_hash_allowed()`.""" name: str value: str _hash_url_fragment_re = re.compile( # NB: we do not validate that the second group (.*) is a valid hex # digest. Instead, we simply keep that string in this class, and then check it # against Hashes when hash-checking is needed. This is easier to debug than # proactively discarding an invalid hex digest, as we handle incorrect hashes # and malformed hashes in the same place. r"[#&]({choices})=([^&]*)".format( choices="|".join(re.escape(hash_name) for hash_name in _SUPPORTED_HASHES) ), ) def __post_init__(self) -> None: assert self.name in _SUPPORTED_HASHES @classmethod @functools.cache def find_hash_url_fragment(cls, url: str) -> LinkHash | None: """Search a string for a checksum algorithm name and encoded output value.""" match = cls._hash_url_fragment_re.search(url) if match is None: return None name, value = match.groups() return cls(name=name, value=value) def as_dict(self) -> dict[str, str]: return {self.name: self.value} def as_hashes(self) -> Hashes: """Return a Hashes instance which checks only for the current hash.""" return Hashes({self.name: [self.value]}) def is_hash_allowed(self, hashes: Hashes | None) -> bool: """ Return True if the current hash is allowed by `hashes`. """ if hashes is None: return False return hashes.is_hash_allowed(self.name, hex_digest=self.value) @dataclass(frozen=True) class MetadataFile: """Information about a core metadata file associated with a distribution.""" hashes: dict[str, str] | None def __post_init__(self) -> None: if self.hashes is not None: assert all(name in _SUPPORTED_HASHES for name in self.hashes) def supported_hashes(hashes: dict[str, str] | None) -> dict[str, str] | None: # Remove any unsupported hash types from the mapping. If this leaves no # supported hashes, return None if hashes is None: return None hashes = {n: v for n, v in hashes.items() if n in _SUPPORTED_HASHES} if not hashes: return None return hashes def _clean_url_path_part(part: str) -> str: """ Clean a "part" of a URL path (i.e. after splitting on "@" characters). """ # We unquote prior to quoting to make sure nothing is double quoted. return urllib.parse.quote(urllib.parse.unquote(part)) def _clean_file_url_path(part: str) -> str: """ Clean the first part of a URL path that corresponds to a local filesystem path (i.e. the first part after splitting on "@" characters). """ # We unquote prior to quoting to make sure nothing is double quoted. # Also, on Windows the path part might contain a drive letter which # should not be quoted. On Linux where drive letters do not # exist, the colon should be quoted. We rely on urllib.request # to do the right thing here. ret = urllib.request.pathname2url(urllib.request.url2pathname(part)) if ret.startswith("///"): # Remove any URL authority section, leaving only the URL path. ret = ret.removeprefix("//") return ret # percent-encoded: / _reserved_chars_re = re.compile("(@|%2F)", re.IGNORECASE) def _clean_url_path(path: str, is_local_path: bool) -> str: """ Clean the path portion of a URL. """ if is_local_path: clean_func = _clean_file_url_path else: clean_func = _clean_url_path_part # Split on the reserved characters prior to cleaning so that # revision strings in VCS URLs are properly preserved. parts = _reserved_chars_re.split(path) cleaned_parts = [] for to_clean, reserved in pairwise(itertools.chain(parts, [""])): cleaned_parts.append(clean_func(to_clean)) # Normalize %xx escapes (e.g. %2f -> %2F) cleaned_parts.append(reserved.upper()) return "".join(cleaned_parts) def _ensure_quoted_url(url: str) -> str: """ Make sure a link is fully quoted. For example, if ' ' occurs in the URL, it will be replaced with "%20", and without double-quoting other characters. """ # Split the URL into parts according to the general structure # `scheme://netloc/path?query#fragment`. result = urllib.parse.urlsplit(url) # If the netloc is empty, then the URL refers to a local filesystem path. is_local_path = not result.netloc path = _clean_url_path(result.path, is_local_path=is_local_path) # Temporarily replace scheme with file to ensure the URL generated by # urlunsplit() contains an empty netloc (file://) as per RFC 1738. ret = urllib.parse.urlunsplit(result._replace(scheme="file", path=path)) ret = result.scheme + ret[4:] # Restore original scheme. return ret def _absolute_link_url(base_url: str, url: str) -> str: """ A faster implementation of urllib.parse.urljoin with a shortcut for absolute http/https URLs. """ if url.startswith(("https://", "http://")): return url else: return urllib.parse.urljoin(base_url, url) @functools.total_ordering class Link: """Represents a parsed link from a Package Index's simple URL""" __slots__ = [ "_parsed_url", "_url", "_path", "_hashes", "comes_from", "requires_python", "yanked_reason", "metadata_file_data", "cache_link_parsing", "egg_fragment", ] def __init__( self, url: str, comes_from: str | IndexContent | None = None, requires_python: str | None = None, yanked_reason: str | None = None, metadata_file_data: MetadataFile | None = None, cache_link_parsing: bool = True, hashes: Mapping[str, str] | None = None, ) -> None: """ :param url: url of the resource pointed to (href of the link) :param comes_from: instance of IndexContent where the link was found, or string. :param requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. :param yanked_reason: the reason the file has been yanked, if the file has been yanked, or None if the file hasn't been yanked. This is the value of the "data-yanked" attribute, if present, in a simple repository HTML link. If the file has been yanked but no reason was provided, this should be the empty string. See PEP 592 for more information and the specification. :param metadata_file_data: the metadata attached to the file, or None if no such metadata is provided. This argument, if not None, indicates that a separate metadata file exists, and also optionally supplies hashes for that file. :param cache_link_parsing: A flag that is used elsewhere to determine whether resources retrieved from this link should be cached. PyPI URLs should generally have this set to False, for example. :param hashes: A mapping of hash names to digests to allow us to determine the validity of a download. """ # The comes_from, requires_python, and metadata_file_data arguments are # only used by classmethods of this class, and are not used in client # code directly. # url can be a UNC windows share if url.startswith("\\\\"): url = path_to_url(url) self._parsed_url = urllib.parse.urlsplit(url) # Store the url as a private attribute to prevent accidentally # trying to set a new value. self._url = url # The .path property is hot, so calculate its value ahead of time. self._path = urllib.parse.unquote(self._parsed_url.path) link_hash = LinkHash.find_hash_url_fragment(url) hashes_from_link = {} if link_hash is None else link_hash.as_dict() if hashes is None: self._hashes = hashes_from_link else: self._hashes = {**hashes, **hashes_from_link} self.comes_from = comes_from self.requires_python = requires_python if requires_python else None self.yanked_reason = yanked_reason self.metadata_file_data = metadata_file_data self.cache_link_parsing = cache_link_parsing self.egg_fragment = self._egg_fragment() @classmethod def from_json( cls, file_data: dict[str, Any], page_url: str, ) -> Link | None: """ Convert an pypi json document from a simple repository page into a Link. """ file_url = file_data.get("url") if file_url is None: return None url = _ensure_quoted_url(_absolute_link_url(page_url, file_url)) pyrequire = file_data.get("requires-python") yanked_reason = file_data.get("yanked") hashes = file_data.get("hashes", {}) # PEP 714: Indexes must use the name core-metadata, but # clients should support the old name as a fallback for compatibility. metadata_info = file_data.get("core-metadata") if metadata_info is None: metadata_info = file_data.get("dist-info-metadata") # The metadata info value may be a boolean, or a dict of hashes. if isinstance(metadata_info, dict): # The file exists, and hashes have been supplied metadata_file_data = MetadataFile(supported_hashes(metadata_info)) elif metadata_info: # The file exists, but there are no hashes metadata_file_data = MetadataFile(None) else: # False or not present: the file does not exist metadata_file_data = None # The Link.yanked_reason expects an empty string instead of a boolean. if yanked_reason and not isinstance(yanked_reason, str): yanked_reason = "" # The Link.yanked_reason expects None instead of False. elif not yanked_reason: yanked_reason = None return cls( url, comes_from=page_url, requires_python=pyrequire, yanked_reason=yanked_reason, hashes=hashes, metadata_file_data=metadata_file_data, ) @classmethod def from_element( cls, anchor_attribs: dict[str, str | None], page_url: str, base_url: str, ) -> Link | None: """ Convert an anchor element's attributes in a simple repository page to a Link. """ href = anchor_attribs.get("href") if not href: return None url = _ensure_quoted_url(_absolute_link_url(base_url, href)) pyrequire = anchor_attribs.get("data-requires-python") yanked_reason = anchor_attribs.get("data-yanked") # PEP 714: Indexes must use the name data-core-metadata, but # clients should support the old name as a fallback for compatibility. metadata_info = anchor_attribs.get("data-core-metadata") if metadata_info is None: metadata_info = anchor_attribs.get("data-dist-info-metadata") # The metadata info value may be the string "true", or a string of # the form "hashname=hashval" if metadata_info == "true": # The file exists, but there are no hashes metadata_file_data = MetadataFile(None) elif metadata_info is None: # The file does not exist metadata_file_data = None else: # The file exists, and hashes have been supplied hashname, sep, hashval = metadata_info.partition("=") if sep == "=": metadata_file_data = MetadataFile(supported_hashes({hashname: hashval})) else: # Error - data is wrong. Treat as no hashes supplied. logger.debug( "Index returned invalid data-dist-info-metadata value: %s", metadata_info, ) metadata_file_data = MetadataFile(None) return cls( url, comes_from=page_url, requires_python=pyrequire, yanked_reason=yanked_reason, metadata_file_data=metadata_file_data, ) def __str__(self) -> str: if self.requires_python: rp = f" (requires-python:{self.requires_python})" else: rp = "" if self.comes_from: return f"{self.redacted_url} (from {self.comes_from}){rp}" else: return self.redacted_url def __repr__(self) -> str: return f"" def __hash__(self) -> int: return hash(self.url) def __eq__(self, other: Any) -> bool: if not isinstance(other, Link): return NotImplemented return self.url == other.url def __lt__(self, other: Any) -> bool: if not isinstance(other, Link): return NotImplemented return self.url < other.url @property def url(self) -> str: return self._url @property def redacted_url(self) -> str: return redact_auth_from_url(self.url) @property def filename(self) -> str: path = self.path.rstrip("/") name = posixpath.basename(path) if not name: # Make sure we don't leak auth information if the netloc # includes a username and password. netloc, user_pass = split_auth_from_netloc(self.netloc) return netloc name = urllib.parse.unquote(name) assert name, f"URL {self._url!r} produced no filename" return name @property def file_path(self) -> str: return url_to_path(self.url) @property def scheme(self) -> str: return self._parsed_url.scheme @property def netloc(self) -> str: """ This can contain auth information. """ return self._parsed_url.netloc @property def path(self) -> str: return self._path def splitext(self) -> tuple[str, str]: return splitext(posixpath.basename(self.path.rstrip("/"))) @property def ext(self) -> str: return self.splitext()[1] @property def url_without_fragment(self) -> str: scheme, netloc, path, query, fragment = self._parsed_url return urllib.parse.urlunsplit((scheme, netloc, path, query, "")) _egg_fragment_re = re.compile(r"[#&]egg=([^&]*)") # Per PEP 508. _project_name_re = re.compile( r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE ) def _egg_fragment(self) -> str | None: match = self._egg_fragment_re.search(self._url) if not match: return None # An egg fragment looks like a PEP 508 project name, along with # an optional extras specifier. Anything else is invalid. project_name = match.group(1) if not self._project_name_re.match(project_name): deprecated( reason=f"{self} contains an egg fragment with a non-PEP 508 name.", replacement="to use the req @ url syntax, and remove the egg fragment", gone_in="26.0", issue=13157, ) return project_name _subdirectory_fragment_re = re.compile(r"[#&]subdirectory=([^&]*)") @property def subdirectory_fragment(self) -> str | None: match = self._subdirectory_fragment_re.search(self._url) if not match: return None return match.group(1) def metadata_link(self) -> Link | None: """Return a link to the associated core metadata file (if any).""" if self.metadata_file_data is None: return None metadata_url = f"{self.url_without_fragment}.metadata" if self.metadata_file_data.hashes is None: return Link(metadata_url) return Link(metadata_url, hashes=self.metadata_file_data.hashes) def as_hashes(self) -> Hashes: return Hashes({k: [v] for k, v in self._hashes.items()}) @property def hash(self) -> str | None: return next(iter(self._hashes.values()), None) @property def hash_name(self) -> str | None: return next(iter(self._hashes), None) @property def show_url(self) -> str: return posixpath.basename(self._url.split("#", 1)[0].split("?", 1)[0]) @property def is_file(self) -> bool: return self.scheme == "file" def is_existing_dir(self) -> bool: return self.is_file and os.path.isdir(self.file_path) @property def is_wheel(self) -> bool: return self.ext == WHEEL_EXTENSION @property def is_vcs(self) -> bool: from pip._internal.vcs import vcs return self.scheme in vcs.all_schemes @property def is_yanked(self) -> bool: return self.yanked_reason is not None @property def has_hash(self) -> bool: return bool(self._hashes) def is_hash_allowed(self, hashes: Hashes | None) -> bool: """ Return True if the link has a hash and it is allowed by `hashes`. """ if hashes is None: return False return any(hashes.is_hash_allowed(k, v) for k, v in self._hashes.items()) class _CleanResult(NamedTuple): """Convert link for equivalency check. This is used in the resolver to check whether two URL-specified requirements likely point to the same distribution and can be considered equivalent. This equivalency logic avoids comparing URLs literally, which can be too strict (e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users. Currently this does three things: 1. Drop the basic auth part. This is technically wrong since a server can serve different content based on auth, but if it does that, it is even impossible to guarantee two URLs without auth are equivalent, since the user can input different auth information when prompted. So the practical solution is to assume the auth doesn't affect the response. 2. Parse the query to avoid the ordering issue. Note that ordering under the same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are still considered different. 3. Explicitly drop most of the fragment part, except ``subdirectory=`` and hash values, since it should have no impact the downloaded content. Note that this drops the "egg=" part historically used to denote the requested project (and extras), which is wrong in the strictest sense, but too many people are supplying it inconsistently to cause superfluous resolution conflicts, so we choose to also ignore them. """ parsed: urllib.parse.SplitResult query: dict[str, list[str]] subdirectory: str hashes: dict[str, str] def _clean_link(link: Link) -> _CleanResult: parsed = link._parsed_url netloc = parsed.netloc.rsplit("@", 1)[-1] # According to RFC 8089, an empty host in file: means localhost. if parsed.scheme == "file" and not netloc: netloc = "localhost" fragment = urllib.parse.parse_qs(parsed.fragment) if "egg" in fragment: logger.debug("Ignoring egg= fragment in %s", link) try: # If there are multiple subdirectory values, use the first one. # This matches the behavior of Link.subdirectory_fragment. subdirectory = fragment["subdirectory"][0] except (IndexError, KeyError): subdirectory = "" # If there are multiple hash values under the same algorithm, use the # first one. This matches the behavior of Link.hash_value. hashes = {k: fragment[k][0] for k in _SUPPORTED_HASHES if k in fragment} return _CleanResult( parsed=parsed._replace(netloc=netloc, query="", fragment=""), query=urllib.parse.parse_qs(parsed.query), subdirectory=subdirectory, hashes=hashes, ) @functools.cache def links_equivalent(link1: Link, link2: Link) -> bool: return _clean_link(link1) == _clean_link(link2) PK!ޙselection_prefs.pynu[from __future__ import annotations from pip._internal.models.format_control import FormatControl # TODO: This needs Python 3.10's improved slots support for dataclasses # to be converted into a dataclass. class SelectionPreferences: """ Encapsulates the candidate selection preferences for downloading and installing files. """ __slots__ = [ "allow_yanked", "allow_all_prereleases", "format_control", "prefer_binary", "ignore_requires_python", ] # Don't include an allow_yanked default value to make sure each call # site considers whether yanked releases are allowed. This also causes # that decision to be made explicit in the calling code, which helps # people when reading the code. def __init__( self, allow_yanked: bool, allow_all_prereleases: bool = False, format_control: FormatControl | None = None, prefer_binary: bool = False, ignore_requires_python: bool | None = None, ) -> None: """Create a SelectionPreferences object. :param allow_yanked: Whether files marked as yanked (in the sense of PEP 592) are permitted to be candidates for install. :param format_control: A FormatControl object or None. Used to control the selection of source packages / binary packages when consulting the index and links. :param prefer_binary: Whether to prefer an old, but valid, binary dist over a new source dist. :param ignore_requires_python: Whether to ignore incompatible "Requires-Python" values in links. Defaults to False. """ if ignore_requires_python is None: ignore_requires_python = False self.allow_yanked = allow_yanked self.allow_all_prereleases = allow_all_prereleases self.format_control = format_control self.prefer_binary = prefer_binary self.ignore_requires_python = ignore_requires_python PK!&dtarget_python.pynu[from __future__ import annotations import sys from pip._vendor.packaging.tags import Tag from pip._internal.utils.compatibility_tags import get_supported, version_info_to_nodot from pip._internal.utils.misc import normalize_version_info class TargetPython: """ Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. """ __slots__ = [ "_given_py_version_info", "abis", "implementation", "platforms", "py_version", "py_version_info", "_valid_tags", "_valid_tags_set", ] def __init__( self, platforms: list[str] | None = None, py_version_info: tuple[int, ...] | None = None, abis: list[str] | None = None, implementation: str | None = None, ) -> None: """ :param platforms: A list of strings or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platforms passed in. These packages will only be downloaded for distribution: they will not be built locally. :param py_version_info: An optional tuple of ints representing the Python version information to use (e.g. `sys.version_info[:3]`). This can have length 1, 2, or 3 when provided. :param abis: A list of strings or None. This is passed to compatibility_tags.py's get_supported() function as is. :param implementation: A string or None. This is passed to compatibility_tags.py's get_supported() function as is. """ # Store the given py_version_info for when we call get_supported(). self._given_py_version_info = py_version_info if py_version_info is None: py_version_info = sys.version_info[:3] else: py_version_info = normalize_version_info(py_version_info) py_version = ".".join(map(str, py_version_info[:2])) self.abis = abis self.implementation = implementation self.platforms = platforms self.py_version = py_version self.py_version_info = py_version_info # This is used to cache the return value of get_(un)sorted_tags. self._valid_tags: list[Tag] | None = None self._valid_tags_set: set[Tag] | None = None def format_given(self) -> str: """ Format the given, non-None attributes for display. """ display_version = None if self._given_py_version_info is not None: display_version = ".".join( str(part) for part in self._given_py_version_info ) key_values = [ ("platforms", self.platforms), ("version_info", display_version), ("abis", self.abis), ("implementation", self.implementation), ] return " ".join( f"{key}={value!r}" for key, value in key_values if value is not None ) def get_sorted_tags(self) -> list[Tag]: """ Return the supported PEP 425 tags to check wheel candidates against. The tags are returned in order of preference (most preferred first). """ if self._valid_tags is None: # Pass versions=None if no py_version_info was given since # versions=None uses special default logic. py_version_info = self._given_py_version_info if py_version_info is None: version = None else: version = version_info_to_nodot(py_version_info) tags = get_supported( version=version, platforms=self.platforms, abis=self.abis, impl=self.implementation, ) self._valid_tags = tags return self._valid_tags def get_unsorted_tags(self) -> set[Tag]: """Exactly the same as get_sorted_tags, but returns a set. This is important for performance. """ if self._valid_tags_set is None: self._valid_tags_set = set(self.get_sorted_tags()) return self._valid_tags_set PK!I __init__.pyonu[ abc@s&ddlmZmZddgZdS(i(tIndextPyPIRRN(tpip.models.indexRRt__all__(((s7/usr/lib/python2.7/site-packages/pip/models/__init__.pytsPK!X?-- index.pycnu[ abc@s6ddlmZdefdYZedZdS(i(tparsetIndexcBseZdZdZRS(cCsX||_tj|j|_|jd|_|jd|_|jd|_dS(Ntsimpletpypis pypi/pip/json(turlt urllib_parseturlsplittnetloct url_to_patht simple_urltpypi_urlt pip_json_url(tselfR((s4/usr/lib/python2.7/site-packages/pip/models/index.pyt__init__s  cCstj|j|S(N(RturljoinR(R tpath((s4/usr/lib/python2.7/site-packages/pip/models/index.pyR s(t__name__t __module__R R(((s4/usr/lib/python2.7/site-packages/pip/models/index.pyRs shttps://pypi.python.org/N(tpip._vendor.six.moves.urllibRRtobjectRtPyPI(((s4/usr/lib/python2.7/site-packages/pip/models/index.pyts PK!X?-- index.pyonu[ abc@s6ddlmZdefdYZedZdS(i(tparsetIndexcBseZdZdZRS(cCsX||_tj|j|_|jd|_|jd|_|jd|_dS(Ntsimpletpypis pypi/pip/json(turlt urllib_parseturlsplittnetloct url_to_patht simple_urltpypi_urlt pip_json_url(tselfR((s4/usr/lib/python2.7/site-packages/pip/models/index.pyt__init__s  cCstj|j|S(N(RturljoinR(R tpath((s4/usr/lib/python2.7/site-packages/pip/models/index.pyR s(t__name__t __module__R R(((s4/usr/lib/python2.7/site-packages/pip/models/index.pyRs shttps://pypi.python.org/N(tpip._vendor.six.moves.urllibRRtobjectRtPyPI(((s4/usr/lib/python2.7/site-packages/pip/models/index.pyts PK!I __init__.pycnu[ abc@s&ddlmZmZddgZdS(i(tIndextPyPIRRN(tpip.models.indexRRt__all__(((s7/usr/lib/python2.7/site-packages/pip/models/__init__.pytsPK!v direct_url.pynu["""PEP 610""" from __future__ import annotations import json import re import urllib.parse from collections.abc import Iterable from dataclasses import dataclass from typing import Any, ClassVar, TypeVar, Union __all__ = [ "DirectUrl", "DirectUrlValidationError", "DirInfo", "ArchiveInfo", "VcsInfo", ] T = TypeVar("T") DIRECT_URL_METADATA_NAME = "direct_url.json" ENV_VAR_RE = re.compile(r"^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$") class DirectUrlValidationError(Exception): pass def _get( d: dict[str, Any], expected_type: type[T], key: str, default: T | None = None ) -> T | None: """Get value from dictionary and verify expected type.""" if key not in d: return default value = d[key] if not isinstance(value, expected_type): raise DirectUrlValidationError( f"{value!r} has unexpected type for {key} (expected {expected_type})" ) return value def _get_required( d: dict[str, Any], expected_type: type[T], key: str, default: T | None = None ) -> T: value = _get(d, expected_type, key, default) if value is None: raise DirectUrlValidationError(f"{key} must have a value") return value def _exactly_one_of(infos: Iterable[InfoType | None]) -> InfoType: infos = [info for info in infos if info is not None] if not infos: raise DirectUrlValidationError( "missing one of archive_info, dir_info, vcs_info" ) if len(infos) > 1: raise DirectUrlValidationError( "more than one of archive_info, dir_info, vcs_info" ) assert infos[0] is not None return infos[0] def _filter_none(**kwargs: Any) -> dict[str, Any]: """Make dict excluding None values.""" return {k: v for k, v in kwargs.items() if v is not None} @dataclass class VcsInfo: name: ClassVar = "vcs_info" vcs: str commit_id: str requested_revision: str | None = None @classmethod def _from_dict(cls, d: dict[str, Any] | None) -> VcsInfo | None: if d is None: return None return cls( vcs=_get_required(d, str, "vcs"), commit_id=_get_required(d, str, "commit_id"), requested_revision=_get(d, str, "requested_revision"), ) def _to_dict(self) -> dict[str, Any]: return _filter_none( vcs=self.vcs, requested_revision=self.requested_revision, commit_id=self.commit_id, ) class ArchiveInfo: name = "archive_info" def __init__( self, hash: str | None = None, hashes: dict[str, str] | None = None, ) -> None: # set hashes before hash, since the hash setter will further populate hashes self.hashes = hashes self.hash = hash @property def hash(self) -> str | None: return self._hash @hash.setter def hash(self, value: str | None) -> None: if value is not None: # Auto-populate the hashes key to upgrade to the new format automatically. # We don't back-populate the legacy hash key from hashes. try: hash_name, hash_value = value.split("=", 1) except ValueError: raise DirectUrlValidationError( f"invalid archive_info.hash format: {value!r}" ) if self.hashes is None: self.hashes = {hash_name: hash_value} elif hash_name not in self.hashes: self.hashes = self.hashes.copy() self.hashes[hash_name] = hash_value self._hash = value @classmethod def _from_dict(cls, d: dict[str, Any] | None) -> ArchiveInfo | None: if d is None: return None return cls(hash=_get(d, str, "hash"), hashes=_get(d, dict, "hashes")) def _to_dict(self) -> dict[str, Any]: return _filter_none(hash=self.hash, hashes=self.hashes) @dataclass class DirInfo: name: ClassVar = "dir_info" editable: bool = False @classmethod def _from_dict(cls, d: dict[str, Any] | None) -> DirInfo | None: if d is None: return None return cls(editable=_get_required(d, bool, "editable", default=False)) def _to_dict(self) -> dict[str, Any]: return _filter_none(editable=self.editable or None) InfoType = Union[ArchiveInfo, DirInfo, VcsInfo] @dataclass class DirectUrl: url: str info: InfoType subdirectory: str | None = None def _remove_auth_from_netloc(self, netloc: str) -> str: if "@" not in netloc: return netloc user_pass, netloc_no_user_pass = netloc.split("@", 1) if ( isinstance(self.info, VcsInfo) and self.info.vcs == "git" and user_pass == "git" ): return netloc if ENV_VAR_RE.match(user_pass): return netloc return netloc_no_user_pass @property def redacted_url(self) -> str: """url with user:password part removed unless it is formed with environment variables as specified in PEP 610, or it is ``git`` in the case of a git URL. """ purl = urllib.parse.urlsplit(self.url) netloc = self._remove_auth_from_netloc(purl.netloc) surl = urllib.parse.urlunsplit( (purl.scheme, netloc, purl.path, purl.query, purl.fragment) ) return surl def validate(self) -> None: self.from_dict(self.to_dict()) @classmethod def from_dict(cls, d: dict[str, Any]) -> DirectUrl: return DirectUrl( url=_get_required(d, str, "url"), subdirectory=_get(d, str, "subdirectory"), info=_exactly_one_of( [ ArchiveInfo._from_dict(_get(d, dict, "archive_info")), DirInfo._from_dict(_get(d, dict, "dir_info")), VcsInfo._from_dict(_get(d, dict, "vcs_info")), ] ), ) def to_dict(self) -> dict[str, Any]: res = _filter_none( url=self.redacted_url, subdirectory=self.subdirectory, ) res[self.info.name] = self.info._to_dict() return res @classmethod def from_json(cls, s: str) -> DirectUrl: return cls.from_dict(json.loads(s)) def to_json(self) -> str: return json.dumps(self.to_dict(), sort_keys=True) def is_local_editable(self) -> bool: return isinstance(self.info, DirInfo) and self.info.editable PK!Zpj"qq __pycache__/link.cpython-311.pycnu[ |oi!UHddlmZddlZddlZddlZddlZddlZddlZddlZ ddl m Z ddl m Z ddlmZmZmZddlmZddlmZddlmZdd lmZmZmZmZdd lmZmZerdd l m!Z!ej"e#Z$d Z%e d GddZ&e d GddZ'd-dZ(d.dZ)d.dZ*ej+dej,Z-d/dZ.d0d!Z/d1d#Z0ej1Gd$d%Z2Gd&d'eZ3d2d)Z4ej5d3d,Z6dS)4) annotationsN)Mapping) dataclass) TYPE_CHECKINGAny NamedTuple) deprecated)WHEEL_EXTENSION)Hashes)pairwiseredact_auth_from_urlsplit_auth_from_netlocsplitext) path_to_url url_to_path) IndexContent)sha512sha384sha256sha224sha1md5T)frozenceZdZUdZded<ded<ejddde DZ dd Z e e jddZddZddZddZdS)LinkHashaLinks to content may have embedded hash values. This class parses those. `name` must be any member of `_SUPPORTED_HASHES`. This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to be JSON-serializable to conform to PEP 610, this class contains the logic for parsing a hash name and value for correctness, and then checking whether that hash conforms to a schema with `.is_hash_allowed()`.strnamevaluez[#&]({choices})=([^&]*)|c#>K|]}tj|VdSN)reescape).0 hash_names P/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/link.py zLinkHash.=s,UUiRYy11UUUUUU)choicesreturnNonec&|jtvsJdSr!)r_SUPPORTED_HASHESselfs r& __post_init__zLinkHash.__post_init__Asy-------r(urlLinkHash | Nonec|j|}|dS|\}}|||S)zGSearch a string for a checksum algorithm name and encoded output value.Nrr)_hash_url_fragment_researchgroups)clsr1matchrrs r&find_hash_url_fragmentzLinkHash.find_hash_url_fragmentDsJ)0055 =4llnn esE****r(dict[str, str]c|j|jiSr!r4r.s r&as_dictzLinkHash.as_dictNs 4:&&r(r c:t|j|jgiS)z@Return a Hashes instance which checks only for the current hash.)r rrr.s r& as_hasheszLinkHash.as_hashesQsty4:,/000r(hashes Hashes | NoneboolcL|dS||j|jS)zI Return True if the current hash is allowed by `hashes`. NF) hex_digest)is_hash_allowedrrr/r@s r&rEzLinkHash.is_hash_allowedUs+ >5%%diDJ%GGGr(Nr*r+)r1rr*r2)r*r;r*r r@rAr*rB)__name__ __module__ __qualname____doc____annotations__r"compileformatjoinr-r5r0 classmethod functoolscacher:r=r?rEr(r&rr(s77IIIJJJ&BJ #))HHUUCTUUUUU *   ...._+++_[+''''1111HHHHHHr(rc&eZdZUdZded<ddZdS) MetadataFilezFInformation about a core metadata file associated with a distribution.dict[str, str] | Noner@r*r+cX|j td|jDsJdSdS)Nc3(K|] }|tvVdSr!r-)r$rs r&r'z-MetadataFile.__post_init__..fs(IITt00IIIIIIr()r@allr.s r&r0zMetadataFile.__post_init__ds= ; "IIT[IIIII I II # " I Ir(NrG)rJrKrLrMrNr0rUr(r&rWrW^sBPP!!!!JJJJJJr(rWr@rXr*cR|dSd|D}|sdS|S)Nc,i|]\}}|tv||SrUr[)r$nvs r& z$supported_hashes..ns) H H Htq!6G1G1Ga1G1G1Gr()itemsr@s r&supported_hashesrdis;~t H Hv||~~ H H HF t Mr(partrcztjtj|S)zP Clean a "part" of a URL path (i.e. after splitting on "@" characters). )urllibparsequoteunquote)res r&_clean_url_path_partrkts* <  fl22488 9 99r(ctjtj|}|dr|d}|S)z Clean the first part of a URL path that corresponds to a local filesystem path (i.e. the first part after splitting on "@" characters). z///z//)rgrequest pathname2url url2pathname startswith removeprefix)rerets r&_clean_file_url_pathrs|sU . % %fn&A&A$&G&G H HC ~~e%t$$ Jr(z(@|%2F)path is_local_pathrBcb|rt}nt}t|}g}t t j|dgD]J\}}|||||Kd |S)z* Clean the path portion of a URL. ) rsrk_reserved_chars_resplitr itertoolschainappendupperrQ)rtru clean_funcparts cleaned_partsto_cleanreserveds r&_clean_url_pathrs*) )   $ $T * *EM&yurd'C'CDD//(ZZ11222X^^--.... 77= ! !!r(r1c tj|}|j }t |j|}tj|d|}|j|ddz}|S)z Make sure a link is fully quoted. For example, if ' ' occurs in the URL, it will be replaced with "%20", and without double-quoting other characters. )rufile)schemertN) rgrhurlsplitnetlocrrt urlunsplit_replacer)r1resultrurtrrs r&_ensure_quoted_urlrsw\ " "3 ' 'F %M 6;m D D DD , ! !&//d/"K"K L LC -#abb' !C Jr(base_urlcp|dr|Stj||S)zk A faster implementation of urllib.parse.urljoin with a shortcut for absolute http/https URLs. )zhttps://zhttp://)rprgrhurljoin)rr1s r&_absolute_link_urlrs6  ~~-..3 |##Hc222r(ceZdZdZgdZ dDdEdZedFdZedGdZdHdZ dHdZ dId!Z dJd$Z dJd%Z edHd&ZedHd'ZedHd(ZedHd)ZedHd*ZedHd+ZedHd,ZdKd.ZedHd/ZedHd0Zejd1Zejd2ejZdLd3Zejd4ZedLd5Z dMd6Z!dNd8Z"edLd9Z#edLd:Z$edHd;Z%edOd<Z&dOd=Z'edOd>Z(edOd?Z)edOd@Z*edOdAZ+dPdCZ,dS)QLinkz:Represents a parsed link from a Package Index's simple URL) _parsed_url_url_path_hashes comes_fromrequires_python yanked_reasonmetadata_file_datacache_link_parsing egg_fragmentNTr1rrstr | IndexContent | Noner str | NonerrMetadataFile | NonerrBr@Mapping[str, str] | Noner*r+c|drt|}tj||_||_tj|jj|_ t |}|in| } || |_ n i|| |_ ||_|r|nd|_||_||_||_||_dS)a :param url: url of the resource pointed to (href of the link) :param comes_from: instance of IndexContent where the link was found, or string. :param requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. :param yanked_reason: the reason the file has been yanked, if the file has been yanked, or None if the file hasn't been yanked. This is the value of the "data-yanked" attribute, if present, in a simple repository HTML link. If the file has been yanked but no reason was provided, this should be the empty string. See PEP 592 for more information and the specification. :param metadata_file_data: the metadata attached to the file, or None if no such metadata is provided. This argument, if not None, indicates that a separate metadata file exists, and also optionally supplies hashes for that file. :param cache_link_parsing: A flag that is used elsewhere to determine whether resources retrieved from this link should be cached. PyPI URLs should generally have this set to False, for example. :param hashes: A mapping of hash names to digests to allow us to determine the validity of a download. z\\N)rprrgrhrrrrjrtrrr:r=rrrrrr _egg_fragmentr) r/r1rrrrrr@ link_hashhashes_from_links r&__init__z Link.__init__sP >>& ! ! #c""C!<0055 \))$*:*?@@ 33C88 !*!222 8I8I8K8K >+DLL9f9(89DL$2AKt*"4"4 ..00r( file_datadict[str, Any]page_url Link | Nonec0|d}|dStt||}|d}|d}|di}|d}||d}t|trt t |} n|rt d} nd} |rt|tsd}n|sd}||||||| S) zZ Convert an pypi json document from a simple repository page into a Link. r1Nzrequires-pythonyankedr@z core-metadatazdist-info-metadatarw)rrrr@r)getrr isinstancedictrWrdr) r8rrfile_urlr1 pyrequirerr@ metadata_infors r& from_jsonzLink.from_jsonsB==''  4 !3Hh!G!GHHMM"344 ! h// x,," o66  %MM*>??M mT * * &!-.>}.M.M!N!N    &!-d!3!3  "&   !M3!?!? !MM ! Ms %'1     r(anchor_attribsdict[str, str | None]rc@|d}|sdStt||}|d}|d}|d}||d}|dkrtd} nm|d} nh|d\} } } | dkrtt | | i} n*t d |td} |||||| S) z_ Convert an anchor element's attributes in a simple repository page to a Link. hrefNzdata-requires-pythonz data-yankedzdata-core-metadatazdata-dist-info-metadatatrue=z8Index returned invalid data-dist-info-metadata value: %s)rrrr)rrrrW partitionrdloggerdebug) r8rrrrr1rrrrhashnamesephashvals r& from_elementzLink.from_elementJsZ!!&)) 4 !3Hd!C!CDD"&&'=>> &**=99 '**+?@@  *../HIIM F " "!-d!3!3    "!%  &3%<%rUr.s r&__repr__z Link.__repr__sr(intc*t|jSr!)hashr1r.s r&__hash__z Link.__hash__sDH~~r(otherrcZt|tstS|j|jkSr!rrNotImplementedr1r/rs r&__eq__z Link.__eq__s)%&& "! !x59$$r(cZt|tstS|j|jkSr!rrs r&__lt__z Link.__lt__s)%&& "! !x%)##r(c|jSr!)rr.s r&r1zLink.urls yr(c*t|jSr!)r r1r.s r&rzLink.redacted_urls#DH---r(c|jd}tj|}|st |j\}}|St j|}|sJd|j d|S)N/zURL z produced no filename) rtrstrip posixpathbasenamerrrgrhrjr)r/rtrr user_passs r&filenamez Link.filenamesy$$!$'' !7t{ C C FIM|##D))>>>DI>>>>>t r(c*t|jSr!)rr1r.s r& file_pathzLink.file_paths48$$$r(c|jjSr!)rrr.s r&rz Link.schemes&&r(c|jjS)z4 This can contain auth information. )rrr.s r&rz Link.netlocs &&r(c|jSr!)rr.s r&rtz Link.paths zr(tuple[str, str]ctttj|jdS)Nr)rrrrtrr.s r&rz Link.splitexts+ *49+;+;C+@+@AABBBr(c6|dSN)rr.s r&extzLink.exts}}q!!r(cd|j\}}}}}tj||||dfS)Nrw)rrgrhr)r/rrrtqueryfragments r&url_without_fragmentzLink.url_without_fragments6040@-eX|&&eR'HIIIr(z[#&]egg=([^&]*)z)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$c|j|j}|sdS|d}|j|st |dddd|S)Nrz2 contains an egg fragment with a non-PEP 508 name.z8to use the req @ url syntax, and remove the egg fragmentz26.0ie3)reason replacementgone_inissue)_egg_fragment_rer6rgroup_project_name_rer9r )r/r9 project_names r&rzLink._egg_fragments%,,TY77 4{{1~~ $**<88  RRRV     r(z[#&]subdirectory=([^&]*)cr|j|j}|sdS|dSr)_subdirectory_fragment_rer6rr)r/r9s r&subdirectory_fragmentzLink.subdirectory_fragments7.55di@@ 4{{1~~r(c|jdS|jd}|jjt|St||jjS)z>>  " ) 1 %% %L)@)GHHHHr(r cbtd|jDS)Nci|] \}}||g SrUrU)r$kr`s r&raz"Link.as_hashes..s ???$!Qq1#???r()r rrbr.s r&r?zLink.as_hashess-??$,*<*<*>*>???@@@r(cjtt|jdSr!)nextiterrvaluesr.s r&rz Link.hashs(D,,..//666r(cFtt|jdSr!)rrrr.s r&r%zLink.hash_namesD&&---r(ctj|jddddddS)N#rr?)rrrryr.s r&show_urlz Link.show_urls=!$)//#q"9"9!"<"B"B3"J"J1"MNNNr(c|jdkS)Nr)rr.s r&is_filez Link.is_files{f$$r(cX|jo#tj|jSr!)r osrtisdirrr.s r&is_existing_dirzLink.is_existing_dir s|= dn = ==r(c"|jtkSr!)rr r.s r&is_wheelz Link.is_wheelsx?**r(c*ddlm}|j|jvS)Nr)vcs)pip._internal.vcsrr all_schemes)r/rs r&is_vcsz Link.is_vcss#)))))){co--r(c|jduSr!)rr.s r& is_yankedzLink.is_yankeds!--r(c*t|jSr!)rBrr.s r&has_hashz Link.has_hashsDL!!!r(rAcpdStfd|jDS)zS Return True if the link has a hash and it is allowed by `hashes`. NFc3JK|]\}}||VdSr!)rE)r$rr`r@s r&r'z'Link.is_hash_allowed..&s7QQDAq6))!Q//QQQQQQr()anyrrbrFs `r&rEzLink.is_hash_allowed s@ >5QQQQDL>>>+++X+...X. ...X."""X"RRRRRRr(rc<eZdZUdZded<ded<ded<ded <d S) _CleanResultaConvert link for equivalency check. This is used in the resolver to check whether two URL-specified requirements likely point to the same distribution and can be considered equivalent. This equivalency logic avoids comparing URLs literally, which can be too strict (e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users. Currently this does three things: 1. Drop the basic auth part. This is technically wrong since a server can serve different content based on auth, but if it does that, it is even impossible to guarantee two URLs without auth are equivalent, since the user can input different auth information when prompted. So the practical solution is to assume the auth doesn't affect the response. 2. Parse the query to avoid the ordering issue. Note that ordering under the same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are still considered different. 3. Explicitly drop most of the fragment part, except ``subdirectory=`` and hash values, since it should have no impact the downloaded content. Note that this drops the "egg=" part historically used to denote the requested project (and extras), which is wrong in the strictest sense, but too many people are supplying it inconsistently to cause superfluous resolution conflicts, so we choose to also ignore them. zurllib.parse.SplitResultparsedzdict[str, list[str]]rr subdirectoryr;r@N)rJrKrLrMrNrUr(r&r r )sN2%$$$r(r linkc|j}|jddd}|jdkr|sd}tj|jdvrt d| dd }n#ttf$rd }YnwxYwfd tD}t||d d tj|j|| S)N@rr localhosteggzIgnoring egg= fragment in %sr"rrwc6i|]}|v||dS)rrU)r$rrs r&raz_clean_link..Zs( L L LAa8mma!Qmmmr()rrr)r!rr"r@)rrrsplitrrgrhparse_qsrrr IndexErrorKeyErrorr-r rr)r#r!rr"r@rs @r& _clean_linkr.Is  F ] ! !#q ) )" -F }v|$$V_55H  3T::: /2  ! M L L L): L L LF fBDDl##FL11!    s=B B"!B"link1link2cBt|t|kSr!)r.)r/r0s r&links_equivalentr2cs u  U!3!3 33r()r@rXr*rX)rerr*r)rtrrurBr*r)r1rr*r)rrr1rr*r)r#rr*r )r/rr0rr*rB)7 __future__rrSrzloggingr rr" urllib.parsergcollections.abcr dataclassesrtypingrrrpip._internal.utils.deprecationr pip._internal.utils.filetypesr pip._internal.utils.hashesr pip._internal.utils.miscr r rrpip._internal.utils.urlsrrpip._internal.index.collectorr getLoggerrJrr-rrWrdrkrsrOrrxrrrtotal_orderingrr r.rTr2rUr(r&rAsT""""""  ######!!!!!! 766666999999------ >=======;::::::  8 $ $ L $2H2H2H2H2H2H2H2Hj $JJJJJJJJ::::$ RZ 2=99"""",&3333 `R`R`R`R`R`R`R`RF :@4 444444r(PK!]_l)__pycache__/target_python.cpython-311.pycnu[ |oi\ddlmZddlZddlmZddlmZmZddlm Z GddZ dS)) annotationsN)Tag) get_supportedversion_info_to_nodot)normalize_version_infocDeZdZdZgdZ ddd ZddZddZddZdS) TargetPythonzx Encapsulates the properties of a Python interpreter one is targeting for a package install, download, etc. )_given_py_version_infoabisimplementation platforms py_versionpy_version_info _valid_tags_valid_tags_setNr list[str] | Nonertuple[int, ...] | Noner r str | NonereturnNonec"||_|tjdd}nt|}dt t |dd}||_||_||_ ||_ ||_ d|_ d|_ dS)a< :param platforms: A list of strings or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platforms passed in. These packages will only be downloaded for distribution: they will not be built locally. :param py_version_info: An optional tuple of ints representing the Python version information to use (e.g. `sys.version_info[:3]`). This can have length 1, 2, or 3 when provided. :param abis: A list of strings or None. This is passed to compatibility_tags.py's get_supported() function as is. :param implementation: A string or None. This is passed to compatibility_tags.py's get_supported() function as is. N.)r sys version_inforjoinmapstrr r r rrrr)selfr rr r rs Y/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/target_python.py__init__zTargetPython.__init__s,'6#  "!.rr2OO4_EEOXXc#rr':;;<<  ,"$..204rcd}|j$dd|jD}d|jfd|fd|jfd|jfg}dd |DS) zD Format the given, non-None attributes for display. Nrc34K|]}t|VdS)N)r).0parts r! z,TargetPython.format_given..Ks9''"D ''''''r#r rr r  c3.K|]\}}||d|VdS)N=)r&keyvalues r!r(z,TargetPython.format_given..UsB  #-3u?Ps  U  ?P?P?P?P  r#)r rr r r )r display_version key_valuess r! format_givenzTargetPython.format_givenEs  & 2!hh''&*&A'''O $. ) _ - TY  t2 3  xx  1;      r# list[Tag]c|jD|j}|d}nt|}t||j|j|j}||_|jS)z Return the supported PEP 425 tags to check wheel candidates against. The tags are returned in order of preference (most preferred first). N)versionr r impl)rr rrr r r )r rr4tagss r!get_sorted_tagszTargetPython.get_sorted_tagsYsk   ##9O&/@@ .Y( D $D r#set[Tag]cj|j&t||_|jS)zlExactly the same as get_sorted_tags, but returns a set. This is important for performance. )rsetr7)r s r!get_unsorted_tagszTargetPython.get_unsorted_tagsrs2   '#&t';';'='=#>#>D ##r#)NNNN) r rrrr rr rrr)rr)rr2)rr8) __name__ __module__ __qualname____doc__ __slots__r"r1r7r;r,r#r!r r s   I'+26!%%) '5'5'5'5'5R    (    2$$$$$$r#r ) __future__rrpip._vendor.packaging.tagsr&pip._internal.utils.compatibility_tagsrrpip._internal.utils.miscrr r,r#r!rEs"""""" ******WWWWWWWW;;;;;;o$o$o$o$o$o$o$o$o$o$r#PK!XxOO(__pycache__/search_scope.cpython-311.pycnu[ |oiddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZmZejeZedGd d ZdS) N) dataclass)canonicalize_name)PyPI)has_tls)normalize_pathredact_auth_from_urlT)frozenc eZdZUdZgdZeeed<eeed<eed<e deedeededdfdZ defdZ d edeefd Z d S) SearchScopezF Encapsulates the locations that pip is configured to search.  find_links index_urlsno_indexr rrreturncg}|D]\}|dr0t|}tj|r|}||]t s^tj||D]H}tj |}|j dkrtdnI||||S)zQ Create a SearchScope object after normalizing the `find_links`. ~httpszipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.r ) startswithrospathexistsappendr itertoolschainurllibparseurlparseschemeloggerwarning)clsr rrbuilt_find_linkslinknew_linkparseds X/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/search_scope.pycreatezSearchScope.creates') * *Ds## $)$//7>>(++$#D  # #D ) ) ) )yy ! 4DEE  ..t44=G++NN% E ,s'!    crg}g}|jr|jtjgkr|jD]n}t|}tj|}|js"|jst d|| |o| d d ||jrJ| d d d|jDd |S)Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c34K|]}t|VdS)N)r).0urls r& z6SearchScope.get_formatted_locations..es+SSC2377SSSSSSr( )rr simple_urlrrrurlsplitrnetlocrr rformatjoinr )selflinesredacted_index_urlsr,redacted_index_urlpurls r&get_formatted_locationsz#SearchScope.get_formatted_locationsGsG  ? t4?2CCC ? ?%9#%>%>"|,,-?@@{4;NNT* $**+=>>>> LL(// :M0N0NOO    ?  LL&--IISS4?SSSSS    yyr( project_namecTdtdtffd fd|jDS)zReturns the locations found via self.index_urls Checks the url_name on the main (first in the list) index and use this url_name to produce all locations r,rctj|tjt }|ds|dz}|S)N/) posixpathr3rrquoterendswith)r,locr:s r&mkurl_pypi_urlz.mkurl_pypi_urlqsV.V\''(9,(G(GHHC<<$$ CiJr(c&g|] }|SrD)r+r,rBs r& z8SearchScope.get_index_urls_locations..~s#???s##???r()strr)r4r:rBs `@r&get_index_urls_locationsz$SearchScope.get_index_urls_locationsjsO        @???t????r(N) __name__ __module__ __qualname____doc__ __slots__listrF__annotations__bool classmethodr'r9rGrDr(r&r r s988IS S NNN' I' I'  '  ' ' ' [' R! ! ! ! ! F@S@T#Y@@@@@@r(r )rloggingrr> urllib.parser dataclassesrpip._vendor.packaging.utilsrpip._internal.models.indexrpip._internal.utils.compatrpip._internal.utils.miscrr getLoggerrHrr rDr(r&rYs  !!!!!!999999++++++......IIIIIIII  8 $ $ $l@l@l@l@l@l@l@l@l@l@r(PK!11%__pycache__/candidate.cpython-311.pycnu[ |oitddlmZddlmZddlmZddlmZedGddZd S) ) dataclass)Version)parse)LinkT)frozenc^eZdZUdZgdZeed<eed<eed<dedededdfdZ defd Z dS) InstallationCandidatez4Represents a potential "candidate" for installation.nameversionlinkr r r returnNct|d|t|dt|t|d|dS)Nr r r )object __setattr__ parse_version)selfr r r s U/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/candidate.py__init__zInstallationCandidate.__init__sX4...4M',B,BCCC4.....c6|jd|jd|jdS)Nz candidate (version z at )r )rs r__str__zInstallationCandidate.__str__s')QQ4<QQTYQQQQr) __name__ __module__ __qualname____doc__ __slots__str__annotations__rrrrrrr r s>>+++I III  JJJ/S/3/d/t//// RRRRRRRrr N) dataclassesrpip._vendor.packaging.versionrrrpip._internal.models.linkrr r!rrr%s!!!!!!111111@@@@@@****** $RRRRRRRRRRrPK![+__pycache__/selection_prefs.cpython-311.pycnu[ |oi8ddlmZddlmZGddZdS)) annotations) FormatControlc,eZdZdZgdZ dddZdS)SelectionPreferenceszd Encapsulates the candidate selection preferences for downloading and installing files.  allow_yankedallow_all_prereleasesformat_control prefer_binaryignore_requires_pythonFNrboolr r FormatControl | Noner r bool | NonereturnNonecT|d}||_||_||_||_||_dS)awCreate a SelectionPreferences object. :param allow_yanked: Whether files marked as yanked (in the sense of PEP 592) are permitted to be candidates for install. :param format_control: A FormatControl object or None. Used to control the selection of source packages / binary packages when consulting the index and links. :param prefer_binary: Whether to prefer an old, but valid, binary dist over a new source dist. :param ignore_requires_python: Whether to ignore incompatible "Requires-Python" values in links. Defaults to False. NFr)selfrr r r r s [/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/selection_prefs.py__init__zSelectionPreferences.__init__s>( " )%* "(%:",*&<###)FNFN) rr r r r rr r r rrr)__name__ __module__ __qualname____doc__ __slots__rrrrrsV I',/3#.2 =======rrN) __future__r#pip._internal.models.format_controlrrrrrrs[""""""====== -=-=-=-=-=-=-=-=-=-=rPK!$__pycache__/__init__.cpython-311.pycnu[ |oi> dZdS)z7A package that contains models that represent entities.N)__doc__T/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/__init__.pyrs====rPK!59!__pycache__/wheel.cpython-311.pycnu[ |oih ldZddlmZddlmZddlmZddlmZ ddlm Z ddl mZGddZ d S) z`Represents a wheel file and provides access to the various parts of the name that have meaning. ) annotations)Iterable)Tag)InvalidWheelFilename)parse_wheel_filenamec:eZdZdZddZddZdd ZddZddZdS)Wheelz A wheel filefilenamestrreturnNonec||_ t|}n-#t$r }t|jddd}~wwxYw|\|_}|_|_t||_ dS)Nr) r r_PackagingInvalidWheelFilenamerargsname build_tag file_tagsr version)selfr wheel_infoe_versions Q/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/wheel.py__init__zWheel.__init__sz   <-h77JJ- < < <&qvay11t ; <?I; 8T^T^8}} s A>A list[str]c>td|jDS)z4Return the wheel's tags as a sorted list of strings.c34K|]}t|VdSN)r ).0tags r z0Wheel.get_formatted_file_tags.."s(993c#hh999999)sortedr)rs rget_formatted_file_tagszWheel.get_formatted_file_tags s!99$.999999r"tags list[Tag]intc tfdt|DS#t$rtwxYw)aReturn the lowest index that one of the wheel's file_tag combinations achieves in the given list of supported tags. For example, if there are 8 supported tags and one of the file tags is first in the list, then return 0. :param tags: the PEP 425 tags to check the wheel against, in order with most preferred first. :raises ValueError: If none of the wheel's file tags match one of the supported tags. c34K|]\}}|jv|VdSr)r)ritrs rr!z*Wheel.support_index_min..2s3MMdadn9L9L9L9L9L9LMMr")next enumerate StopIteration ValueErrorrr%s` rsupport_index_minzWheel.support_index_min$sV MMMMiooMMMMM M   ,,  s '+Atag_to_prioritydict[Tag, int]cDtfd|jDS)aReturn the priority of the most preferred tag that one of the wheel's file tag combinations achieves in the given list of supported tags using the given tag_to_priority mapping, where lower priorities are more-preferred. This is used in place of support_index_min in some cases in order to avoid an expensive linear scan of a large list of tags. :param tags: the PEP 425 tags to check the wheel against. :param tag_to_priority: a mapping from tag to priority of that tag, where lower is more preferred. :raises ValueError: If none of the wheel's file tags match one of the supported tags. c30K|]}|v|VdSr)rr r2s rr!z0Wheel.find_most_preferred_tag..Gs;  %(c_>T>TOC >T>T>T>T  r")minr)rr%r2s `rfind_most_preferred_tagzWheel.find_most_preferred_tag6s?"    ,0N      r" Iterable[Tag]boolc8|j| S)zReturn whether the wheel is compatible with one of the given tags. :param tags: the PEP 425 tags to check the wheel against. )r isdisjointr0s r supportedzWheel.supportedKs >,,T2222r"N)r r r r )r r)r%r&r r')r%r&r2r3r r')r%r9r r:) __name__ __module__ __qualname____doc__rr$r1r8r=r6r"rr r s~ % % % %::::$    *333333r"r N) rA __future__rcollections.abcrpip._vendor.packaging.tagsrpip._vendor.packaging.utilsrrrpip._internal.exceptionsr r6r"rrGs#"""""$$$$$$******=<<<<<999999>3>3>3>3>3>3>3>3>3>3r"PK!W_hh!__pycache__/index.cpython-311.pycnu[ |oi\ddlZGddZeddZeddZdS) NcHeZdZdZgdZdededdffd Zdedefd ZxZS) PackageIndexzBRepresents a Package Index and provides easier access to endpoints)urlnetloc simple_urlpypi_urlfile_storage_domainrr returnNct||_tj|j|_|d|_|d|_ ||_ dS)Nsimplepypi) super__init__rurllibparseurlsplitr _url_for_pathrrr )selfrr __class__s Q/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/index.pyrzPackageIndex.__init__ st l++C007 ,,X66**622 $7   pathcLtj|j|S)N)rrurljoinr)rrs rrzPackageIndex._url_for_paths|##DHd333r) __name__ __module__ __qualname____doc__ __slots__strrr __classcell__)rs@rrrsLLRRRI 7C 7c 7d 7 7 7 7 7 74#4#44444444rrzhttps://pypi.org/zfiles.pythonhosted.org)r zhttps://test.pypi.org/ztest-files.pythonhosted.org) urllib.parserrPyPITestPyPIrrr&sq44444444*|'=UVVV <2O   rPK!gM..&__pycache__/direct_url.cpython-311.pycnu[ |oidZddlmZddlZddlZddlZddlmZddl m Z ddl m Z m Z mZmZgdZedZd Zejd ZGd d eZ d'd(dZ d'd)dZd*dZd+dZe Gdd ZGd!d"Ze Gd#d$ZeeeefZe Gd%d&ZdS),zPEP 610) annotationsN)Iterable) dataclass)AnyClassVarTypeVarUnion) DirectUrlDirectUrlValidationErrorDirInfo ArchiveInfoVcsInfoTzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$ceZdZdS)r N)__name__ __module__ __qualname__V/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/direct_url.pyr r sDrr ddict[str, Any] expected_typetype[T]keystrdefaultT | Nonereturncr||vr|S||}t||st|d|d|d|S)z3Get value from dictionary and verify expected type.z has unexpected type for z (expected )) isinstancer rrrrvalues r_getr%sb !|| cFE e] + + & Q Q Q Q Q Q Q    LrcRt||||}|t|d|S)Nz must have a value)r%r r#s r _get_requiredr',s8 M3 0 0E }&#'A'A'ABBB LrinfosIterable[InfoType | None]InfoTypecd|D}|stdt|dkrtd|dJ|dS)Ncg|]}||SNr).0infos r z#_exactly_one_of..6s 8 8 8dt'7T'7'7'7rz/missing one of archive_info, dir_info, vcs_infoz1more than one of archive_info, dir_info, vcs_infor)r len)r(s r_exactly_one_ofr35ss 8 8e 8 8 8E  & =    5zzA~~& ?    8    8Orkwargsrc >d|DS)z Make dict excluding None values.ci|] \}}||| Sr-r)r.kvs r z _filter_none..Es = = =TQq}Aq}}}r)items)r4s r _filter_noner;Cs = =V\\^^ = = ==rc`eZdZUdZded<ded<ded<dZded <eddZddZdS)rvcs_infornamervcs commit_idN str | Nonerequested_revisionrdict[str, Any] | NonerVcsInfo | Nonec |dS|t|tdt|tdt|tdS)Nr?r@rB)r?r@rB)r'rr%clsrs r _from_dictzVcsInfo._from_dictPsS 94sae,,#AsK88#As,@AA    rrcDt|j|j|jS)N)r?rBr@)r;r?rBr@selfs r_to_dictzVcsInfo._to_dictZs)#6n    r)rrCrrDrr) rrrr>__annotations__rB classmethodrHrLrrrrrHs}D HHHNNN%)))))   [       rrczeZdZdZ ddd Zedd Zejdd ZeddZ ddZ dS)r archive_infoNhashrAhashesdict[str, str] | NonerNonec"||_||_dSr-)rSrR)rKrRrSs r__init__zArchiveInfo.__init__es   rc|jSr-)_hashrJs rrRzArchiveInfo.hashns zrr$c|} |dd\}}n #t$rtd|wxYw|j ||i|_n1||jvr(|j|_||j|<||_dS)N=r1z"invalid archive_info.hash format: )split ValueErrorr rScopyrY)rKr$ hash_name hash_values rrRzArchiveInfo.hashrs   (- C(;(;% ::   .BBB {"(*5 $+--"k..00 )3 I& s;rrCArchiveInfo | Nonect|dS|t|tdt|tdS)NrRrSrRrS)r%rdictrFs rrHzArchiveInfo._from_dicts9 94sQV,,T!T85L5LMMMMrrc8t|j|jS)Nrc)r;rRrSrJs rrLzArchiveInfo._to_dicts4;????r)NN)rRrArSrTrrU)rrA)r$rArrU)rrCrrarM) rrrr>rWpropertyrRsetterrOrHrLrrrr r bs D (,X [["NNN[N @@@@@@rr cLeZdZUdZded<dZded<edd Zdd ZdS)r dir_inforr>FbooleditablerrCrDirInfo | NonecN|dS|t|tddS)NrkF)rrk)r'rjrFs rrHzDirInfo._from_dicts0 94sM!T:uMMMNNNNrrc0t|jpdS)Nrn)r;rkrJs rrLzDirInfo._to_dictsT]%:d;;;;rN)rrCrrlrM) rrrr>rNrkrOrHrLrrrr r snDHOOO[O <<<<<)rKress rrzDirectUrl.to_dictsE!*   #i0022DIN rscP|tj|Sr-)rjsonloads)rGrs r from_jsonzDirectUrl.from_jsons}}TZ]]+++rcRtj|dS)NT) sort_keys)rdumpsrrJs rto_jsonzDirectUrl.to_jsonsz$,,..D9999rrjcNt|jto |jjSr-)r"r/r rkrJs ris_local_editablezDirectUrl.is_local_editables$)W--D$)2DDr)rsrrr)rr)rrU)rrrr rM)rrrr )rrj)rrrrNrrr{rfrrrOrrrrrrrrr r s HHHNNN#L#### # # # #   X ''''    [  ,,,[,::::EEEEEErr r-) rrrrrrrrrr) rrrrrrrrrr)r(r)rr*)r4rrr) __doc__ __future__rrre urllib.parser}collections.abcr dataclassesrtypingrrrr __all__rDIRECT_URL_METADATA_NAMEcompilerw Exceptionr r%r'r3r;rr r r*r rrrrsJ """""" $$$$$$!!!!!!000000000000    GCLL, RZI J J      y   NR     NR    >>>>           2)@)@)@)@)@)@)@)@X  < < < < < < <  < gw. / AEAEAEAEAEAEAE AEAEAErPK!t*__pycache__/format_control.cpython-311.pycnu[ |oi DddlmZddlmZddlmZGddZdS)) annotations)canonicalize_name) CommandErrorc`eZdZdZddgZ dddZdd ZddZeddZ ddZ ddZ dS) FormatControlzBHelper for managing formats from which a package can be installed. no_binary only_binaryNset[str] | NonereturnNonecb|t}|t}||_||_dSN)setrr )selfrr s Z/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/format_control.py__init__zFormatControl.__init__ s7  I  %%K"&otherobjectboolctjstSjjkrdSt fdjDS)NFc3\K|]&}t|t|kV'dSr)getattr).0krrs r z'FormatControl.__eq__..!s<QQQ74##wua'8'88QQQQQQr) isinstance __class__NotImplemented __slots__all)rrs``r__eq__zFormatControl.__eq__sZ%00 "! ! >U_ , ,5QQQQQ$.QQQQQQrstrc@|jjd|jd|jdS)N(z, ))r__name__rr rs r__repr__zFormatControl.__repr__#s+.)QQDNQQd>NQQQQrvaluetargetset[str]c|drtd|d}d|vrb|||d|d|ddz=d|vrdSd|vb|D]V}|dkr|t |}||||WdS)N-z7--no-binary / --only-binary option requires 1 argument.,:all:z:none:) startswithrsplitclearaddindexrdiscard)r*r+rnewnames rhandle_mutual_excludesz$FormatControl.handle_mutual_excludes&s   C  I kk#nn KKMMM LLNNN JJw   ,cii((1,,-s""nn  Dx $T**D MM$    JJt       rcanonical_namefrozenset[str]cddh}||jvr|dn\||jvr|dn=d|jvr|dnd|jvr|dt|S)Nbinarysourcer0)r r7r frozenset)rr;results rget_allowed_formatsz!FormatControl.get_allowed_formats=sH% T- - - NN8 $ $ $ $ t~ - - NN8 $ $ $ $ ( ( ( NN8 $ $ $ $  & & NN8 $ $ $   rcH|d|j|jdS)Nr0)r:rr r(s rdisallow_binarieszFormatControl.disallow_binariesIs2 ##  N       r)NN)rr r r r r )rrr r)r r#)r*r#r+r,rr,r r )r;r#r r<)r r ) r' __module__ __qualname____doc__r rr"r) staticmethodr:rBrDrrrrsLLm,I&*'+ ' ' ' ' 'RRRRRRRR\, ! ! ! !      rrN) __future__rpip._vendor.packaging.utilsrpip._internal.exceptionsrrrIrrrMsw""""""999999111111F F F F F F F F F F rPK!/xx"__pycache__/scheme.cpython-311.pycnu[ |oi?\dZddlmZgdZedGddZdS) z For types associated with installation schemes. For a general overview of available schemes and their context, see https://docs.python.org/3/install/index.html#alternate-installation. ) dataclass)platlibpurelibheadersscriptsdataT)frozencJeZdZUdZeZeed<eed<eed<eed<eed<dS)SchemeztA Scheme holds paths which are used as the base directories for artifacts associated with a Python package. rrrrrN)__name__ __module__ __qualname____doc__ SCHEME_KEYS __slots__str__annotations__R/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/scheme.pyr r sNI LLL LLL LLL LLL IIIIIrr N)r dataclassesrrr rrrrsz"!!!!!BBB  $          rPK!?? scheme.pynu[""" For types associated with installation schemes. For a general overview of available schemes and their context, see https://docs.python.org/3/install/index.html#alternate-installation. """ from dataclasses import dataclass SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"] @dataclass(frozen=True) class Scheme: """A Scheme holds paths which are used as the base directories for artifacts associated with a Python package. """ __slots__ = SCHEME_KEYS platlib: str purelib: str headers: str scripts: str data: str PK!wJh h wheel.pynu["""Represents a wheel file and provides access to the various parts of the name that have meaning. """ from __future__ import annotations from collections.abc import Iterable from pip._vendor.packaging.tags import Tag from pip._vendor.packaging.utils import ( InvalidWheelFilename as _PackagingInvalidWheelFilename, ) from pip._vendor.packaging.utils import parse_wheel_filename from pip._internal.exceptions import InvalidWheelFilename class Wheel: """A wheel file""" def __init__(self, filename: str) -> None: self.filename = filename try: wheel_info = parse_wheel_filename(filename) except _PackagingInvalidWheelFilename as e: raise InvalidWheelFilename(e.args[0]) from None self.name, _version, self.build_tag, self.file_tags = wheel_info self.version = str(_version) def get_formatted_file_tags(self) -> list[str]: """Return the wheel's tags as a sorted list of strings.""" return sorted(str(tag) for tag in self.file_tags) def support_index_min(self, tags: list[Tag]) -> int: """Return the lowest index that one of the wheel's file_tag combinations achieves in the given list of supported tags. For example, if there are 8 supported tags and one of the file tags is first in the list, then return 0. :param tags: the PEP 425 tags to check the wheel against, in order with most preferred first. :raises ValueError: If none of the wheel's file tags match one of the supported tags. """ try: return next(i for i, t in enumerate(tags) if t in self.file_tags) except StopIteration: raise ValueError() def find_most_preferred_tag( self, tags: list[Tag], tag_to_priority: dict[Tag, int] ) -> int: """Return the priority of the most preferred tag that one of the wheel's file tag combinations achieves in the given list of supported tags using the given tag_to_priority mapping, where lower priorities are more-preferred. This is used in place of support_index_min in some cases in order to avoid an expensive linear scan of a large list of tags. :param tags: the PEP 425 tags to check the wheel against. :param tag_to_priority: a mapping from tag to priority of that tag, where lower is more preferred. :raises ValueError: If none of the wheel's file tags match one of the supported tags. """ return min( tag_to_priority[tag] for tag in self.file_tags if tag in tag_to_priority ) def supported(self, tags: Iterable[Tag]) -> bool: """Return whether the wheel is compatible with one of the given tags. :param tags: the PEP 425 tags to check the wheel against. """ return not self.file_tags.isdisjoint(tags) PK!;*CC pylock.pynu[from __future__ import annotations import dataclasses import re from collections.abc import Iterable from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING, Any from pip._vendor import tomli_w from pip._internal.models.direct_url import ArchiveInfo, DirInfo, VcsInfo from pip._internal.models.link import Link from pip._internal.req.req_install import InstallRequirement from pip._internal.utils.urls import url_to_path if TYPE_CHECKING: from typing_extensions import Self PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$") def is_valid_pylock_file_name(path: Path) -> bool: return path.name == "pylock.toml" or bool(re.match(PYLOCK_FILE_NAME_RE, path.name)) def _toml_dict_factory(data: list[tuple[str, Any]]) -> dict[str, Any]: return {key.replace("_", "-"): value for key, value in data if value is not None} @dataclass class PackageVcs: type: str url: str | None # (not supported) path: Optional[str] requested_revision: str | None commit_id: str subdirectory: str | None @dataclass class PackageDirectory: path: str editable: bool | None subdirectory: str | None @dataclass class PackageArchive: url: str | None # (not supported) path: Optional[str] # (not supported) size: Optional[int] # (not supported) upload_time: Optional[datetime] hashes: dict[str, str] subdirectory: str | None @dataclass class PackageSdist: name: str # (not supported) upload_time: Optional[datetime] url: str | None # (not supported) path: Optional[str] # (not supported) size: Optional[int] hashes: dict[str, str] @dataclass class PackageWheel: name: str # (not supported) upload_time: Optional[datetime] url: str | None # (not supported) path: Optional[str] # (not supported) size: Optional[int] hashes: dict[str, str] @dataclass class Package: name: str version: str | None = None # (not supported) marker: Optional[str] # (not supported) requires_python: Optional[str] # (not supported) dependencies vcs: PackageVcs | None = None directory: PackageDirectory | None = None archive: PackageArchive | None = None # (not supported) index: Optional[str] sdist: PackageSdist | None = None wheels: list[PackageWheel] | None = None # (not supported) attestation_identities: Optional[List[Dict[str, Any]]] # (not supported) tool: Optional[Dict[str, Any]] @classmethod def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> Self: base_dir = base_dir.resolve() dist = ireq.get_dist() download_info = ireq.download_info assert download_info package = cls(name=dist.canonical_name) if ireq.is_direct: if isinstance(download_info.info, VcsInfo): package.vcs = PackageVcs( type=download_info.info.vcs, url=download_info.url, requested_revision=download_info.info.requested_revision, commit_id=download_info.info.commit_id, subdirectory=download_info.subdirectory, ) elif isinstance(download_info.info, DirInfo): package.directory = PackageDirectory( path=( Path(url_to_path(download_info.url)) .resolve() .relative_to(base_dir) .as_posix() ), editable=( download_info.info.editable if download_info.info.editable else None ), subdirectory=download_info.subdirectory, ) elif isinstance(download_info.info, ArchiveInfo): if not download_info.info.hashes: raise NotImplementedError() package.archive = PackageArchive( url=download_info.url, hashes=download_info.info.hashes, subdirectory=download_info.subdirectory, ) else: # should never happen raise NotImplementedError() else: package.version = str(dist.version) if isinstance(download_info.info, ArchiveInfo): if not download_info.info.hashes: raise NotImplementedError() link = Link(download_info.url) if link.is_wheel: package.wheels = [ PackageWheel( name=link.filename, url=download_info.url, hashes=download_info.info.hashes, ) ] else: package.sdist = PackageSdist( name=link.filename, url=download_info.url, hashes=download_info.info.hashes, ) else: # should never happen raise NotImplementedError() return package @dataclass class Pylock: lock_version: str = "1.0" # (not supported) environments: Optional[List[str]] # (not supported) requires_python: Optional[str] # (not supported) extras: List[str] = [] # (not supported) dependency_groups: List[str] = [] created_by: str = "pip" packages: list[Package] = dataclasses.field(default_factory=list) # (not supported) tool: Optional[Dict[str, Any]] def as_toml(self) -> str: return tomli_w.dumps(dataclasses.asdict(self, dict_factory=_toml_dict_factory)) @classmethod def from_install_requirements( cls, install_requirements: Iterable[InstallRequirement], base_dir: Path ) -> Self: return cls( packages=sorted( ( Package.from_install_requirement(ireq, base_dir) for ireq in install_requirements ), key=lambda p: p.name, ) ) PK!WI'L"L""__pycache__/pylock.cpython-311.pycnu[ .|oiCddlmZddlZddlZddlmZddlmZddlmZddl m Z m Z ddl m Z ddlmZmZmZdd lmZdd lmZdd lmZe rdd lmZejd Zd%dZd&dZeGddZeGddZeGddZ eGddZ!eGdd Z"eGd!d"Z#eGd#d$Z$dS)') annotationsN)Iterable) dataclass)Path) TYPE_CHECKINGAny)tomli_w) ArchiveInfoDirInfoVcsInfo)Link)InstallRequirement) url_to_path)Selfz^pylock\.([^.]+)\.toml$pathrreturnboolcp|jdkp+ttjt|jS)Nz pylock.toml)namerrematchPYLOCK_FILE_NAME_RE)rs m/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/models/pylock.pyis_valid_pylock_file_namers+ 9 % Wbh7JDI.V.V)W)WWdatalist[tuple[str, Any]]dict[str, Any]cd|DS)NcFi|]\}}||dd|S)N_-)replace).0keyvalues r z&_toml_dict_factory..s1 U U UZS%5CTCKKS ! !5CTCTCTr)rs r_toml_dict_factoryr)s U U4 U U UUrcBeZdZUded<ded<ded<ded<ded<dS) PackageVcsstrtype str | Noneurlrequested_revision commit_id subdirectoryN__name__ __module__ __qualname____annotations__r(rrr+r+sE IIIOOO""""NNNrr+c.eZdZUded<ded<ded<dS)PackageDirectoryr,rz bool | Noneeditabler.r2Nr3r(rrr9r9)s3 IIIrr9c.eZdZUded<ded<ded<dS)PackageArchiver.r/dict[str, str]hashesr2Nr3r(rrr<r<0s5OOOrr<c.eZdZUded<ded<ded<dS) PackageSdistr,rr.r/r=r>Nr3r(rrr@r@:2 IIIOOOrr@c.eZdZUded<ded<ded<dS) PackageWheelr,rr.r/r=r>Nr3r(rrrCrCDrArrCceZdZUded<dZded<dZded<dZded <dZd ed <dZd ed <dZ ded<e ddZ dS)Packager,rNr.versionzPackageVcs | NonevcszPackageDirectory | None directoryzPackageArchive | NonearchivezPackageSdist | Nonesdistzlist[PackageWheel] | Nonewheelsireqrbase_dirrrrc|}|}|j}|sJ||j}|jrqt |jtrCt|jj |j |jj |jj |j |_ nt |jtrtt!t#|j ||jjr |jjnd|j |_n=t |jt,rF|jjst1t3|j |jj|j |_nt1t7|j|_t |jt,r|jjst1t;|j }|jr-t?|j |j |jjg|_!n:tE|j |j |jj|_#nt1|S)Nr)r-r/r0r1r2)rr:r2)r/r>r2)rr/r>)$resolveget_dist download_infocanonical_name is_direct isinstanceinfor r+rGr/r0r1r2r r9rr relative_toas_posixr:rHr r>NotImplementedErrorr<rIr,rFr is_wheelrCfilenamerKr@rJ)clsrLrMdistrRpackagelinks rfrom_install_requirementz Package.from_install_requirement^sh##%%}}* }#4./// >9 ,-,g66! ,(&+/%)'4'9'L+0:!.!;  M.88 ,$4[):;;<< $X..!)-6" *33!!.!; % % %!!M. << ,$)00-///"0%)(-4!.!;###*+++!$,//GO-,k:: ,$)00-///M-..= $!% - 1#0#5#<&GNN%1!])-,18%%%GMM*+++r)rLrrMrrr) r4r5r6r7rFrGrHrIrJrK classmethodr`r(rrrErENs IIIG"C!!!!)-I----%)G))))!%E%%%%(,F,,,,@@@[@@@rrEcxeZdZUdZded<dZded<ejeZ ded<dd Z e ddZ dS)Pylockz1.0r, lock_versionpip created_by)default_factoryz list[Package]packagesrc\tjtj|tS)N) dict_factory)r dumps dataclassesasdictr))selfs ras_tomlzPylock.as_tomls#}[/CUVVVWWWrinstall_requirementsIterable[InstallRequirement]rMrrcT|tfd|DdS)Nc3NK|]}t|V dSN)rEr`)r$rLrMs r z3Pylock.from_install_requirements..sG44T8DDrc|jSrtrO)ps rz2Pylock.from_install_requirements..safr)r%)rh)sorted)r\rprMs `rfrom_install_requirementsz Pylock.from_install_requirementss^s 4%$     rN)rr,)rprqrMrrr) r4r5r6rdr7rfrlfieldlistrhrorarzr(rrrcrcsL J/k/EEEHEEEEXXXX    [    rrc)rrrr)rrrr)% __future__rrlrcollections.abcrrpathlibrtypingrr pip._vendorr pip._internal.models.direct_urlr r r pip._internal.models.linkr pip._internal.req.req_installrpip._internal.utils.urlsrtyping_extensionsrcompilerrr)r+r9r<r@rCrErcr(rrrs"""""" $$$$$$!!!!!!%%%%%%%%IIIIIIIIII******<<<<<<000000'&&&&&& bj!;<<XXXXVVVV            PPPPPPP Pf            rPK! Th= = /__pycache__/installation_report.cpython-311.pycnu[ |oi \ddlmZddlmZddlmZddlmZddlm Z GddZ dS) )Sequence)Any)default_environment) __version__)InstallRequirementcreZdZdeefdZededeee ffdZ deee ffdZ dS)InstallationReportinstall_requirementsc||_dS)N)_install_requirements)selfr s _/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/installation_report.py__init__zInstallationReport.__init__ s%9"""ireqreturnc|js Jd||j|j|jr |jjnd|j|jd}|jr|jrt|j|d<|S)NzNo download_info for F) download_info is_direct is_yanked requestedmetadatarequested_extras) rto_dictrlinkr user_suppliedget_dist metadata_dictextrassorted)clsrress r_install_req_to_dictz'InstallationReport._install_req_to_dicts!AA#A4#A#AAA! "/779915 D,,u+ 5'  *   :$+ :&,T[&9&9C" # rcVdtfdjDtdS)N1c:g|]}|S)r#).0rr s r z.InstallationReport.to_dict../s448))$//r)version pip_versioninstall environment)rr r)r s`rrzInstallationReport.to_dict+sL&<@r9s$$$$$$======<<<<<</ / / / / / / / / / rPK!Cܦm  installation_report.pynu[from collections.abc import Sequence from typing import Any from pip._vendor.packaging.markers import default_environment from pip import __version__ from pip._internal.req.req_install import InstallRequirement class InstallationReport: def __init__(self, install_requirements: Sequence[InstallRequirement]): self._install_requirements = install_requirements @classmethod def _install_req_to_dict(cls, ireq: InstallRequirement) -> dict[str, Any]: assert ireq.download_info, f"No download_info for {ireq}" res = { # PEP 610 json for the download URL. download_info.archive_info.hashes may # be absent when the requirement was installed from the wheel cache # and the cache entry was populated by an older pip version that did not # record origin.json. "download_info": ireq.download_info.to_dict(), # is_direct is true if the requirement was a direct URL reference (which # includes editable requirements), and false if the requirement was # downloaded from a PEP 503 index or --find-links. "is_direct": ireq.is_direct, # is_yanked is true if the requirement was yanked from the index, but # was still selected by pip to conform to PEP 592. "is_yanked": ireq.link.is_yanked if ireq.link else False, # requested is true if the requirement was specified by the user (aka # top level requirement), and false if it was installed as a dependency of a # requirement. https://peps.python.org/pep-0376/#requested "requested": ireq.user_supplied, # PEP 566 json encoding for metadata # https://www.python.org/dev/peps/pep-0566/#json-compatible-metadata "metadata": ireq.get_dist().metadata_dict, } if ireq.user_supplied and ireq.extras: # For top level requirements, the list of requested extras, if any. res["requested_extras"] = sorted(ireq.extras) return res def to_dict(self) -> dict[str, Any]: return { "version": "1", "pip_version": __version__, "install": [ self._install_req_to_dict(ireq) for ireq in self._install_requirements ], # https://peps.python.org/pep-0508/#environment-markers # TODO: currently, the resolver uses the default environment to evaluate # environment markers, so that is what we report here. In the future, it # should also take into account options such as --python-version or # --platform, perhaps under the form of an environment_override field? # https://github.com/pypa/pip/issues/11198 "environment": default_environment(), } PK!LJHrmPosts_model.phpnu[PK!y/FFLogin_model.phpnu[PK!( t index.htmlnu[PK! 1 Post_model.phpnu[PK!ڰ6ASS User_model.phpnu[PK!-news.phpnu[PK!οE11 .Newsmodel.phpnu[PK!k?HH V/Country.phpnu[PK!l.G"xPost.phpnu[PK!gGG __init__.pynu[PK!g'' __pycache__/index.cpython-36.pycnu[PK!~{C#__pycache__/__init__.cpython-36.pycnu[PK!~{C),__pycache__/__init__.cpython-36.opt-1.pycnu[PK!g''&P__pycache__/index.cpython-36.opt-1.pycnu[PK!hN2m͈index.pynu[PK!UV V UserModel.phpnu[PK!$P format_control.pynu[PK! ̛gsearch_scope.pynu[PK!k; Acandidate.pynu[PK!}$n__pycache__/candidate.cpython-38.pycnu[PK!k-t__pycache__/link.cpython-38.pycnu[PK!Mwzz __pycache__/index.cpython-38.pycnu[PK!߂m%__pycache__/link.cpython-38.opt-1.pycnu[PK!| p p )n__pycache__/format_control.cpython-38.pycnu[PK!| p p /7__pycache__/format_control.cpython-38.opt-1.pycnu[PK!Bh<<*__pycache__/selection_prefs.cpython-38.pycnu[PK!Mwzz& __pycache__/index.cpython-38.opt-1.pycnu[PK!ௐ)l__pycache__/__init__.cpython-38.opt-1.pycnu[PK!+0 .__pycache__/target_python.cpython-38.opt-1.pycnu[PK!+0 (__pycache__/target_python.cpython-38.pycnu[PK!Bh<<0[,__pycache__/selection_prefs.cpython-38.opt-1.pycnu[PK!}*2__pycache__/candidate.cpython-38.opt-1.pycnu[PK!@< '9__pycache__/search_scope.cpython-38.pycnu[PK!@< - F__pycache__/search_scope.cpython-38.opt-1.pycnu[PK!ௐ#S__pycache__/__init__.cpython-38.pycnu[PK!AGv!U!UPTlink.pynu[PK!ޙselection_prefs.pynu[PK!&dʱtarget_python.pynu[PK!I __init__.pyonu[PK!X?-- index.pycnu[PK!X?-- Cindex.pyonu[PK!I __init__.pycnu[PK!v direct_url.pynu[PK!Zpj"qq __pycache__/link.cpython-311.pycnu[PK!]_l)Y__pycache__/target_python.cpython-311.pycnu[PK!XxOO( n__pycache__/search_scope.cpython-311.pycnu[PK!11%__pycache__/candidate.cpython-311.pycnu[PK![+7__pycache__/selection_prefs.cpython-311.pycnu[PK!$L__pycache__/__init__.cpython-311.pycnu[PK!59!__pycache__/wheel.cpython-311.pycnu[PK!W_hh!__pycache__/index.cpython-311.pycnu[PK!gM..&__pycache__/direct_url.cpython-311.pycnu[PK!t*__pycache__/format_control.cpython-311.pycnu[PK!/xx"__pycache__/scheme.cpython-311.pycnu[PK!?? bscheme.pynu[PK!wJh h wheel.pynu[PK!;*CC zpylock.pynu[PK!WI'L"L""__pycache__/pylock.cpython-311.pycnu[PK! Th= = /@__pycache__/installation_report.cpython-311.pycnu[PK!Cܦm  0Kinstallation_report.pynu[PK<<GV