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

pysetup create: ask before moving an existing setup.cfg #56544

Closed
warsaw opened this issue Jun 14, 2011 · 5 comments
Closed

pysetup create: ask before moving an existing setup.cfg #56544

warsaw opened this issue Jun 14, 2011 · 5 comments
Assignees
Labels
type-feature A feature request or enhancement

Comments

@warsaw
Copy link
Member

warsaw commented Jun 14, 2011

BPO 12335
Nosy @warsaw, @tarekziade, @merwok

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tarekziade'
closed_at = <Date 2014-03-13.03:57:47.921>
created_at = <Date 2011-06-14.20:57:30.746>
labels = ['type-feature']
title = 'pysetup create: ask before moving an existing setup.cfg'
updated_at = <Date 2014-03-13.03:57:47.920>
user = 'https://github.com/warsaw'

bugs.python.org fields:

activity = <Date 2014-03-13.03:57:47.920>
actor = 'eric.araujo'
assignee = 'tarek'
closed = True
closed_date = <Date 2014-03-13.03:57:47.921>
closer = 'eric.araujo'
components = ['Distutils2']
creation = <Date 2011-06-14.20:57:30.746>
creator = 'barry'
dependencies = []
files = []
hgrepos = []
issue_num = 12335
keywords = []
message_count = 5.0
messages = ['138348', '138373', '138375', '138376', '138377']
nosy_count = 5.0
nosy_names = ['barry', 'tarek', 'eric.araujo', 'Arfrever', 'alexis']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue12335'
versions = ['Python 3.3']

@warsaw
Copy link
Member Author

warsaw commented Jun 14, 2011

I have both a setup.py and a setup.cfg in my package. I wanted to use pysetup create to add the new packaging stanzas to my setup.cfg, but instead, pysetup clobbered everything. I think it should instead append (or prepend) the new stuff to the existing file.

@warsaw warsaw added the stdlib Python modules in the Lib dir label Jun 14, 2011
@merwok
Copy link
Member

merwok commented Jun 15, 2011

Well, create is not update :) In its current form, create will save an existing setup.cfg as setup.cfg.old and generate a new one. The human operator will then have to merge both files if necessary. Automatically merging the old file into the new one would raise issues with respect to comments, whitespace and all that in Pythons < 3.2.

The doc and help messages are probably unclear about that.

@merwok merwok removed the stdlib Python modules in the Lib dir label Jun 15, 2011
@warsaw
Copy link
Member Author

warsaw commented Jun 15, 2011

On Jun 15, 2011, at 02:04 PM, Éric Araujo wrote:

Well, create is not update :) In its current form, create will save an
existing setup.cfg as setup.cfg.old and generate a new one. The human
operator will then have to merge both files if necessary. Automatically
merging the old file into the new one would raise issues with respect to
comments, whitespace and all that in Pythons < 3.2.

The doc and help messages are probably unclear about that.

I missed the setup.cfg.old. I think that's fine. Probably create should
print a message that it moved setup.cfg to setup.cfg.old.

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Jun 15, 2011

I find this behavior a bit awkward. Maybe we should ask first if it's ok to create a new setup.cfg and rename the old one, *before* doing it.

@merwok
Copy link
Member

merwok commented Jun 15, 2011

Maybe we should ask first if it's ok to create a new setup.cfg and
rename the old one, *before* doing it.

Agreed, if “yes” is the default answer.

@merwok merwok changed the title pysetup create will clobber an existing setup.cfg pysetup create: ask before moving an existing setup.cfg Jun 15, 2011
@merwok merwok added the type-feature A feature request or enhancement label Jun 15, 2011
@merwok merwok closed this as completed Mar 13, 2014
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants