Skip to content

Commit

Permalink
Merge pull request #149 from Starry-OvO/develop
Browse files Browse the repository at this point in the history
Update 3.7.4
  • Loading branch information
lumina37 authored Nov 3, 2023
2 parents db7a88a + cb19cc9 commit edda6ef
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- "thirdparty/**"
- "tests/**"
- ".github/workflows/CI*"
workflow_dispatch:

jobs:
test:
Expand All @@ -27,7 +28,7 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.11", "3.12"]

steps:
- name: Checkout develop
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ jobs:
- uses: actions/checkout@v3

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* pp38-* pp39-* pp310-*"
CIBW_SKIP: "*-win32 *_i686 *_s390x *_ppc64le"
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion aiotieba/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.7.3"
__version__ = "3.7.4"
10 changes: 7 additions & 3 deletions aiotieba/api/get_threads/_classdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,14 @@ def __init__(self, data_proto: TypeMessage) -> None:
self._is_hide = bool(data_proto.is_frs_mask)
self._is_livepost = bool(data_proto.is_livepost)
self._vote_info = VoteInfo()._init(data_proto.poll_info)
if not self._is_share:
self._share_origin = ShareThread()._init_null()
if self._is_share:
if data_proto.origin_thread_info.pid:
self._share_origin = ShareThread()._init(data_proto.origin_thread_info)
else:
self._is_share = False
self._share_origin = ShareThread()._init_null()
else:
self._share_origin = ShareThread()._init(data_proto.origin_thread_info)
self._share_origin = ShareThread()._init_null()
self._view_num = data_proto.view_num
self._reply_num = data_proto.reply_num
self._share_num = data_proto.share_num
Expand Down
2 changes: 1 addition & 1 deletion aiotieba/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAIN_VERSION = "12.49.1.0"
MAIN_VERSION = "12.50.0.0"
POST_VERSION = "12.35.1.0"

APP_SECURE_SCHEME = "https"
Expand Down
5 changes: 4 additions & 1 deletion aiotieba/helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
from types import FrameType
from typing import Any, Callable

import async_timeout
if sys.version_info >= (3, 11):
import asyncio as async_timeout
else:
import async_timeout

from ..exception import exc_handlers
from ..logging import get_logger
Expand Down
35 changes: 23 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,22 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP :: Session",
]
requires-python = ">=3.8"
requires-python = ">=3.8,<3.13"
dependencies = [
"aiohttp<3.9,>=3.8.4;python_version=='3.8'",
"aiohttp<4,>=3.8.4;python_version>='3.9'", # See https://github.com/aio-libs/aiohttp/pull/6638
"aiohttp<3.10,>=3.8.4;python_version=='3.8'",
"aiohttp<4,>=3.8.4;python_version>='3.9' and python_version<'3.12'",
"aiohttp<4,>=3.9.0b0;python_version>='3.12'",
"beautifulsoup4<4.13,>=4.4.1;python_version=='3.8'",
"beautifulsoup4<5,>=4.5.2;python_version=='3.9'",
"beautifulsoup4<5,>=4.7.1;python_version>='3.10'",
"lxml<4.10,>=4.4.1;python_version=='3.8'",
"lxml<5,>=4.6.0;python_version=='3.9'",
"lxml<5,>=4.6.4;python_version=='3.10'",
"lxml<5,>=4.9.2;python_version>='3.11'",
"lxml<5,>=4.9.2;python_version=='3.11'",
"lxml<5,>=4.9.3;python_version>='3.12'",
"protobuf<5,>=4.21.0",
"pycryptodome<3.19,>=3.7.1;python_version=='3.8'",
"pycryptodome<4,>=3.7.1;python_version>='3.8'",
Expand All @@ -41,8 +44,8 @@ dynamic = ["version"]

[project.optional-dependencies]
img = [
"opencv-contrib-python-headless<4.9,>=4.6.0.66;sys_platform=='linux'",
"opencv-contrib-python<4.9,>=4.6.0.66;sys_platform!='linux'",
"opencv-contrib-python-headless<4.10,>=4.6.0.66;sys_platform=='linux'",
"opencv-contrib-python<4.10,>=4.6.0.66;sys_platform!='linux'",
]
speedup = [
"aiodns<4,>=3.0.0",
Expand All @@ -53,11 +56,12 @@ speedup = [
"pysimdjson<6,>=3.1.1;python_version=='3.9' and sys_platform=='darwin'",
"pysimdjson<6,>=3.1.1;python_version=='3.9'",
"pysimdjson<6,>=4.0.3;python_version=='3.10'",
"pysimdjson<6,>=5.0.1;python_version>='3.11'",
"uvloop<0.20,>=0.14.0;python_version=='3.8' and sys_platform!='win32'",
"uvloop<0.20,>=0.15.0;python_version=='3.9' and sys_platform!='win32'",
"uvloop<0.20,>=0.16.0;python_version=='3.10' and sys_platform!='win32'",
"uvloop<0.20,>=0.17.0;python_version>='3.11' and sys_platform!='win32'",
"pysimdjson<6,>=5.0.1;python_version=='3.11'", # pysimdjson does not support 3.12 (2023.11.03)
"uvloop<0.20.0,>=0.14.0;python_version=='3.8' and sys_platform!='win32'",
"uvloop<1.0,>=0.15.0;python_version=='3.9' and sys_platform!='win32'",
"uvloop<1.0,>=0.16.0;python_version=='3.10' and sys_platform!='win32'",
"uvloop<1.0,>=0.17.0;python_version=='3.11' and sys_platform!='win32'",
"uvloop<1.0,>=0.18.0;python_version>='3.12' and sys_platform!='win32'",
]

[tool.setuptools.packages.find]
Expand All @@ -69,15 +73,22 @@ version = { attr = "aiotieba.__version__.__version__" }
[tool.setuptools.package-data]
"*" = ["*.pyi"]

[tool.pdm]
allow_prereleases = true

[tool.pdm.dev-dependencies]
lint = ["ruff", "black"]
test = ["aiotieba[speedup]", "pytest", "pytest-asyncio", "pytest-rerunfailures"]
doc = ["mkdocs-material", "mkdocstrings[python]"]

[tool.cibuildwheel]
build = "cp38-* cp39-* cp310-* cp311-* cp312-* pp38-* pp39-* pp310-*"
skip = "*-win32 *_i686 *_s390x *_ppc64le"

[tool.black]
line-length = 120
skip-string-normalization = true
target-version = ["py38", "py39", "py310", "py311"]
target-version = ["py38", "py39", "py310", "py311", "py312"]

[tool.ruff]
line-length = 120
Expand Down

0 comments on commit edda6ef

Please sign in to comment.