8000 Fix issue #4597. Make use of mkdtemp when creating temporary config directory. by KanwarGill · Pull Request #6193 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix issue #4597. Make use of mkdtemp when creating temporary config directory. #6193

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

Merged
merged 1 commit into from
Mar 21, 2016
Merged

Conversation

KanwarGill
Copy link
Contributor

Original issue here.

I have made use of the appropriate prefix in mkdtemp that will also add username before appending the eight alphanumeric characters. For example, calling this function created the dir matplotlib-kanwar-8d6h5lxj inside my temp directory.

I am unsure as to how to add test cases for this since the change here was basically refactoring the code. Please suggest.

@tacaswell
Copy link
Member

This needs a rebase.

The best thing about refactoring without changing behavior is you do not need to add more tests 😄

@tacaswell tacaswell added this to the 1.5.2 (Critical bug fix release) milestone Mar 21, 2016
tempdir = os.path.join(tempdir, 'matplotlib-%s' % getpass.getuser())
os.environ['MPLCONFIGDIR'] = tempdir

# Set the environment variable for MPLCONFIGDIR with the tempdir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not need the verbose comment.

@KanwarGill
Copy link
Contributor Author

@tacaswell I've rebased my branch to the tip of v2.x and I have removed the extra commenting. Hope that all looks good.

@WeatherGod
Copy link
Member

Are we sure this will still work on google app engine? This whole idea of
the temporary config directory came about because of their weird
environment.

On Mon, Mar 21, 2016 at 1:00 PM, Kanwar G notifications@github.com wrote:

@tacaswell https://github.com/tacaswell I've rebased my branch to the
tip of v2.x and I have removed the extra commenting. Hope that all looks
good.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#6193 (comment)

@tacaswell
Copy link
Member

tacaswell added a commit that referenced this pull request Mar 21, 2016
MNT: Make use of mkdtemp when creating temporary config directory.

Fix #4597
@tacaswell tacaswell merged commit 4e14ae0 into matplotlib:v2.x Mar 21, 2016
@tacaswell tacaswell modified the milestones: 2.0.1 (next bug fix release), 1.5.2 (Critical bug fix release) Mar 21, 2016
@tacaswell
Copy link
Member

I changed my mind about backporting this to 1.5.x, leaving it on 2.x + is fine.

@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.0.1 (next bug fix release) Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0