Issue #7 resolved

make support py3k

Atsushi Odagiri
created an issue

Comments (13)

  1. FGtatsuro

    Great!

    I've used it on Python3. Here is my environment.

    (PasteScript_3.4)$ python --version
    Python 3.4.2
    (PasteScript_3.4)$ pip freeze
    gnureadline==6.3.3
    ipython==3.1.0
    wheel==0.24.0
    (PasteScript_3.4)$ pip install PasteScript
    Downloading/unpacking PasteScript
      Downloading PasteScript-2.0-py3-none-any.whl (74kB): 74kB downloaded
    Downloading/unpacking six (from PasteScript)
      Downloading six-1.9.0-py2.py3-none-any.whl
    Downloading/unpacking Paste>=1.3 (from PasteScript)
      Downloading Paste-2.0.2-py34-none-any.whl (610kB): 610kB downloaded
    Downloading/unpacking PasteDeploy (from PasteScript)
      Downloading PasteDeploy-1.5.2-py2.py3-none-any.whl
    Installing collected packages: PasteScript, six, Paste, PasteDeploy
    Successfully installed PasteScript six Paste PasteDeploy
    Cleaning up...
    (PasteScript_3.4)$ pip freeze
    Paste==2.0.2
    PasteDeploy==1.5.2
    PasteScript==2.0
    gnureadline==6.3.3
    ipython==3.1.0
    six==1.9.0
    wheel==0.24.0
    

    And we had some errors as follows. (Maybe some pull requests resolve these errors. https://bitbucket.org/ianb/pastescript/pull-requests)

    paster --help

    (PasteScript_3.4)$ paster --help
    Usage: paster [paster_options] COMMAND [command_options]
    
    Options:
      --version         show program's version number and exit
      --plugin=PLUGINS  Add a plugin to the list of commands (plugins are Egg
                        specs; will also require() the Egg)
      -h, --help        Show this help message
    
    Cannot load command setup-app: No module named 'new'
    Cannot load command points: No module named 'six.moves.cStringIO'
    Cannot load command make-config: No module named 'new'
    Traceback (most recent call last):
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/bin/paster", line 11, in <module>
        sys.exit(run())
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 102, in run
        invoke(command, command_name, options, args[1:])
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 141, in invoke
        exit_code = runner.run(args)
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 236, in run
        result = self.command()
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/help.py", line 18, in command
        self.generic_help()
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/help.py", line 49, in generic_help
        commands_grouped.sort()
    AttributeError: 'dict_items' object has no attribute 'sort'
    

    paster create --list-template

    (PasteScript_3.4)$ paster create --list-template
    Traceback (most recent call last):
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/bin/paster", line 11, in <module>
        sys.exit(run())
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 102, in run
        invoke(command, command_name, options, args[1:])
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 141, in invoke
        exit_code = runner.run(args)
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 236, in run
        result = self.command()
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/create_distro.py", line 70, in command
        return self.list_templates()
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/create_distro.py", line 308, in list_templates
        templates.sort(lambda a, b: cmp(a.name, b.name))
    TypeError: must use keyword argument for key function
    

    paster create --template=basic_package test

    (PasteScript_3.4)$ paster create --template=basic_package test
    Selected and implied templates:
      PasteScript#basic_package  A basic setuptools-enabled package
    
    Variables:
      egg:      test
      package:  test
      project:  test
    Traceback (most recent call last):
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/bin/paster", line 11, in <module>
        sys.exit(run())
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 102, in run
        invoke(command, command_name, options, args[1:])
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 141, in invoke
        exit_code = runner.run(args)
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 236, in run
        result = self.command()
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/create_distro.py", line 126, in command
        vars = template.check_vars(vars, self)
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/templates.py", line 75, in check_vars
        response = cmd.challenge(prompt, var.default, var.should_echo)
      File "/Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/lib/python3.4/site-packages/paste/script/command.py", line 316, in challenge
        prompt_method = raw_input
    NameError: name 'raw_input' is not defined
    
  2. FGtatsuro

    Thank you for your work! I've tried new version. Looks good! :)

    (PasteScript_3.4)~ » pip freeze
    Paste==2.0.2
    PasteDeploy==1.5.2
    PasteScript==2.0.1
    gnureadline==6.3.3
    ipython==3.1.0
    six==1.9.0
    wheel==0.24.0
    (PasteScript_3.4)~ » paster --help
    Usage: paster [paster_options] COMMAND [command_options]
    
    Options:
      --version         show program's version number and exit
      --plugin=PLUGINS  Add a plugin to the list of commands (plugins are Egg
                        specs; will also require() the Egg)
      -h, --help        Show this help message
    
    Commands:
      create       Create the file layout for a Python distribution
      help         Display help
      make-config  Install a package and create a fresh config file/directory
      points       Show information about entry points
      post         Run a request for the described application
      request      Run a request for the described application
      serve        Serve the described application
      setup-app    Setup an application, given a config file
    
    (PasteScript_3.4)~ » paster create --list-template
    Available templates:
      basic_package:  A basic setuptools-enabled package
      paste_deploy:   A web application deployed through paste.deploy
    (PasteScript_3.4)~ » paster create --template=basic_package test
    Selected and implied templates:
      PasteScript#basic_package  A basic setuptools-enabled package
    
    Variables:
      egg:      test
      package:  test
      project:  test
    Enter version (Version (like 0.1)) ['']:
    Enter description (One-line description of the package) ['']:
    Enter long_description (Multi-line description (in reST)) ['']:
    Enter keywords (Space-separated keywords/tags) ['']:
    Enter author (Author name) ['']:
    Enter author_email (Author email) ['']:
    Enter url (URL of homepage) ['']:
    Enter license_name (License name) ['']:
    Enter zip_safe (True/False: if the package can be distributed as a .zip file) [False]:
    Creating template basic_package
    Creating directory ./test
      Recursing into +package+
        Creating ./test/test/
        Copying __init__.py to ./test/test/__init__.py
        Recursing into __pycache__
          Creating ./test/test/__pycache__/
      Copying setup.cfg to ./test/setup.cfg
      Copying setup.py_tmpl to ./test/setup.py
    Running /Users/FGtatsuro/.homesick/repos/dotfiles/home/.virtualenvs/PasteScript_3.4/bin/python3.4 setup.py egg_info
    (PasteScript_3.4)~ » ls -R test
    setup.cfg     setup.py      test          test.egg-info
    
    test/test:
    __init__.py __pycache__
    
    test/test/__pycache__:
    
    test/test.egg-info:
    PKG-INFO             SOURCES.txt          dependency_links.txt entry_points.txt     not-zip-safe         top_level.txt
    
  3. Log in to comment