===========
Python 3 friendly automatic upgrade of Python modules and packages
quick start
-----------
::
:::python
from autoupgrade3 import AutoUpgrade
AutoUpgrade("pip").upgrade_if_needed()
The above will upgrade "pip" if there is a new version of pip out there.
The upgrade will be unattended and the python script will be restarted
installation
------------
::
pip install autoupgrade3
or install latest from repo:
::
pip install https://bitbucket.org/jorkar/autoupgrade3/get/master.tar.gz
api
---
classes
~~~~~~~
::
:::python
class AutoUpgrade(__builtin__.object)
AutoUpgrade class, holds one package
Methods
^^^^^^^
::
:::python
__init__(self, pkg, index=None, verbose=False)
Args: pkg (str): name of package index (str): alternative index, if not
given default from *pip* will be used. Include full index url, e.g.
https://example.com/simple
::
:::python
check(self)
Check if pkg has a later version Returns true if later version exists.
::
:::python
restart(self)
Restart application with same args as it was started. Does **not**
return
::
:::python
upgrade(self, dependencies=False)
Upgrade the package unconditionaly Args: dependencies, update
dependencies if True (see pip--no-deps)
::
:::python
upgrade_if_needed(self, restart=True, dependencies=False)
Upgrade the package if there is a later version available. Args:
restart, restart app if True dependencies, update dependencies if True
(see pip --no-deps)
Supported platforms
-------------------
Currently tested on Linux with Python 2.7/3.5. Should be usable on Windows and \*nix.
Release notes
-------------
0.2.1
~~~~~
Forked from autoupgrade
Python 3.5 support
0.2.0
~~~~~
Corrections: - Issue #2, Index did not work when specified - Issue #3,
Autoupgrade should not print to console (added verbose flag to keep
backward compatibility - Issue #4, Support for pip > 0.6
0.1.5
~~~~~
Corrections: - Issue #1, Extra index did not work for all servers.
0.1.4
~~~~~
- Fixed bug when version contains characters.
0.1.3
~~~~~
- Fixed vital fault in 0.1.2
0.1.2
~~~~~
- Setup file fixes
- Removed verbose output as default
- Return value fixed of upgrade()
0.1.1
~~~~~
- Dependencies updated
0.1.0
~~~~~
Initial release
Info
====
- Homepage: https://github.com/hayorov/autoupgrade3
Metadata
Release files for autoupgrade3 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autoupgrade3-0.2.1.tar.gz | 3.7 kB | Without provenance | Details for autoupgrade3-0.2.1.tar.gz |
Release files / autoupgrade3-0.2.1.tar.gz
| Download URL | autoupgrade3-0.2.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d72fc4bc11befa56aae18470726af6ad126fb3c12ae399f42d69130c49d2757
|
|
BLAKE2b-256 checksum How to use checksums |
f181cf1e594c30bd8edd30f80d116d5f9defd0b9cad6ef49d7e9ba723bb0e75d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for autoupgrade3 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.