Skip to content

Commit b5c48b8

Browse files
committed
Merge branch 'release-0.4.1'
2 parents 9f591b5 + 51ff1b0 commit b5c48b8

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI/CD
5+
6+
on:
7+
push:
8+
pull_request:
9+
branches: [ dev ]
10+
11+
# This guards against unknown PR until a community member vet it and label it.
12+
types: [ labeled ]
13+
14+
jobs:
15+
cd:
16+
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master')
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python 3.9
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: 3.9
24+
- name: Build a package for release
25+
run: |
26+
python -m pip install build --user
27+
python -m build --sdist --wheel --outdir dist/ .
28+
- name: Publish to TestPyPI
29+
run: echo "Last time I tried, I do not have permission to release it on Test PyPI"
30+
- name: Publish to PyPI
31+
if: startsWith(github.ref, 'refs/tags')
32+
uses: pypa/gh-action-pypi-publish@v1.4.2
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_API_TOKEN }}

flask_session/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
:license: BSD, see LICENSE for more details.
1010
"""
1111

12-
__version__ = '0.4.0'
12+
__version__ = '0.4.1'
1313

1414
import os
1515

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@
1212
<https://github.com/fengsp/flask-session/zipball/master#egg=Flask-dev>`_
1313
1414
"""
15+
import re, io
1516
from setuptools import setup
1617

18+
# setup.py shall not import main package
19+
__version__ = re.search(
20+
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too
21+
io.open('flask_session/__init__.py', encoding='utf_8_sig').read()
22+
).group(1)
1723

1824
setup(
1925
name='Flask-Session',
20-
version='0.4.0',
26+
version=__version__,
2127
url='https://github.com/fengsp/flask-session',
2228
license='BSD',
2329
author='Shipeng Feng',
@@ -29,7 +35,7 @@
2935
include_package_data=True,
3036
platforms='any',
3137
install_requires=[
32-
'Flask>=0.8',
38+
'Flask>=0.8,<2.3', # Flask 2.3 removed app.session_cookie_name
3339
'cachelib'
3440
],
3541
test_suite='test_session',

0 commit comments

Comments
 (0)