PHP 7.4.33
Preview: upload.py Size: 1.14 KB
/lib/python3.6/site-packages/setuptools/command/upload.py

import getpass
from distutils.command import upload as orig


class upload(orig.upload):
    """
    Override default upload behavior to obtain password
    in a variety of different ways.
    """

    def finalize_options(self):
        orig.upload.finalize_options(self)
        self.username = (
            self.username or
            getpass.getuser()
        )
        # Attempt to obtain password. Short circuit evaluation at the first
        # sign of success.
        self.password = (
            self.password or
            self._load_password_from_keyring() or
            self._prompt_for_password()
        )

    def _load_password_from_keyring(self):
        """
        Attempt to load password from keyring. Suppress Exceptions.
        """
        try:
            keyring = __import__('keyring')
            return keyring.get_password(self.repository, self.username)
        except Exception:
            pass

    def _prompt_for_password(self):
        """
        Prompt for a password on the tty. Suppress Exceptions.
        """
        try:
            return getpass.getpass()
        except (Exception, KeyboardInterrupt):
            pass

Directory Contents

Dirs: 1 × Files: 26

Name Size Perms Modified Actions
- drwxr-xr-x 2025-07-21 08:02:53
Edit Download
2.37 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
17.76 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
1.47 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
637 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
4.38 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
12.86 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
9.37 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
7.86 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
960 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
85.16 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
24.22 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
4.57 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
2.15 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
3.75 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
2.38 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
628 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
4.87 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
270 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
2.11 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
658 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
6.55 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
4.97 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
9.00 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
1.14 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
7.14 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
594 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).