-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
3347ae3 😍 |
91d7d1b
to
6f65eec
Compare
Yesterday I started down a path of using Aspen typecasters to DRY up in a more general way. PR forthcoming against master for typecasting implementation, blocking this on that. |
Alright, so we're looking at either implementing proper internal redirects, or serving package-projects on the same paths as regular projects after all. The former is proving tricky (we either greatly complicate the |
I guess that means we need to try to name projects after the underlying package on-claim, falling back as with usernames. |
Bumped remaining todos to #4404. Ready for review! |
c34da4f or thereabouts breaks
|
757b498
to
404107c
Compare
gratipay/exceptions.py
Outdated
@@ -87,3 +87,6 @@ def __str__(self): | |||
return "Negative balance not allowed in this context." | |||
|
|||
class NotWhitelisted(Exception): pass | |||
|
|||
|
|||
class OutOfOptions(Exception): pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A clearer name or a docstring would help this Exception class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 3712318.
gratipay/models/package/__init__.py
Outdated
@@ -1,6 +1,10 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this whole change be merged with master so that changes in the previous PR are reflected here? It should make it easier to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully da0c3da helps?
|
||
if team is None: | ||
# Try to redirect to a Participant. | ||
from gratipay.models.participant import Participant # avoid circular import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open a new GH issue to refactor this so you don't have to lazy-import. Circular dependencies are a hassle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #4421.
9f9c87e
to
1d42094
Compare
Rebased, was 89202f8. |
Rebasing, determined from #4397 (comment) that 757b498 and previous can be pushed off of here. The work starts at 8151f86. |
89202f8
to
df8e4ac
Compare
Squashed to ease rebase, was 89202f8. |
276d28d
to
ca01581
Compare
Not sure what I was thinking. Conflict resolution is effectively the same. Lessee here ... |
ca01581
to
da0c3da
Compare
Okay! Now to address review and todo ... |
Since alice is a user we were getting redirects to /~alice.
Alright @dowski, another one on deck! |
582af24
to
77d42b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing, but overall looks good.
gratipay/models/package/__init__.py
Outdated
return team | ||
break | ||
else: | ||
raise OutOfOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code will never run, unless UUID4 is broken. I'd put my money on UUID4 and remove the else and the exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 132eceb.
Part of #4305, follows on #4397.
Todo
/on/npm/bar/
to/deadbeef/
when claimed