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

Remove mkdir_p.py when moving to Python 3 #2858

Closed
kinow opened this issue Nov 13, 2018 · 9 comments · Fixed by #2966
Closed

Remove mkdir_p.py when moving to Python 3 #2858

kinow opened this issue Nov 13, 2018 · 9 comments · Fixed by #2966
Assignees
Milestone

Comments

@kinow
Copy link
Member

kinow commented Nov 13, 2018

mkdir_p.py is almost simply an alias to os.makedirs, with the only difference being that it suppress the OSError: File exists error.

In Python 3.2+ os.makedirs takes an extra exist_ok=True argument to ignore that error. Which means that we can remove mkdir_p.py with no issues as soon as we start working on the Python 3 branch 👍

On a side note, I wonder if we could have a label like "Python 3" perhaps? And start documenting what else we have to do, so that we don't forget by the time we start working on it?

@kinow kinow self-assigned this Nov 13, 2018
@hjoliver
Copy link
Member

Yep, do it. Not sure if I was unaware of 'os.makedirs' 8 yrs ago, or just hallucinating! Feel free to create useful labels too.

@matthewrmshin
Copy link
Contributor

On a side note, I wonder if we could have a label like "Python 3" perhaps? And start documenting what else we have to do, so that we don't forget by the time we start working on it?

We should probably create some milestones. E.g.:

  • Cylc 8alpha (Packaging solution done. GTK code removed. Python 2to 3 done.)
  • Cylc 8beta (Web Architecture Ready: Reverse Proxy + Authentication service ready, and 1 or more new web service ready for demo.)
  • Cylc 8. (Web UI done.)

@matthewrmshin
Copy link
Contributor

@hjoliver As @kinow said, exists_ok as in os.makedirs(d, exist_ok=True) was only introduced in Python 3.2, so you were not hallucinating 8 years ago. 💊 💊 💊

Similar logic in Rose can be upgraded too:
https://github.com/metomi/rose/blob/d5e0db15c0b4d6979cf4db46b7d85b5fa567dd0e/lib/python/rose/fs_util.py#L131

@matthewrmshin matthewrmshin added this to the soon milestone Nov 13, 2018
@kinow
Copy link
Member Author

kinow commented Nov 13, 2018

@hjoliver could have suggested that change for Python!

@hjoliver
Copy link
Member

hjoliver commented Nov 13, 2018

Yay, glad I was not hallucinating 😁 (and I should have read @kinow 's post more carefully ... am on my phone at the conference).

@hjoliver hjoliver mentioned this issue Nov 14, 2018
6 tasks
@sadielbartholomew
Copy link
Collaborator

sadielbartholomew commented Nov 14, 2018

We should probably create some milestones

@matthewrmshin agreed.

We would of course need an agreed & rigorous definition of 'done' & 'ready' in each case, especially where it is not as clear-cut what a finished feature would be (i.e. for the Web UI we will want it to be functional & users to be happy.)

I advocate we brush up on our Greek alphabet & break milestones down further than your suggestions, though I realise they were just for illustrative purposes & not a concrete proposal. The breakdown between minor & major milestones is something we should consider carefully, because I don't think we can estimate even crudely relatively how much time & effort these various roadmap goals will take.

@oliver-sanders
Copy link
Member

oliver-sanders commented Nov 14, 2018

We should probably create some milestones

@matthewrmshin You know I'm keen on naming releases up-front i.e. 7.8.0 rather than next-release. Better for issue assignments and enforces the difference between bugfix and major releases.

I expect with different people working on different aspects of Cylc it will be very difficult to have fine-grained milestones for the intermediate stages of cylc8.

@hjoliver
Copy link
Member

hjoliver commented Nov 19, 2018

@oliver-sanders - we have "next-release" because it often wasn't clear in the past if the next release would be a maintenance release, before the the next minor or major.

I suppose an alternative strategy would be always anticipate the next minor release, and then cherrypick bug fixes to an un-advertised maintenance release if necessary. Is that what you'd prefer?

@hjoliver
Copy link
Member

[note I just corrected "minor" -> "maintenance" in the second sentence above, without which it must have seemed rather nonsensical - sorry!]

@hjoliver hjoliver mentioned this issue Mar 7, 2019
5 tasks
@matthewrmshin matthewrmshin modified the milestones: soon, cylc-8.0.0 Mar 7, 2019
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Mar 7, 2019
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 a pull request may close this issue.

5 participants