Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Test python click 7.0 #276

Merged
merged 1 commit into from
Dec 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ language: python
python:
- "2.7"
- "3.4"
# - "2.6" disable because of incompat with coveralls
- "3.3"
- "3.5"
- "3.6"
- pypy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Use `$ gandi` to easily create and manage web resources from the command line.
## Requirements

* A compatible operating system (Linux, BSD, Mac OS X/Darwin, Windows)
* Python 2.6/2.7/3.2/3.3/3.4/3.5/3.6/3.7
* Python 2.7/3.4/3.5/3.6/3.7
* openssl
* openssh
* git
Expand Down
18 changes: 9 additions & 9 deletions gandi/cli/commands/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ def export(gandi, resource, output, force, intermediate):
@certificate.command()
@click.option('--csr', required=False,
help='Csr of the new certificate (filename or content).')
@click.option('--pk', '--private-key', required=False,
@click.option('--private-key', '--pk', required=False,
help='Private key to use to generate the CSR (filename or '
'content).')
@click.option('--cn', '--common-name', required=False,
@click.option('--common-name', '--cn', required=False,
help='Common name to use when generating the CSR.')
@click.option('--country', required=False,
help='The generated CSR country (C).')
Expand Down Expand Up @@ -369,17 +369,17 @@ def create(gandi, csr, private_key, common_name, country, state, city,
@certificate.command()
@click.argument('resource', nargs=1, required=True)
@click.option('--csr', help='New csr for the certificate.', required=False)
@click.option('--pk', '--private-key', required=False,
@click.option('--private-key', '--pk', required=False,
help='Private key to use to generate the CSR.')
@click.option('--c', '--country', required=False,
@click.option('--country', '--c', required=False,
help='The generated CSR country (C).')
@click.option('--st', '--state', required=False,
@click.option('--state', '--st', required=False,
help='The generated CSR state (ST).')
@click.option('--l', '--city', required=False,
@click.option('--city', '--l', required=False,
help='The generated CSR location (L).')
@click.option('--o', '--organisation', required=False,
@click.option('--organisation', '--o', required=False,
help='The generated CSR organisation (O).')
@click.option('--ou', '--branch', required=False,
@click.option('--branch', '--ou', required=False,
help='The generated CSR branch (OU).')
@click.option('--altnames', required=False, multiple=True,
help='All the certificate altnames (comma separated text '
Expand Down Expand Up @@ -512,7 +512,7 @@ def resend_dcv(gandi, resource):

@certificate.command()
@click.argument('resource', nargs=1, required=True)
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down
6 changes: 3 additions & 3 deletions gandi/cli/commands/certstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ def info(gandi, resource):


@certstore.command()
@click.option('--pk', '--private-key', required=True,
@click.option('--private-key', '--pk', required=True,
help='Private key used to generate this CRT.')
@click.option('--crt', '--certificate', required=False,
@click.option('--certificate', '--crt', required=False,
help='The certificate.')
@click.option('--crt-id', '--certificate-id', type=click.INT, required=False,
@click.option('--certificate-id', '--crt-id', type=click.INT, required=False,
help='The certificate.')
@pass_gandi
def create(gandi, private_key, certificate, certificate_id):
Expand Down
16 changes: 8 additions & 8 deletions gandi/cli/commands/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def info(gandi, resource):


@disk.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand All @@ -139,7 +139,7 @@ def detach(gandi, resource, background, force):


@disk.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('-r', '--read-only', default=False, is_flag=True,
help='Attach disk as read-only')
Expand Down Expand Up @@ -197,7 +197,7 @@ def attach(gandi, disk, vm, position, read_only, background, force):
default=None, type=SNAPSHOTPROFILE_VM)
@click.option('--delete-snapshotprofile', default=False, is_flag=True,
help='Remove snapshot profile associated to this disk.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@pass_gandi
@click.argument('resource')
Expand Down Expand Up @@ -233,7 +233,7 @@ def update(gandi, resource, cmdline, kernel, name, size,
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
' without prompting. (default=False).')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='run command in background mode (default=False).')
@click.argument('resource', nargs=-1, required=True)
@pass_gandi
Expand Down Expand Up @@ -274,7 +274,7 @@ def delete(gandi, resource, force, background):
help='Create a disk from a disk or a snapshot.')
@option('--datacenter', type=DATACENTER, default='FR-SD5',
help='Datacenter where the disk will be created.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@pass_gandi
def create(gandi, name, vm, size, snapshotprofile, datacenter, source,
Expand Down Expand Up @@ -312,7 +312,7 @@ def create(gandi, name, vm, size, snapshotprofile, datacenter, source,
@disk.command()
@click.option('--name', type=click.STRING, default=None,
help='Snapshot name, will be generated if not provided.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource')
@pass_gandi
Expand All @@ -331,7 +331,7 @@ def snapshot(gandi, name, resource, background):


@disk.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource', required=True)
@pass_gandi
Expand All @@ -345,7 +345,7 @@ def rollback(gandi, resource, background):


@disk.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down
4 changes: 2 additions & 2 deletions gandi/cli/commands/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def info(gandi, resource):
@click.option('--extra_parameter', default=None, nargs=2,
type=(unicode, unicode),
help='Extra parameters', multiple=True)
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource', metavar='DOMAIN', required=False)
@pass_gandi
Expand Down Expand Up @@ -101,7 +101,7 @@ def create(gandi, resource, domain, duration, owner, admin, tech, bill,
@click.option('--duration', default=1, prompt=True,
type=click.IntRange(min=1, max=10),
help='Registration period in years, between 1 and 10.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('domain')
@pass_gandi
Expand Down
10 changes: 5 additions & 5 deletions gandi/cli/commands/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def info(gandi, resource):
@ip.command()
@click.argument('ip')
@click.option('--reverse', help='Update reverse (PTR record) for this IP')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@pass_gandi
def update(gandi, ip, reverse, background):
Expand All @@ -126,7 +126,7 @@ def update(gandi, ip, reverse, background):
@ip.command()
@click.argument('ip')
@click.argument('vm')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down Expand Up @@ -171,7 +171,7 @@ def attach(gandi, ip, vm, background, force):
@click.option('--vlan', help='The vlan to which attach this ip if any.')
@click.option('--ip', help='The ip if you try to create a private ip.')
@click.option('--attach', help='The vm you want to attach if any.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@pass_gandi
def create(gandi, datacenter, bandwidth, ip_version, vlan, ip, attach,
Expand Down Expand Up @@ -211,7 +211,7 @@ def create(gandi, datacenter, bandwidth, ip_version, vlan, ip, attach,

@ip.command()
@click.argument('resource')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand All @@ -233,7 +233,7 @@ def detach(gandi, resource, background, force):

@ip.command()
@click.argument('resource', nargs=-1, required=True)
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down
2 changes: 1 addition & 1 deletion gandi/cli/commands/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def update(gandi, email, password, quota, fallback, alias_add, alias_del):


@mail.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down
10 changes: 5 additions & 5 deletions gandi/cli/commands/paas.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def deploy(gandi, remote, branch):


@paas.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down Expand Up @@ -192,14 +192,14 @@ def delete(gandi, background, force, resource):
@click.option('--vhosts', default=None,
help='Virtual host(s) to be linked to the instance.')
@click.option('--ssl', help='Get ssl on that vhost.', is_flag=True)
@click.option('--pk', '--private-key',
@click.option('--private-key', '--pk',
help='Private key used to generate the ssl Certificate.')
@click.option('--poll-cert', help='Will wait for the certificate creation.',
is_flag=True)
@click.option('--password', help='Use command-line supplied password.')
@click.option('--snapshotprofile', default=None, type=SNAPSHOTPROFILE_PAAS,
help='Set a snapshot profile associated to this paas disk.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@option('--sshkey', multiple=True,
help='Authorize ssh authentication for the given ssh key.')
Expand Down Expand Up @@ -269,7 +269,7 @@ def create(gandi, name, size, type, quantity, duration, datacenter, vhosts,
help='Set a snapshot profile associated to this paas disk.')
@click.option('--reset-mysql-password', default=None,
help='Reset mysql password for root.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--delete-snapshotprofile', default=False, is_flag=True,
help='Remove a snapshot profile associated to this paas disk.')
Expand Down Expand Up @@ -306,7 +306,7 @@ def update(gandi, resource, name, size, quantity, password, sshkey,

@paas.command()
@click.argument('resource', nargs=-1, required=True)
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down
8 changes: 4 additions & 4 deletions gandi/cli/commands/vhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ def info(gandi, resource, id):
@click.option('--paas', required=True,
help='PaaS instance on which to create it.')
@click.option('--ssl', help='Get ssl on that vhost.', is_flag=True)
@click.option('--pk', '--private-key',
@click.option('--private-key', '--pk',
help='Private key used to generate the ssl Certificate.')
@click.option('--alter-zone', help='Will update the domain zone.',
is_flag=True)
@click.option('--poll-cert', help='Will wait for the certificate creation.',
is_flag=True)
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('vhost', required=True)
@pass_gandi
Expand All @@ -110,7 +110,7 @@ def create(gandi, vhost, paas, ssl, private_key, alter_zone, poll_cert,

@vhost.command()
@click.option('--ssl', help='Get ssl on that vhost.', is_flag=True)
@click.option('--pk', '--private-key',
@click.option('--private-key', '--pk',
help='Private key used to generate the ssl Certificate.')
@click.option('--poll-cert', help='Will wait for the certificate creation.',
is_flag=True)
Expand All @@ -128,7 +128,7 @@ def update(gandi, resource, ssl, private_key, poll_cert):
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
' without prompting. (default=False).')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource', required=True)
@pass_gandi
Expand Down
4 changes: 2 additions & 2 deletions gandi/cli/commands/vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def info(gandi, resource, ip):


@vlan.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down Expand Up @@ -138,7 +138,7 @@ def delete(gandi, background, force, resource):
help='Datacenter where the vlan will be spawned.')
@click.option('--subnet', help='The vlan subnet.')
@click.option('--gateway', help='The vlan gateway.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@pass_gandi
def create(gandi, name, datacenter, subnet, gateway, background):
Expand Down
14 changes: 7 additions & 7 deletions gandi/cli/commands/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def info(gandi, resource, stat):


@vm.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource', nargs=-1, required=True)
@pass_gandi
Expand All @@ -121,7 +121,7 @@ def stop(gandi, background, resource):


@vm.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource', nargs=-1, required=True)
@pass_gandi
Expand All @@ -142,7 +142,7 @@ def start(gandi, background, resource):


@vm.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.argument('resource', nargs=-1, required=True)
@pass_gandi
Expand All @@ -163,7 +163,7 @@ def reboot(gandi, background, resource):


@vm.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down Expand Up @@ -243,7 +243,7 @@ def delete(gandi, background, force, resource):
'This command will run with root privileges in the ``/`` '
'directory at the end of its boot: network interfaces and '
'disks are mounted.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@option('--sshkey', multiple=True,
help='Authorize ssh authentication for the given ssh key.')
Expand Down Expand Up @@ -355,7 +355,7 @@ def create(gandi, datacenter, memory, cores, ip_version, bandwidth, login,
@click.option('--password', default=False, is_flag=True,
help='Will ask for a password to be set for the root account '
'and the created login.')
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--reboot', default=False, is_flag=True,
help='Accept a VM reboot for non-live updates')
Expand Down Expand Up @@ -513,7 +513,7 @@ def datacenters(gandi, id):


@vm.command()
@click.option('--bg', '--background', default=False, is_flag=True,
@click.option('--background', '--bg', default=False, is_flag=True,
help='Run command in background mode (default=False).')
@click.option('--force', '-f', is_flag=True,
help='This is a dangerous option that will cause CLI to continue'
Expand Down
Loading