Skip to content

Commit

Permalink
Bump python to 3.11 ( close #885)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 authored Oct 8, 2023
1 parent c3ec417 commit c6834fc
Show file tree
Hide file tree
Showing 63 changed files with 884 additions and 1,012 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build-code-image
on:
push:
branches:
- master
- dev
- debug-*
paths:
- "apps/**"
- "configs/**"
- "templates/**"
workflow_dispatch:
jobs:
build-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: build code image
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: ehco1996/django-sspanel
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,code,${{ github.sha }}"
dockerfile: deploy/Dockerfile.CODE
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint
name: check-code

on:
push:
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11.5
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/code.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: runtime
name: build-runtime-image
on:
push:
branches:
Expand All @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@master

- name: build runtime image
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: ehco1996/django-sspanel
username: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -25,7 +25,7 @@ jobs:
dockerfile: deploy/Dockerfile.RUNTIME

- name: build nginx image
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: ehco1996/django-sspanel
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tag
name: build-tag-image
on:
push:
tags:
Expand All @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: build tag image
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: ehco1996/django-sspanel
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
1 change: 0 additions & 1 deletion apps/extensions/cachext.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def make_default_key(f, *args, **kwargs):


class cached:

client = None

def __init__(self, func=None, ttl=60 * 60, cache_key=make_default_key):
Expand Down
1 change: 0 additions & 1 deletion apps/openapi/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def human_used_current_traffic_rate(self, instance):


class RelayNodeAdmin(admin.ModelAdmin):

list_display = [
"__str__",
"server",
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0002_auto_20201122_0831.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0003_relaynode_remark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0002_auto_20201122_0831"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0004_auto_20210504_1420.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0003_relaynode_remark"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0005_auto_20210506_1950.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("proxy", "0004_auto_20210504_1420"),
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0006_auto_20210814_2144.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0005_auto_20210506_1950"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0007_relayrule_rule_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0006_auto_20210814_2144"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0008_auto_20211020_0821.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0007_relayrule_rule_name"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0009_auto_20220202_1243.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0008_auto_20211020_0821"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0010_auto_20220827_1555.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("proxy", "0009_auto_20220202_1243"),
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0011_auto_20220828_1040.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0010_auto_20220827_1555"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0012_auto_20220915_2040.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0011_auto_20220828_1040"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0013_proxynode_provider_remark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0012_auto_20220915_2040"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0013_proxynode_provider_remark"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("proxy", "0014_alter_trojanconfig_fallback_addr"),
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0016_proxynode_enable_udp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0015_alter_proxynode_server_alter_relaynode_server_and_more"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0016_proxynode_enable_udp"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/proxy/migrations/0018_alter_relaynode_web_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("proxy", "0017_proxynode_current_used_download_bandwidth_bytes_and_more"),
]
Expand Down
6 changes: 4 additions & 2 deletions apps/proxy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def overflow(self):
@property
def api_endpoint(self):
params = {"token": settings.TOKEN}
return f"{settings.HOST}/api/proxy_configs/{self.id}/?{urlencode(params)}"
return f"{settings.SITE_HOST}/api/proxy_configs/{self.id}/?{urlencode(params)}"

@property
def ehco_relay_port(self):
Expand Down Expand Up @@ -634,7 +634,9 @@ def get_relay_rules_configs(self):
@property
def api_endpoint(self):
params = {"token": settings.TOKEN}
return f"{settings.HOST}/api/ehco_relay_config/{self.id}/?{urlencode(params)}"
return (
f"{settings.SITE_HOST}/api/ehco_relay_config/{self.id}/?{urlencode(params)}"
)


class RelayRule(BaseModel):
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [("auth", "0009_alter_user_last_name_max_length")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class Migration(migrations.Migration):

replaces = [
("sspanel", "0001_initial"),
("sspanel", "0002_payrequest_qrcode_url"),
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0002_auto_20200728_0821.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0001_squashed_0055_auto_20200726_0847"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0003_auto_20200729_0733.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0002_auto_20200728_0821"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0004_auto_20201108_0400.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0003_auto_20200729_0733"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0005_auto_20201110_2208.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0004_auto_20201108_0400"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0006_auto_20201111_0742.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0005_auto_20201110_2208"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0007_auto_20201122_0831.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0006_auto_20201111_0742"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0008_auto_20210109_2036.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0007_auto_20201122_0831"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/migrations/0009_auto_20210131_0912.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sspanel", "0008_auto_20210109_2036"),
]
Expand Down
Loading

0 comments on commit c6834fc

Please sign in to comment.