Re: [Distutils] .ini vs JSON vs YAML meta data format

2013-04-27 Thread Donald Stufft
Reminder that the JSON file format is a data exchange format and does not need to be the user facing format. We should use JSON because it's already in the Python stdlib (and has been since 2.6) and it does not have any of a numerous amount of issues. - Donald Stufft PGP: 0x6E3

Re: [Distutils] Environment marker expression types

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 6:13 PM, Daniel Holth wrote: > So who's going to check how much long strings in json really cost? I'm not sure how that's relevant, except for READMEs. Right now the long description is how you get a decent homepage for your project on PyPI; but there are no other use cas

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 1:45 PM, Daniel Holth wrote: > How do you feel about parenthesis? Without them, you have to express everything in DNF (disjunctive normal form), which usually means a lot of subexpression duplication when you want to express something like "(a or b) and (c or d)"; it woul

Re: [Distutils] .ini vs JSON vs YAML meta data format

2013-04-27 Thread Lele Gaifax
Vinay Sajip writes: >>This one is huge and requires example to be run to see the actual >>error. Is that a minimal example? I don't even have an idea fails >>there. > > > Obviously small files might work, but that's no help. I didn't have > the time to spend to make the example smaller. It is not

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 6:38 PM, Vinay Sajip wrote: >> I was not proposing that we support inequalities. They aren't so > >> problematic in themselves, as they are inviting various questions and >> issues such as why they don't do any sort of version parsing. > > I'm not sure that platform_versio

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Vinay Sajip
> I was not proposing that we support inequalities.  They aren't so > problematic in themselves, as they are inviting various questions and > issues such as why they don't do any sort of version parsing. I'm not sure that platform_version inequalities make sense to support, because the semantics

Re: [Distutils] .ini vs JSON vs YAML meta data format (Was: Simplify 426: Deprecate Author-email and Maintainer-email)

2013-04-27 Thread Vinay Sajip
>This one is huge and requires example to be run to see the actual error. Is >that a minimal example? I don't even have an idea fails there. Obviously small files might work, but that's no help. I didn't have the time to spend to make the example smaller. It is not *that* large, but it is

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Daniel Holth
So who's going to check how much long strings in json really cost? On Apr 27, 2013 6:11 PM, "PJ Eby" wrote: > On Sat, Apr 27, 2013 at 12:54 PM, Daniel Holth wrote: > > Do we really have to optimize the metadata for runtime parsing, or can > > we have a distlib-specific indexing operation trigger

Re: [Distutils] Environment marker expression types

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 12:54 PM, Daniel Holth wrote: > Do we really have to optimize the metadata for runtime parsing, or can > we have a distlib-specific indexing operation triggered by the > installer? As long as the same thing is done inside a zipped wheel, duplication of the data is ok by me

Re: [Distutils] .ini vs JSON vs YAML meta data format (Was: Simplify 426: Deprecate Author-email and Maintainer-email)

2013-04-27 Thread anatoly techtonik
On Sat, Apr 27, 2013 at 12:24 PM, Vinay Sajip wrote: > anatoly techtonik gmail.com> writes: > > Why reinvent own format when there is already YAML with indented > sections? > > Yes, I have to see examples to write in this format, but it is readable > and > > familiar across a broad range of produ

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 2:35 PM, Vinay Sajip wrote: > So IIUC, that just means that the variables we support in expressions are: > > * python_version, python_full_version, extra as in the PEP already. > * os_name instead of os.name. > * sys_platform instead of sys.platform > * platform_version ins

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Vinay Sajip
> From: Daniel Holth > Do we really have to optimize the metadata for runtime parsing, or can > we have a distlib-specific indexing operation triggered by the > installer? It seems a little early to say how that operation would work, since the metadata format is not finalised yet. You could reg

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Vinay Sajip
> My test suite actually contains checks like that in order to verify > and/or logic, i.e., a bunch of "'x'=='x' and > 'x'=='y'" type stuff, to > ensure that operator precedence is handled correctly, so I wouldn't > want to prohibit those in the spec. That's OK by me, I'm not too hung up on hav

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Daniel Holth
How do you feel about parenthesis? It's probably not that hard to prohibit chained comparisons. Do we need an abnf? What's wrong with eval? On Apr 27, 2013 1:42 PM, "PJ Eby" wrote: > On Sat, Apr 27, 2013 at 11:57 AM, Vinay Sajip > wrote: > > Daniel Holth gmail.com> writes: > > > >> Surely get

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 11:57 AM, Vinay Sajip wrote: > Daniel Holth gmail.com> writes: > >> Surely getting farther away from python by trying to prohibit useless >> makers just makes the implementation needlessly complex. > > I'm not quite sure what you mean by "useless" markers. For example, dis

