[issue8231] Unable to run IDLE without write-access to home directory

2017-12-30 Thread Ned Deily
Ned Deily added the comment: > Ned diagnosed #32447 as likely due to the space in the user name. Actually, that's not what the primary problem was. It was a severely misconfigured home directory, both permissions and groups. I'm not sure how that situation was created

[issue8231] Unable to run IDLE without write-access to home directory

2017-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned diagnosed #32447 as likely due to the space in the user name. What matters for this issue is that a) someone can do that and b) IDLE likely could continue running anyway. There might then be problems with saving files from the editor,

[issue8231] Unable to run IDLE without write-access to home directory

2017-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Another duplicate: #32411, MacOS 10.3.1, user apparently cannot write to home dir. Starting IDLE in terminal results in Warning: unable to create user config directory /Users/Steve Margetts/.idlerc Check path and permissions. Exiting!

[issue8231] Unable to run IDLE without write-access to home directory

2017-09-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #30918 as a duplicate of this. It has full 'set' and expanduser info. -- ___ Python tracker ___

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-09 Thread Louie Lu
Louie Lu added the comment: How about only taking warning when not able to create dir at GetUserCfgDir(), then take the permission handler in other place? e.g. when user trying to save the config in bad dir, pop-out a dialog to tell it is permission problem or dir not eixsts...etc.

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27534 is about reducing the imports into the user runcode process. Without rechecking the reason for each import, I think it possible that this might result in config not being indirectly imported. -- dependencies: +IDLE: Reduce number and time for

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 552f26680d3806df7c27dd7161fd7d57ac815f78 by terryjreedy in branch '3.6': [3.6] bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (GH-2629) (#2631) https://github.com/python/cpython/commit/552f26680d3806df7c27dd7161fd7d57ac815f78

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2696 ___ Python tracker ___ ___

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 223c7e70e48eb6eed4aab3906fbe32b098faafe3 by terryjreedy in branch 'master': bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629) https://github.com/python/cpython/commit/223c7e70e48eb6eed4aab3906fbe32b098faafe3 --

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2694 ___ Python tracker ___ ___

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: My second patch did fix that. I think I will extract that part immediately. -- ___ Python tracker ___

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: > GetUserCfgDir() is called in three places, (buried in one of Mark's posts). > On the fact of it, this seems like something that should be fixed. -- ___ Python tracker

[issue8231] Unable to run IDLE without write-access to home directory

2017-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Problems with patching 2.7 are no longer relevant. To test, we should refactor config so that the attempt to find and access $HOME and .idlerc are isolated in a function that can be mocked to simulate various problems. def get_rc(): """Return a directory

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Mark Roseman
Mark Roseman added the comment: Better, but alas still not quite. On further investigation, the issue is that a new instance of idleConf is instantiated in the subprocess, which then calls mkdtemp() returning a different name. You can see this by doing 'restart shell' and noting that it will

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: OK: call GetUserCfgDir once on creation of idleConf instance and set .userdir attribute. Replace repeated calls in PyShell and Editor with attributes accesses. I tested that, with patch, IDLE starts and rewrites both breakpoints.lst and recent-files.lst as

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I cannot currently think of any reason why the subprocess *needs* to access idleConf, so I want to put this on hold while investigating whether the accesses can be eliminated as part of #25507. -- dependencies: +IDLE: user code 'import tkinter;

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Without being able to make my homedir read-only, I don't, of course, see the messages. Since run does not use idleConf (I am now sure), you should have been able to proceed after clicking away the admittedly obnoxious repeat messages. The old extraneous

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-28 Thread Mark Roseman
Mark Roseman added the comment: Checked on Linux and Mac - doesn't work correctly. mkdtemp() returns a different name every time it's called, and GetUserCfgDir() is called in three places, meaning we end up with three different tmp directories (which on quick examination didn't all get

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Attached is a patch that I think will work. I have not tested it because I do not know how to make my home directory, and only my home directory, read-only. Brian, how did you do it? I now have Win 10. When I rt click user/terry and select properties, there

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-28 Thread Mark Roseman
Mark Roseman added the comment: Just a note that the 'store things in APPDATA' is issue #24765 -- ___ Python tracker ___

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-27 Thread Mark Roseman
Mark Roseman added the comment: Can I suggest that this issue continues to be about IDLE not being able to write its preferences directory/files due to permissions, and we create a new issue for the fact that IDLE is storing it in the wrong place under Windows? --

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, that is what this issue *is* about. IDLE, like Python itself, expects to be run on machines that users can write to normally, that have not been crippled by bureaucratic policies, or by users. The editor is useless if the user cannot write files

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-25 Thread Keith Teal
Keith Teal added the comment: I would also like to add that the location of this directory is not correct for Windows software. This directory should be created in %APPDATA% where users by default do have write permissions. If there are plans to ever make this application portable then it

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-25 Thread Keith Teal
Keith Teal added the comment: Hi Terry, I did not just make that stuff up on my last post, that is actually the standard for Windows applications. Yes, many Linux ports get it wrong but is that any reason to ever perpetuate a bad practice? To see the standards you can download the Windows

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Idle is not unique. Several other apps ported from unix also put .xyx files in the home directory on Windows. What is unusual, if not unique, about IDLE is the need to run multiple versions. If .idlerc is moved, already released versions will not be able to

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-01 Thread John Gray
John Gray added the comment: See Issue14576 which is the same underlying issue. -- nosy: +John Gray ___ Python tracker ___

[issue8231] Unable to run IDLE without write-access to home directory

2015-09-18 Thread Mark Roseman
Changes by Mark Roseman : -- nosy: +markroseman ___ Python tracker ___ ___

[issue8231] Unable to run IDLE without write-access to home directory

2014-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think the proper solution is to warn Cannot write .idlerc to your home directory. Settings will not be saved. and continue. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org

[issue8231] Unable to run IDLE without write-access to home directory

2014-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: .idlerc is a directory that contains the user versions of config-xyz.def. There are currently 4, another will probably be added. The 'offending' code is in configHandler.IdleConf.GetUserCfgDir() (line 195). if not os.path.exists(userDir): try:

[issue8231] Unable to run IDLE without write-access to home directory

2014-07-10 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8231 ___ ___ Python-bugs-list

[issue8231] Unable to run IDLE without write-access to home directory

2014-07-10 Thread Ned Deily
Ned Deily added the comment: The use case reported here sounds like a classroom or lab environment with many people (and likely novices) using open environment machines. In such cases, if users don't have write access to their home directories, it seems to me that there's no need to try to

[issue8231] Unable to run IDLE without write-access to home directory

2014-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't know of any request for a new option, so I would go for something simple that lets Idle run. Temporary files are a good idea for breakpoints (temporary anyway, I think) and maybe for recent files. -- ___

[issue8231] Unable to run IDLE without write-access to home directory

2013-04-29 Thread Ned Deily
Ned Deily added the comment: Issue17864 is a duplicate of this. Also, note the error reported here is a result of IDLE not having write access in the user's home directory and thus cannot create the .idlerc directory. IDLE seems to handle more gracefully the case of .idlerc existing but not