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

egg_info.get_svn_revision behavior change? #20

Closed
ghost opened this issue Jun 15, 2013 · 8 comments
Closed

egg_info.get_svn_revision behavior change? #20

ghost opened this issue Jun 15, 2013 · 8 comments

Comments

@ghost
Copy link

@ghost ghost commented Jun 15, 2013

Originally reported by: qwcode (Bitbucket: qwcode, GitHub: qwcode)


egg_info.get_svn_revision in the new setuptools appears to be pretty different than the last version in distribute. Was that intentional?

pip happens to have a number of tests that use a svn checkout of INITools that are failing under the new setuptools in python3

here's the trace from one.
(in this case, data is a string, which is the contents of the svn entries file)

#!bash
Test checking out from svn. ... Script result: pip install -e svn+file:///home/qwcode/p/pypa/pip/tests/tests_cache/INITools/trunk#egg=initools-dev
  return code: 1
-- stdout: --------------------
Obtaining initools from svn+file:///home/qwcode/p/pypa/pip/tests/tests_cache/INITools/trunk#egg=initools-dev
  Checking out file:///home/qwcode/p/pypa/pip/tests/tests_cache/INITools/trunk to /home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/src/initools
  Running setup.py egg_info for package initools
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/src/initools/setup.py", line 26, in <module>
        zip_safe=True,
      File "/usr/local/lib/python3.3/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/lib/python3.3/distutils/dist.py", line 917, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python3.3/distutils/dist.py", line 935, in run_command
        cmd_obj.ensure_finalized()
      File "/usr/local/lib/python3.3/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/lib/python3.3/site-packages/setuptools/command/egg_info.py", line 85, in finalize_options
        self.vtags = self.tags()
      File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/lib/python3.3/site-packages/setuptools/command/egg_info.py", line 192, in tags
        ):  version += '-r%s' % self.get_svn_revision()
      File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/lib/python3.3/site-packages/setuptools/command/egg_info.py", line 233, in get_svn_revision
        if data<8:
    TypeError: unorderable types: str() < int()
    Complete output from command python setup.py egg_info:
    running egg_info

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/src/initools/setup.py", line 26, in <module>

    zip_safe=True,

  File "/usr/local/lib/python3.3/distutils/core.py", line 148, in setup

    dist.run_commands()

  File "/usr/local/lib/python3.3/distutils/dist.py", line 917, in run_commands

    self.run_command(cmd)

  File "/usr/local/lib/python3.3/distutils/dist.py", line 935, in run_command

    cmd_obj.ensure_finalized()

  File "/usr/local/lib/python3.3/distutils/cmd.py", line 107, in ensure_finalized

    self.finalize_options()

  File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/lib/python3.3/site-packages/setuptools/command/egg_info.py", line 85, in finalize_options

    self.vtags = self.tags()

  File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/lib/python3.3/site-packages/setuptools/command/egg_info.py", line 192, in tags

    ):  version += '-r%s' % self.get_svn_revision()

  File "/home/qwcode/p/pypa/pip/tests/tests_cache/test_ws/.virtualenv/lib/python3.3/site-packages/setuptools/command/egg_info.py", line 233, in get_svn_revision

    if data<8:

TypeError: unorderable types: str() < int()

@ghost
Copy link
Author

@ghost ghost commented Jun 18, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


To some extent, this change was intentional. Every file was combed through during the merge. I don't remember specifically what the motivation was in selecting the setuptools implementation over the distribute version. I'll go back and revisit that decision and provide some options moving forward.

@ghost
Copy link
Author

@ghost ghost commented Jun 18, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


This issue is blocking pip testing, so I'm raising the priority.

@ghost
Copy link
Author

@ghost ghost commented Jun 18, 2013

Original comment by qwcode (Bitbucket: qwcode, GitHub: qwcode):


the one in setuptools would have never been tested in python3.
the "unorderable types" error doesn't occur in py2 in this case.
maybe setuptools-0.8 solves this issue due to the py2/py3 compatability changes?

@ghost
Copy link
Author

@ghost ghost commented Jun 18, 2013

Original comment by qwcode (Bitbucket: qwcode, GitHub: qwcode):


just checked. the "data<8" check is still there, so it would still fail.

@ghost
Copy link
Author

@ghost ghost commented Jun 18, 2013

Original comment by arfrever (Bitbucket: arfrever, GitHub: arfrever):


I would like to note that get_svn_revision() is incompatible with Subversion >=1.7.0. Subversion 1.7.0 was released on 2011-10-11.

@ghost
Copy link
Author

@ghost ghost commented Jun 19, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Looking back at the merge history and my e-mails, this change wasn't particularly discussed, and I believe I elected to use the setuptools implementation because it appeared to be less prescriptive about which versions it supports. I assumed it worked, but it appears this code goes back to d24edbebdbdf, which is part of 0.6c11, but which clearly isn't doing what it was intended to do.

@ghost
Copy link
Author

@ghost ghost commented Jun 19, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Reference parsed svn version variable instead of the whole of the data. Fixes #20

@ghost
Copy link
Author

@ghost ghost commented Jun 19, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Fix released as 0.7.4 and 0.8b2

@ghost ghost closed this Mar 29, 2016
jaraco pushed a commit that referenced this issue Apr 24, 2021
Convert blockquotes into literal blocks
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
0 participants