Re: [Distutils] Environment marker expression types

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 11:17 AM, Nick Coghlan wrote: > It's not especially pretty, but it's better than having to use > os.listdir and rely on predefined file names. For entry points at least, having a predefined file name is the *entire point*: i.e. to allow the presence of entry points to be d

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Daniel Holth
Do we really have to optimize the metadata for runtime parsing, or can we have a distlib-specific indexing operation triggered by the installer? On Sat, Apr 27, 2013 at 12:15 PM, Vinay Sajip wrote: > Donald Stufft stufft.io> writes: > >> And here is where I wish JSON had a link type so that this

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Daniel Holth
It seems slow to check. Do we also check for python_version == 'squid' and throw an error because the version can't parse? I think adults should be able to write true and false in these silly ways. +1 on always using _ instead of.l . In makers though. On Apr 27, 2013 11:57 AM, "Vinay Sajip" wrote

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Vinay Sajip
Donald Stufft stufft.io> writes: > And here is where I wish JSON had a link type so that this data could > either be inlined, or a link to the externalized data could be included. While raw JSON does not include a link type, this needn't be a problem in practice. For example, distlib already con

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Vinay Sajip
PJ Eby telecommunity.com> writes: > not just the one of current interest. Beyond that, keeping the > description in a separate file will keep any loads that do happen fast > (how often is the long description currently needed by anything other > than PyPI?), and entry keeping entry points in sep

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Vinay Sajip
Daniel Holth gmail.com> writes: > Surely getting farther away from python by trying to prohibit useless > makers just makes the implementation needlessly complex. I'm not quite sure what you mean by "useless" markers. For example, distlib checks for e.g. "'2' == '2'" and e.g. "'os.name' == 'os.n

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Daniel Holth
Surely getting farther away from python by trying to prohibit useless makers just makes the implementation needlessly complex. On Apr 27, 2013 11:13 AM, "Nick Coghlan" wrote: > On Sun, Apr 28, 2013 at 12:47 AM, PJ Eby wrote: > > On Sat, Apr 27, 2013 at 5:46 AM, Vinay Sajip > wrote: > >> At the

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Nick Coghlan
On Sun, Apr 28, 2013 at 1:00 AM, Donald Stufft wrote: >> Keeping extensions (which will include entry points) in a separate >> file is another potentially useful idea. >> >> Cheers, >> Nick. > > And here is where I wish JSON had a link type so that this data could either > be inlined, or a link t

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Nick Coghlan
On Sun, Apr 28, 2013 at 12:47 AM, PJ Eby wrote: > On Sat, Apr 27, 2013 at 5:46 AM, Vinay Sajip wrote: >> At the moment, distlib >> allows expressions like "python_version >= '2.6'" or "python_version < '3.5'" >> which are also not mentioned in the PEP. I don't recall seeing any discussion >> arou

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Donald Stufft
On Apr 27, 2013, at 10:57 AM, Nick Coghlan wrote: > On Sat, Apr 27, 2013 at 6:43 AM, PJ Eby wrote: >> Actually, while I'm on that subject, I wonder what the parsing >> overhead is going to be for the JSON metadata? I guess as long as >> it's done in C, it'll probably be ok. I expect the main

Re: [Distutils] Environment marker expression types

2013-04-27 Thread Nick Coghlan
On Sat, Apr 27, 2013 at 6:43 AM, PJ Eby wrote: > Actually, while I'm on that subject, I wonder what the parsing > overhead is going to be for the JSON metadata? I guess as long as > it's done in C, it'll probably be ok. I expect the main runtime > performance issue for metadata will just be avoi

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread PJ Eby
On Sat, Apr 27, 2013 at 5:46 AM, Vinay Sajip wrote: > Sorry if I'm being dense, but can you confirm that what you mean by > "chaining" is something like "a < b <= c"? Yes. > Things can be tightened up once PEP 426 is finalised. Not if anybody's going to be using distlib between now and then, u

Re: [Distutils] .ini vs JSON vs YAML meta data format (Was: Simplify 426: Deprecate Author-email and Maintainer-email)

2013-04-27 Thread Donald Stufft
On Apr 27, 2013, at 5:24 AM, Vinay Sajip wrote: > anatoly techtonik gmail.com> writes: >> Why reinvent own format when there is already YAML with indented sections? >> Yes, I have to see examples to write in this format, but it is readable and >> familiar across a broad range of products. It is

Re: [Distutils] Are chained comparisons allowed in environment markers?

2013-04-27 Thread Vinay Sajip
PJ Eby telecommunity.com> writes: > I notice that distlib appears to support chaining of comparisons, but > the PEP does not. ISTM that there is no sane use case for chaining, > given the nature of comparisons that are allowed. (That is, if you > perform one equality or contains comparison betw

Re: [Distutils] .ini vs JSON vs YAML meta data format (Was: Simplify 426: Deprecate Author-email and Maintainer-email)

2013-04-27 Thread Vinay Sajip
anatoly techtonik gmail.com> writes: > Why reinvent own format when there is already YAML with indented sections? > Yes, I have to see examples to write in this format, but it is readable and > familiar across a broad range of products. It is better than JSON at least, > because it doesn't require