Age | Commit message (Collapse) | Author |
|
* switch Dockerfile-dev to Ubuntu Focal
* Make apt noninteractive
* add --no-install-recommends
|
|
Fixes https://github.com/certbot/certbot/issues/8387.
* update _venv_common.py
* delete venv.py scripts
* rename venv script
* update relevant venv3 references
* remove set_python_envvars
|
|
Part of #7550
This PR makes appropriate corrections to run pylint on Python 3.
Why not keeping the dependencies unchanged and just run pylint on Python 3?
Because the old version of pylint breaks horribly on Python 3 because of unsupported version of astroid.
Why updating pylint + astroid to the latest version ?
Because this version only fixes some internal errors occuring during the lint of Certbot code, and is also ready to run gracefully on Python 3.8.
Why upgrading mypy ?
Because the old version does not support the new version of astroid required to run pylint correctly.
Why not upgrading mypy to its latest version ?
Because this latest version includes a new typshed version, that adds a lot of new type definitions, and brings dozens of new errors on the Certbot codebase. I would like to fix that in a future PR.
That said so, the work has been to find the correct set of new dependency versions, then configure pylint for sane configuration errors in our situation, disable irrelevant lintings errors, then fixing (or ignoring for good reason) the remaining mypy errors.
I also made PyLint and MyPy checks run correctly on Windows.
* Start configuration
* Reconfigure travis
* Suspend a check specific to python 3. Start fixing code.
* Repair call_args
* Fix return + elif lints
* Reconfigure development to run mainly on python3
* Remove incompatible Python 3.4 jobs
* Suspend pylint in some assertions
* Remove pylint in dev
* Take first mypy that supports typed-ast>=1.4.0 to limit the migration path
* Various return + else lint errors
* Find a set of deps that is working with current mypy version
* Update local oldest requirements
* Remove all current pylint errors
* Rebuild letsencrypt-auto
* Update mypy to fix pylint with new astroid version, and fix mypy issues
* Explain type: ignore
* Reconfigure tox, fix none path
* Simplify pinning
* Remove useless directive
* Remove debugging code
* Remove continue
* Update requirements
* Disable unsubscriptable-object check
* Disable one check, enabling two more
* Plug certbot dev version for oldest requirements
* Remove useless disable directives
* Remove useless no-member disable
* Remove no-else-* checks. Use elif in symetric branches.
* Add back assertion
* Add new line
* Remove unused pylint disable
* Remove other pylint disable
|
|
|
|
Certbot relies heavily on bash scripts to deploy a development environment and to execute tests. This is fine for Linux systems, including Travis, but problematic for Windows machines.
This PR converts all theses scripts into Python, to make them platform independant.
As a consequence, tox-win.ini is not needed anymore, and tox can be run indifferently on Windows or on Linux using a common tox.ini. AppVeyor is updated accordingly to execute tests for acme, certbot and all dns plugins. Other tests are not executed as they are for Docker, unsupported Apache/Nginx/Postfix plugins (for now) or not relevant for Windows (explicit Linux distribution tests or pylint).
Another PR will be done on certbot website to update how a dev environment can be set up.
* Replace several shell scripts by python equivalent.
* Correction on tox coverage
* Extend usage of new python scripts
* Various corrections
* Replace venv construction bash scripts by python equivalents
* Update tox.ini
* Unicode lines to compare files
* Put modifications on letsencrypt-auto-source instead of generated scripts
* Add executable permissions for Linux.
* Merge tox win tests into main tox
* Skip lock_test on Windows
* Correct appveyor config
* Update appveyor.yml
* Explicit coverage py27 or py37
* Avoid to cover non supported certbot plugins on Windows
* Update tox.ini
* Remove specific warnings during CI
* No cover on a debug code for tests only.
* Update documentation and help script on venv/venv3.py
* Customize help message for Windows
* Quote correctly executable path with potential spaces in it.
* Copy pipstrap from upstream
|
|
* cleanup dockerfile-dev
* map port 80
* remove python3-dev package
|
|
* install git into Docker development file
* moved git install command in Dockerfile-dev to same RUN
|
|
|
|
|
|
* remove instructions about removed Vagrantfile
* rewrite docker instructions
* say where docker-compose can be run
* give better intro for macOS devs
* prompt people for permission to install OS packages
* reword awkward sentence
* Change WORKDIR to /opt/certbot/src
This change is OK because all paths used in Dockerfile-dev are absolute paths.
* remove 'cd src' instructions for Dockerfile-dev
* Improve docker-compose testing instructions
|
|
These changes allow developers to run tests directly from the host machine using Docker, and to enable ipdb inside the container.
docker-compose.yml is upgraded to version 2 format. This means that you need docker-engine version >= 1.10.0 instead of previous requirement of version >= 1.9.1. The reason for this is to be able to use custom Dockerfile (Dockerfile-dev in this case) in build context.
ipdb has been added to dev dependencies to be able to be able to debug the code without installing it on every docker run. This is also what we recommend for debugging in the developer documentation, so there really is no reason not to install it with the dev dependencies.
setuptools is being upgraded to a newer version to be able to run coverage tests. This was using the older version of setuptools for some reason, and without the upgrade, coverage tests would fail horribly. Upgrading remedies the situation.
Few examples:
Run unit tests for certbot-apache
`docker-compose run --rm --service-ports development bash -c 'cd src;nosetests -v certbot-apache'`
Run coverage tests
`docker-compose run --rm --service-ports development bash -c 'cd src;./tox.cover.sh'`
Run linter
`docker-compose run --rm --service-ports development bash -c 'cd src;tox -e lint'`
|
|
|
|
|
|
|
|
|
|
Remove the old bootstrap scripts, which have been subsumed into letsencrypt-auto-source/pieces/bootstrappers. They no longer need to be dispatched among manually: everyone can just run letsencrypt-auto --os-packages-only, regardless of OS.
Make the root-level le-auto a symlink to the canonical version. It should thus still work for people running le-auto from a git checkout.
|
|
|
|
Originally, I had it in mind to move letsencrypt-auto inside this dir. However, now we'd like to copy it or link it to the root level, where people are used to finding it (at least for awhile). Since it would be confusing to have a letsencrypt-auto and a letsencrypt_auto right next to each other, we rename this folder.
|
|
Bootstrap scripts and letsencrypt-auto itself required some merge work.
|
|
ConfigArgParse 0.10 from PyPI supports Python 2.6, so there's no more
need to install a fixed version directly from a git branch.
|
|
They're now used only by the le-auto build process. The new public interface for OS-level bootstrapping is le-auto --os-packages-only, which dispatches by OS automatically. That obsoletes install-deps.sh as well, saving some repetition.
Also, switch to mustache-style templating to avoid colliding with shell variable references.
To optimize for the docker cache, we could later add a shim script that sources just deb_common.sh and calls its bootstrap function.
|
|
|
|
docker: Use full filename when copying symlink
|
|
Works around an upstream bug in Docker:
https://github.com/docker/docker/issues/17730
Fixes #1374
|
|
When people see requirements.txt they tend to `pip install -r`
straight way
(c.f. https://github.com/letsencrypt/letsencrypt/issues/1252). It's
only necessary for Python2.6.
|
|
`git grep -i eula` to the rescue
|
|
|
|
|