Skip to content

WIP: refactoring traitlets to support nipype requirements#2

Closed
satra wants to merge 20 commits intoipython:masterfrom
satra:enh/nipype
Closed

WIP: refactoring traitlets to support nipype requirements#2
satra wants to merge 20 commits intoipython:masterfrom
satra:enh/nipype

Conversation

@satra
Copy link

@satra satra commented Jan 2, 2014

The main additions are:

  • Dict
  • Either
  • File
  • Directory

This PR primarily serves as a placeholder for changes required to support nipype. It may turn out that some of these changes are orthogonal to IPython's view of traitlets (for example, support for Undefined as a valid value for any trait).

@minrk
Copy link
Member

minrk commented Jan 2, 2014

I see you added BaseStr and Str - these were actually removed from the IPython-shipped traitlets because they were ambiguous, and no traits should actually be allowed to be ambiguously bytes or unicode.

@satra
Copy link
Author

satra commented Jan 3, 2014

@minrk - pushed a quick fix and derived basestr from unicode

@minrk
Copy link
Member

minrk commented Jan 3, 2014

Are you only using BaseStr and Str internally in this file, or do you use them directly elsewhere? Everywhere they are used in this PR should actually be Unicode instead, not BaseStr or Str.

@satra
Copy link
Author

satra commented Jan 3, 2014

BaseStr only here, but Str is used elsewhere - once i've cleaned up the rest, i'll clean it up here.

@minrk
Copy link
Member

minrk commented Jan 3, 2014

The issue being that Str is actually ambiguous about what its data contains (part of the the reason Python 3 changed 'str' to mean 'text' instead of 'bytes'). The Str traitlet adds extra ambiguity on top of that, because, as implemented here, it can be either str or unicode type.

@Carreau
Copy link
Member

Carreau commented Jan 3, 2014

Note aso that ipython/ipython#4659 is not ready yet, and I'm not sure we should push traitlets too much forward while this PR is not in master.

@Carreau Carreau mentioned this pull request Jan 3, 2014
@satra
Copy link
Author

satra commented Jul 20, 2014

@minrk and @Carreau - i'm likely to spend a bit of time in the next few weeks to clean this up. any suggestions in relation to ipython plans?

@minrk
Copy link
Member

minrk commented Jul 20, 2014

There have been a lot of changes upstream in IPython, due to the Widget architecture making Traitelts a significant public API. That's going to be the trickiest part of this.

@Carreau
Copy link
Member

Carreau commented Jul 20, 2014

I would suggest waiting for 3.0 and then restart this package from scatch.

@minrk minrk force-pushed the master branch 5 times, most recently from d163288 to bfa557f Compare April 8, 2015 23:33
@minrk minrk closed this Apr 17, 2015
takluyver added a commit that referenced this pull request Apr 20, 2015
Set calling program to UNKNOWN, when argv not in sys (take #2)
@minrk minrk modified the milestone: no action Nov 9, 2015
azjps added a commit to azjps/traitlets that referenced this pull request Dec 16, 2022
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.

3 participants