Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for changing username #1190

Open
jleclanche opened this issue May 17, 2016 · 19 comments
Open

Add support for changing username #1190

jleclanche opened this issue May 17, 2016 · 19 comments
Assignees
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this. needs discussion a product management/policy issue maintainers and users should discuss usability UX/UI design, user experience, user interface

Comments

@jleclanche
Copy link

This is a sorely needed feature on pypi. Let me know if I can help implement it in warehouse.

@brainwane
Copy link
Contributor

This is a new feature that legacy PyPI does not support, and I also think it would be a good idea -- you're welcome to help implement it (although it might depend on #414 ?).

@nlhkabu nlhkabu added the requires triaging maintainers need to do initial inspection of issue label Jul 2, 2016
@nlhkabu
Copy link
Contributor

nlhkabu commented Jul 2, 2016

#414 is now closed, so this is fine to go ahead.

@nlhkabu nlhkabu added Post launch - medium priority and removed requires triaging maintainers need to do initial inspection of issue labels Jul 2, 2016
@brainwane brainwane added this to the 5: Shut Down Legacy PyPI milestone Dec 7, 2017
@brainwane
Copy link
Contributor

@jleclanche thanks for your note and sorry for the slow response!

The folks working on Warehouse have gotten funding to concentrate on improving and deploying Warehouse, and have kicked off work towards our development roadmap -- the most urgent task is to improve Warehouse to the point where we can redirect pypi.python.org to pypi.org so the site is more sustainable and reliable. Since, as @di noted in #2833 (comment) , this feature isn't something that the legacy site has, I've moved it to a future milestone. But we'd be happy if a volunteer helped make it happen sooner than that!

Thanks and sorry again for the wait.

@brainwane
Copy link
Contributor

@jleclanche You mentioned you'd be interested in implementing it -- right now is a great time to get started working on Warehouse, since there are multiple people working actively on Warehouse for the next few months who can help you get started and review your code. Ernest W. Durbin III has multiple livechat mentorship slots available each week to help if you're interested in joining us!

@brainwane brainwane added UX/UI design, user experience, user interface usability labels Feb 7, 2018
@brainwane brainwane added the help needed We'd love volunteers to advise on or help fix/implement this. label Feb 21, 2018
@brainwane brainwane modified the milestones: 5: Shut Down Legacy PyPI, 6. Post Legacy Shutdown Mar 6, 2018
@brainwane
Copy link
Contributor

We'd appreciate a volunteer's help with this feature! if you have questions along the way as you work on this, please feel free to ask them here, in #pypa-dev on Freenode, or the pypa-dev mailing list.

In today's core Warehouse developers' meeting we decided to pare down our near-future milestones on our development roadmap so they really only contain the essential bugfixes and features we need to launch, replace legacy PyPI, and shut down the old site. So I'm moving this issue into a milestone further in the future.

@di
Copy link
Member

di commented Mar 22, 2018

When we add support for this, we'll need to add an attribute event purge on User.username:

@db.listens_for(User.username, 'set')
def user_username_receive_set(config, target, value, oldvalue, initiator):
    receive_set(User.username, config, target)

config.register_origin_cache_keys(
    User.username,
    purge_keys=[
        key_factory("user/{obj.user.username}"),
        key_factory(
            "project/{itr.normalized_name}",
            iterate_on='user.projects',
        )
    ],
)

@brainwane brainwane added Post launch - high priority needs discussion a product management/policy issue maintainers and users should discuss and removed Post launch - medium priority labels Jun 25, 2019
@brainwane
Copy link
Contributor

I'm currently looking into best practices for how to support username changes in a context (like PyPI) where username reputation might be important, but also we really do want to provide some way for people to change usernames (e.g., trans people whose old usernames reflect their old legal names). If we decide that username changes need approval from site admins/moderators, it might be something we should implement through #3231.

(Future implementers will also want to note the conversation in #3189 about URL changes, and to update the "Cannot be changed." message in warehouse/templates/manage/account.html.)

@brainwane
Copy link
Contributor

@ewdurbin and @dstufft and I had a conversation the other day which included some thoughts about soft deletes perhaps being the right model for usernames #6091 .

Also: We probably want to ensure usernames are only used once, to avoid user confusion. (So, once one user has used a username, it can never be used by anyone else again.) We'd probably implement this by having a second (write-only) usernames table, like we already use for filenames, and perhaps a private audit log for admins to look at in case of abuse.

@nlhkabu sometime soon let's talk about the use cases for this feature?

@nlhkabu
Copy link
Contributor

nlhkabu commented Aug 9, 2019

@brainwane I've assigned this ticket to us both as a reminder to discuss.

@nihaals
Copy link

nihaals commented Apr 13, 2020

Is this still being discussed?

@brainwane
Copy link
Contributor

I'd like to revive conversation about this - on a volunteer basis since I believe this work doesn't fall under the remit of any of the current donor-funded projects on Python packaging.

@nlhkabu shall we talk about this perhaps next week?

@nlhkabu
Copy link
Contributor

nlhkabu commented Apr 26, 2020

@brainwane have pinged you on Slack. Let's work out a specification and post here :)

@brainwane
Copy link
Contributor

@nlhkabu maybe you have time to talk about this (on a volunteer basis) this week? I'm so sorry for dropping the ball.

@ewdurbin
Copy link
Member

I believe now that we have moved to UUID for all references to User objects, the biggest obstacle is out of the way.

The most important thing to consider now would be handling of the retired usernames. Reuse could lead to potential malicious "typosquatting" attacks on retired names.

@ewdurbin
Copy link
Member

Ah, looks like this was previously discussed (in this very thread :)).

A registry similar to what we keep for filenames seems sufficient.

@pradyunsg
Copy link
Contributor

pradyunsg commented Dec 14, 2020

@ewdurbin Would there be any policy in place for removing names from the "you cannot use this/retired" list? I am slightly concerned that we could see spammy hits since our signup/register page seems fairly straightforward to auto-spam.

@pradyunsg
Copy link
Contributor

(I probably shouldn't have directed that last comment with a mention at Ee, but they're probably also the best person to respond to it?)

@ewdurbin
Copy link
Member

The best method would probably be to only add usernames to the retired list if they were created and then retired during a username change event. If we see an excess of these after the likely massive influx when the feature launches... we'd need to reassess.

Aside from being a pest, I'm not sure that there is an strong enough incentive to squat out usernames by going through that whole process.

@brainwane
Copy link
Contributor

Per #12120, there's now a note in the FAQ:

PyPI does not currently support changing a username.
Instead, you can create a new account with the desired username, add the new account as a maintainer of all the projects your old account owns, and then delete the old account, which will have the same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this. needs discussion a product management/policy issue maintainers and users should discuss usability UX/UI design, user experience, user interface
Projects
None yet
Development

No branches or pull requests

7 participants