[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2014-03-13 Thread Éric Araujo

Éric Araujo added the comment:

distutils2 development has stopped.

--
resolution:  -> out of date
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-10-25 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-09 Thread Rik Poggi

Rik Poggi  added the comment:

Moving on, I've understood what the bug is about. I've made a couple of tests 
for this issue. I'm waiting for a review before adding others (if necessary).

The fix is not going to be easy, because I'm not sure about the Metadata design.

I think that what should be done is to make available the old version scheme 
check for metadata-version 1.0 and 1.1.

--
Added file: http://bugs.python.org/file25162/issue_tests.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-06 Thread Rik Poggi

Rik Poggi  added the comment:

My assumption that the "random" log message was related to this bug seems to be 
completely wrong. It seems, instead, related to a starstar call of create_dist 
in the support module that will loose the order (of an OrderedDict obviously). 
The behaviour is still strange because in order to reproduce it I had to re-run 
the test different. (test_star_star is the "random" failing one) Attaching the 
diff.

--
Added file: http://bugs.python.org/file25147/test_support.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-06 Thread Rik Poggi

Rik Poggi  added the comment:

Thanks, I'll wait! In the meanwhile I couldn't help to dig a little deeper and 
found that the Metadata class is currently logging a warning. Should the 
commands raise something when there's a warning in strict mode?

I was playing with the check command about this when I stumbled in an odd 
looking piece of code in metadata.py with a FIXME note: "# FIXME this rejects 
UNKNOWN, is that right?" (see attached file). I'm not sure how, but it seems 
related to a "random" (I couldn't find any pattern) log message that sometimes 
give: 

"'UNKNOWN': '0.4.5dev' is not a valid version (field 'Version')"

and others:

"'Name': '0.4.5dev' is not a valid version (field 'Version')"

(I had this with consecutive execution from a simple test that I wrote in 
test_command_check, with metadata['name'] == 'Name').

I hoped to not have wasted your time, but I thought that it could may be 
related to this bug since it seems that the version gets rightfully (but 
strangefully) warned as not valid from this "middle-layer" check point.

--
Added file: http://bugs.python.org/file25141/metadata_set_extract.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-05 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the tests!  I should have some time this week-end to review them and 
explain clearly what this bug is about and where tests should go.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-05 Thread Rik Poggi

Rik Poggi  added the comment:

Strictly related or not to this bug, a bit more test coverage shouldn't hurt.

So while waiting for a reply I started writing a couple of tests for 
pypi/dist.py, hope they look good.

--
Added file: http://bugs.python.org/file25134/test_pypi_dist.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-05 Thread Rik Poggi

Rik Poggi  added the comment:

Hi, I'd like to contribute to this bug if it's possible.

I would've directly started, but it seems the situation has moved/changed a 
bit, so I'm not sure where the tests are needed.

There's a try/except, like the one mentioned above, in pypi/dist.py. Was that a 
consequence of this bug? Are tests needed for that conversion?

The sdist command seems to be not complaining about any kind of 
irrational/invalid version. Should this be fixed? Should sdist check for a 
valid version number and do something like what Éric Araujo mentioned in the 
last comment?

--
nosy: +rik.poggi

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-12-01 Thread Éric Araujo

Éric Araujo  added the comment:

Hi Berker Peksag, thanks for your interest in contributing.  Your patch is not 
what I had in mind: In test_command_sdist, a test should create an sdist and 
check that it fails with an error message, not instantiate a version object.  
Distutils2 has many layers; at the base, version needs to reject an incorrect 
version with a Python exception (and we should test that in test_version), at 
the top, commands like check, sdist and bdist should catch that exception and 
display a user-friendly error message (and their tests should create Python 
files and run the command).  Does this help?

--
assignee: tarek -> eric.araujo
stage:  -> test needed
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-12-01 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berkerpeksag
Added file: http://bugs.python.org/file23828/issue11060_test_v1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-21 Thread SilentGhost

SilentGhost  added the comment:

Please, don't use tabs to indent your code. Also check the trailing spaces and 
tabs.

--
nosy: +SilentGhost

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

Nice test.  Remarks: you don’t need to instantiate MainProgram; the test would 
be better in test_version; you should test that “0.4.5dev” is rejected, as it’s 
what was initially reported.

Testing versions in mkcfg will be a bit more difficult; testing versions in 
sdist and bdist_dumb should be easy.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-20 Thread yeswanth

yeswanth  added the comment:

Added some test cases for it .

--
keywords: +patch
Added file: http://bugs.python.org/file21319/patch1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-20 Thread yeswanth

Changes by yeswanth :


Removed file: http://bugs.python.org/file21008/help.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-20 Thread Éric Araujo

Éric Araujo  added the comment:

data['version'] is not always present.  Can you find what part of the code 
fills it?

There is no default in the PEP, but a tool like mkcfg could suggest a useful 
value, say 0.1dev0.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-05 Thread yeswanth

yeswanth  added the comment:

is there any default version in pep 386?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-05 Thread yeswanth

yeswanth  added the comment:

I am trying for unit tests here , but would need some assistance. I included a 
file here , please review that. first of all i am not able to access 
self.data['version'](shows an exception , here). suggest me a solution here .

--
Added file: http://bugs.python.org/file21008/help.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth

Changes by yeswanth :


Added file: http://bugs.python.org/file20807/diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth

Changes by yeswanth :


Removed file: http://bugs.python.org/file20806/diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth

yeswanth  added the comment:

Sorry for the typo. I ran the code though and it worked fine. I guess might 
have patched a wrong file :( . Made the changes as you asked. Will try for the 
unit tests :)

--
Added file: http://bugs.python.org/file20806/diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth

Changes by yeswanth :


Removed file: http://bugs.python.org/file20804/diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread Éric Araujo

Éric Araujo  added the comment:

Not bad!  You need to test the script, at least manually, if possible with unit 
tests.  This typo slipped in:

+   self.data.get['version']=suggested_version
Remove “.get” (also add spaces around operators).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth

yeswanth  added the comment:

I guess this needs to be reviewed . Added support for checking version in 
mkcfg.py by making use of suggest_normalized_version .. (didnt not an error  
for non matching suggestion , though it will prompt for the version  it again )

--
Added file: http://bugs.python.org/file20804/diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-19 Thread Éric Araujo

Éric Araujo  added the comment:

You don’t need a new function (and certainly not in the __init__ submodule, the 
right place would be the version module), just do something like this:

try:
NormalizedVersion(text)
except IrrationalVersionError:
# version is invalid

Alternative: use suggest_normalized_version, which returns a string or None, 
then display according text to prompt the user to accept the suggested version 
or type another.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-19 Thread yeswanth

yeswanth  added the comment:

I have gone through the source of mkcfg.py and though of implementing version 
check by calling distutils2.is_valid_version() and then if it results false , 
call suggest_normalized_version() to ask the user if he would like the 
suggested version or enter a new version ...if it returns none, prompting the 
version again . For this i need to create a new function say "check_version()" 
and call it just after version is asked for in the query_user() function call.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-18 Thread Éric Araujo

Éric Araujo  added the comment:

I think Version should be strict, then Metadata could have an option for 
strictness (defaulting to true), so that mkcfg, sdist and other would strict 
mode but users could get more flexibility when needed.

--
nosy: +swamiyeswanth

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-04 Thread Éric Araujo

Éric Araujo  added the comment:

Strange, the regex comes straight from the PEP, which has had careful review.  
It must be somewhere else in the code.  Would you like to work on a patch, or a 
test first?  We have to find out if sdist is responsible, or metadata, or 
version, etc.

--
keywords: +easy
versions: +3rd party

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-01-29 Thread Godefroid Chapelle

New submission from Godefroid Chapelle :

sdist does not complain about 

version = 0.4.5dev

which is not PEP 386 compliant

--
assignee: tarek
components: Distutils2
messages: 127425
nosy: eric.araujo, gotcha, tarek
priority: normal
severity: normal
status: open
title: distutils2 sdist does not complain about version that is not PEP 386 
compliant

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com