Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 2.7 support #209

Merged
merged 3 commits into from
Feb 1, 2024
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
33 changes: 0 additions & 33 deletions .github/workflows/python2-lint.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,6 @@ jobs:
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}
unit_test_deprecated:
name: Python unit tests (deprecated python versions)
needs: pre_job
runs-on: ubuntu-20.04
strategy:
max-parallel: 3
matrix:
python-version: [2.7]
container:
image: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}
cryptography:
name: Python unit tests + cryptography
needs: pre_job
Expand Down Expand Up @@ -108,41 +82,6 @@ jobs:
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}-cryptography${{ matrix.crypto-version }}
cryptography_deprecated:
name: Python unit tests (deprecated python versions) + cryptography
needs: pre_job
runs-on: ubuntu-20.04
strategy:
max-parallel: 3
matrix:
# Packages are no longer available for the distribution that comes with the
# python:3.4 image, so we can't install the necessary dependencies. Eventually,
# this will happen to the others as well.
# EOL: [3.4]
python-version: [2.7]
container:
image: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Install system dependencies
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
apt-get -y -qq update
apt-get install -y openssl libssl-dev
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-crypto3.3-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}-cryptography3.3
postgres:
name: Python postgres unit tests
needs: pre_job
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ repos:
rev: v1.4.0
hooks:
- id: reorder-python-imports
language_version: python2.7
language_version: python3
6 changes: 1 addition & 5 deletions morango/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

default_app_config = "morango.apps.MorangoConfig"
__version__ = "0.7.1"
__version__ = "0.8.0"
2 changes: 0 additions & 2 deletions morango/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from django.apps import AppConfig

from morango.registry import session_middleware
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-05-08 23:42
from __future__ import unicode_literals

import django.db.models.deletion
import django.utils.timezone
from django.db import migrations
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0002_auto_20170511_0400.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-05-11 04:00
from __future__ import unicode_literals

import django.db.models.manager
from django.db import migrations
from django.db import models
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0003_auto_20170519_0543.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-05-19 05:43
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0004_auto_20170520_2112.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-05-20 21:12
from __future__ import unicode_literals

from django.db import migrations


Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0005_auto_20170629_2139.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-06-29 21:39
from __future__ import unicode_literals

from django.db import migrations

import morango.models.fields.crypto
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0006_instanceidmodel_system_id.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-06-30 00:15
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0007_auto_20171018_1615.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-10-18 21:15
from __future__ import unicode_literals

import datetime

import django.db.models.deletion
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0008_auto_20171114_2217.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-11-14 22:17
from __future__ import unicode_literals

import django.db.models.deletion
import django.db.models.manager
from django.db import migrations
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0009_auto_20171205_0252.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-12-05 08:52
from __future__ import unicode_literals

from django.db import migrations


Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0010_auto_20171206_1615.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-12-06 22:15
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0011_sharedkey.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-12 18:38
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0012_auto_20180927_1658.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-27 16:58
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0013_auto_20190627_1513.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-06-27 22:13
from __future__ import unicode_literals

from django.db import migrations

import morango.models.fields.uuids
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0014_syncsession_extra_fields.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2019-12-30 18:28
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
5 changes: 2 additions & 3 deletions morango/migrations/0015_auto_20200508_2104.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-05-08 21:04
from __future__ import unicode_literals

from django.db import migrations, models
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
Expand Down
5 changes: 2 additions & 3 deletions morango/migrations/0016_store_deserialization_error.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-06-10 23:48
from __future__ import unicode_literals

from django.db import migrations, models
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
Expand Down
3 changes: 1 addition & 2 deletions morango/migrations/0017_store_last_transfer_session_id.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2021-06-25 23:13
from __future__ import unicode_literals

from django.db import migrations

import morango.models.fields.uuids


Expand Down
5 changes: 2 additions & 3 deletions morango/migrations/0018_auto_20210714_2216.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-07-14 22:16
from __future__ import unicode_literals

from django.db import migrations, models
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
Expand Down
5 changes: 2 additions & 3 deletions morango/migrations/0019_auto_20220113_1807.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2022-01-13 18:07
from __future__ import unicode_literals

from django.db import migrations, models
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0020_postgres_fix_nullable.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2022-01-13 18:07
from __future__ import unicode_literals

from django.db import migrations


Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0021_store_partition_index_create.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2022-04-27 16:59
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0022_rename_instance_fields.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2023-01-31 18:53
from __future__ import unicode_literals

from django.db import migrations


Expand Down
2 changes: 0 additions & 2 deletions morango/migrations/0023_add_instance_id_fields.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2023-01-31 19:03
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

Expand Down
5 changes: 0 additions & 5 deletions morango/models/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Each certificate has a ``private_key`` used for signing (child) certificates (thus giving certain permissions)
and a ``public_key`` used for verifying that a certificate(s) was properly signed.
"""
from __future__ import unicode_literals

import json
import string

Expand All @@ -14,7 +12,6 @@
from django.db import transaction
from django.utils import timezone
from django.utils.six import string_types
from future.utils import python_2_unicode_compatible

from .fields.crypto import Key
from .fields.crypto import PrivateKeyField
Expand All @@ -30,7 +27,6 @@
from morango.utils import _assert


@python_2_unicode_compatible
class Certificate(mptt.models.MPTTModel, UUIDModelMixin):

uuid_input_fields = ("public_key", "profile", "salt")
Expand Down Expand Up @@ -329,7 +325,6 @@ def get_description(self, params):
return string.Template(self.description).safe_substitute(params)


@python_2_unicode_compatible
class Filter(object):
def __init__(self, template, params={}):
# ensure params have been deserialized
Expand Down
2 changes: 0 additions & 2 deletions morango/models/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import functools
import json
import logging
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import io

from setuptools import find_packages
Expand Down Expand Up @@ -32,7 +28,6 @@
"rsa>=3.4.2,<3.5",
"djangorestframework==3.9.1",
"django-ipware>=1.1.6,<1.2",
"future==0.16.0",
"requests",
"ifcfg",
],
Expand All @@ -44,12 +39,12 @@
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
python_requires=">=3.6, <3.12",
)
Loading
Loading