Skip to content

Commit 9bc750a

Browse files
authored
Merge pull request #104 from cs50/develop
3.2.0
2 parents f1bc664 + 5493ab4 commit 9bc750a

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ jobs:
33
test-and-deploy:
44
runs-on: ubuntu-latest
55
steps:
6-
- uses: actions/checkout@v4
7-
- uses: actions/setup-python@v5
6+
- uses: actions/checkout@v6
7+
- uses: actions/setup-python@v6
88
with:
9-
python-version: "3.13"
9+
python-version: "3.14"
1010
- name: Run tests
1111
run: |
1212
pip install babel

lib50/authentication.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import attr
21
import contextlib
2+
import dataclasses
33
import enum
44
import os
55
import pexpect
@@ -20,16 +20,18 @@
2020
_CREDENTIAL_SOCKET = Path("~/.git-credential-cache/lib50").expanduser()
2121

2222

23-
@attr.s(slots=True)
23+
@dataclasses.dataclass
2424
class User:
2525
"""An authenticated GitHub user that has write access to org/repo."""
26-
name = attr.ib()
27-
repo = attr.ib()
28-
org = attr.ib()
29-
passphrase = attr.ib(default=str)
30-
email = attr.ib(default=attr.Factory(lambda self: f"{self.name}@users.noreply.github.com",
31-
takes_self=True),
32-
init=False)
26+
name: str
27+
repo: str
28+
org: str
29+
passphrase: str = ""
30+
email: str = dataclasses.field(init=False)
31+
32+
def __post_init__(self):
33+
self.email = f"{self.name}@users.noreply.github.com"
34+
3335

3436
@contextlib.contextmanager
3537
def authenticate(org, repo=None, auth_method=None):

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
license="GPLv3",
1919
description="This is lib50, CS50's own internal library used in many of its tools.",
2020
long_description="This is lib50, CS50's own internal library used in many of its tools.",
21-
install_requires=["attrs>=18.1,<21", "packaging", "pexpect>=4.6,<5", "pyyaml<7", "requests>=2.13,<3", "setuptools", "termcolor>=1.1,<2", "jellyfish>=1,<2", "cryptography>=2.7"],
21+
install_requires=["packaging", "pexpect>=4.6,<5", "pyyaml<7", "requests>=2.13,<3", "setuptools", "termcolor>=1.1,<2", "jellyfish>=1,<2", "cryptography>=2.7"],
2222
extras_require = {
2323
"develop": ["sphinx", "sphinx-autobuild", "sphinx_rtd_theme"]
2424
},
2525
keywords=["lib50"],
2626
name="lib50",
27-
python_requires=">= 3.8",
27+
python_requires=">= 3.10",
2828
packages=["lib50"],
2929
url="https://github.com/cs50/lib50",
30-
version="3.1.4",
30+
version="3.2.0",
3131
include_package_data=True
3232
)

0 commit comments

Comments
 (0)