Skip to content

Commit 8380762

Browse files
authored
Upgrade python versions (#383)
* Upgrade python versions * node 16 * prettier upgrade * openssl-legacy-provider * simplify healthcheck for now * oops
1 parent 2f68d4b commit 8380762

File tree

13 files changed

+4270
-4977
lines changed

13 files changed

+4270
-4977
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
- uses: actions/checkout@v2
1212

1313
- name: Setup Node.js environment
14-
uses: actions/setup-node@v2.4.0
14+
uses: actions/setup-node@v3
1515
with:
16-
node-version: '12'
16+
node-version: '18'
1717

1818
- name: Cache node_modules
1919
uses: actions/[email protected]
@@ -48,7 +48,6 @@ jobs:
4848
4949
- name: Run lints
5050
run: |
51-
pip install -r dev-requirements.txt --progress-bar off
5251
black --check app.py
5352
flake8 app.py
5453
yarn prettier:check

app.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,15 @@ def get(self):
401401
# Can't really test anything because it might empty on first ever load.
402402
Shortlink.query.count()
403403

404-
# If you attempt to include Authorization headers, even on an endpoint
405-
# that doesn't need it, it will 401 if the auth token is wrong.
406-
response = requests.get(
407-
"https://api.github.com/",
408-
headers=GITHUB_REQUEST_HEADERS,
409-
timeout=GITHUB_REQUEST_TIMEOUT,
410-
)
411-
response.raise_for_status()
404+
# Commented out for now because it's doing this healthcheck too often.
405+
# # If you attempt to include Authorization headers, even on an endpoint
406+
# # that doesn't need it, it will 401 if the auth token is wrong.
407+
# response = requests.get(
408+
# "https://api.github.com/",
409+
# headers=GITHUB_REQUEST_HEADERS,
410+
# timeout=GITHUB_REQUEST_TIMEOUT,
411+
# )
412+
# response.raise_for_status()
412413
return "OK\n"
413414

414415

bin/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
find . | grep --color=never '\~$' | xargs rm -f
5+
fd -t f -I -H '\~$' | xargs rm -f
66

77
INLINE_RUNTIME_CHUNK=false yarn run build
88

dev-requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,14 @@
1515
"reactstrap": "8.10.0"
1616
},
1717
"devDependencies": {
18-
"prettier": "2.4.1",
19-
"source-map-explorer": "2.5.2"
20-
},
21-
"resolutions": {
22-
"braces": ">=2.3.1",
23-
"handlebars": ">=4.5.3",
24-
"js-yaml": ">=3.13.0",
25-
"lodash": ">=4.17.21",
26-
"mixin-deep": ">=1.3.2",
27-
"set-value": ">=2.0.1",
28-
"eslint-utils": ">=1.4.1",
29-
"serialize-javascript": ">=2.1.1",
30-
"kind-of": ">=6.0.3",
31-
"acorn": ">=5.7.4",
32-
"minimist": ">=1.2.3"
18+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
19+
"prettier": "3.0.3",
20+
"source-map-explorer": "2.5.3"
3321
},
3422
"scripts": {
3523
"analyze": "source-map-explorer build/static/js/main.*",
36-
"start": "react-scripts start",
37-
"build": "react-scripts build",
24+
"start": "react-scripts --openssl-legacy-provider start",
25+
"build": "react-scripts --openssl-legacy-provider build",
3826
"test": "react-scripts test",
3927
"test:ci": "CI=true yarn test",
4028
"prettier:check": "prettier --check src",

requirements.in

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
Flask==2.0.1
2-
psycopg2-binary==2.9.1
2+
psycopg2-binary==2.9.7
33
Flask-SQLAlchemy==2.5.1
4-
requests[security]==2.26.0
5-
python-decouple==3.4
6-
python-dotenv==0.19.0
7-
rollbar==0.16.1
4+
cryptography==3.4.7
5+
requests==2.26.0
6+
python-decouple==3.8
7+
python-dotenv==1.0.0
8+
rollbar==0.16.3
9+
10+
black==23.9.1
11+
flake8==6.1.0
12+
pip-tools==7.3.0

requirements.txt

Lines changed: 263 additions & 42 deletions
Large diffs are not rendered by default.

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Footer extends React.Component {
2424
if (document.querySelector('#_version')) {
2525
versionData = Object.assign(
2626
{},
27-
document.querySelector('#_version').dataset
27+
document.querySelector('#_version').dataset,
2828
);
2929
}
3030

src/DeployPage.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const BORS_LOGIN = 'bors[bot]';
1515

1616
function makeTagAbsoluteUrl(owner, repo, tag) {
1717
return `https://github.com/${owner}/${repo}/releases/tag/${encodeURIComponent(
18-
tag
18+
tag,
1919
)}`;
2020
}
2121

@@ -206,7 +206,7 @@ export default withRouter(DeployPage);
206206
class DeployTable extends React.Component {
207207
static propTypes = {
208208
deployInfo: PropTypes.arrayOf(
209-
PropTypes.shape({ name: PropTypes.string.isRequired })
209+
PropTypes.shape({ name: PropTypes.string.isRequired }),
210210
).isRequired,
211211
commits: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
212212
tags: PropTypes.object.isRequired,
@@ -230,7 +230,7 @@ class DeployTable extends React.Component {
230230

231231
_restoreBorsModeChoice = () => {
232232
const prefs = JSON.parse(
233-
localStorage.getItem(this.prefBorsModeCacheKey) || '{}'
233+
localStorage.getItem(this.prefBorsModeCacheKey) || '{}',
234234
);
235235
if (
236236
this.props.code in prefs &&
@@ -242,7 +242,7 @@ class DeployTable extends React.Component {
242242

243243
_persistBorsModeChoice = () => {
244244
const prefs = JSON.parse(
245-
localStorage.getItem(this.prefBorsModeCacheKey) || '{}'
245+
localStorage.getItem(this.prefBorsModeCacheKey) || '{}',
246246
);
247247
prefs[this.props.code] = this.state.borsMode;
248248
localStorage.setItem(this.prefBorsModeCacheKey, JSON.stringify(prefs));
@@ -307,7 +307,7 @@ class DeployTable extends React.Component {
307307
key={`${commit.sha}:${deploy.name}`}
308308
/>
309309
))}
310-
</tr>
310+
</tr>,
311311
);
312312

313313
if (foundMatch) {
@@ -502,7 +502,7 @@ function UserAvatars({ users }) {
502502
class RepoSummary extends React.Component {
503503
static propTypes = {
504504
deployInfo: PropTypes.arrayOf(
505-
PropTypes.shape({ name: PropTypes.string.isRequired })
505+
PropTypes.shape({ name: PropTypes.string.isRequired }),
506506
).isRequired,
507507
owner: PropTypes.string.isRequired,
508508
repo: PropTypes.string.isRequired,

src/LongUrlRedirect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LongUrlRedirect extends React.Component {
1717
PropTypes.shape({
1818
url: PropTypes.string.isRequired,
1919
name: PropTypes.string.isRequired,
20-
})
20+
}),
2121
),
2222
};
2323

0 commit comments

Comments
 (0)