Skip to content

requests v2.11 has a syntax error in python3.2 #3479

Closed

Description

@huseyinyilmaz

First of all thanks for the awesome library. I am really enjoying using requests. This is my favorite library.

In the last version of requests, I started to get an error on my own library and it turned out it was because of my requests dependency.

In python3.2, requests v2.11 gives following error:

  File "/home/travis/build/huseyinyilmaz/placebo/requests/__init__.py", line 64, in <module>
    from .models import Request, Response, PreparedRequest
  File "/home/travis/build/huseyinyilmaz/placebo/requests/models.py", line 856
    http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
                                                      ^
SyntaxError: invalid syntax

Here is the fix
https://github.com/kennethreitz/requests/pull/3478

Again sorry about the crappy way of testing. I could not install python3.2 on my local machine so I could not test it with requests tests.

Activity

  1. nateprewitt commented on Aug 8, 2016

    @nateprewitt
    Member

    Hey @huseyinyilmaz, I think this may have been discussed in #3385 (particularly here). Removing the u designation on the string would revert the unicode support added in #3385.

  2. sigmavirus24 commented on Aug 8, 2016

    @sigmavirus24
    Contributor

    Ah, I see @nateprewitt already chimed in over here.

  3. huseyinyilmaz commented on Aug 8, 2016

    @huseyinyilmaz
    Author

    I see. So, python3.2 is not supported by requests library. Than I will just close the issue and pr.

    Thanks for the link @nateprewitt .

  4. huseyinyilmaz commented on Aug 9, 2016

    @huseyinyilmaz
    Author

    Hey,
    I just wanted to give some extra feedback. I got this error because when I installed requests with following command:

    pip install requests
    

    It installed an unstable version in python 3.2.
    Is it possible to not to release unsupported versions in pypi. So python3.2 would not get any updates but it would always load supported version but old version.

  5. Lukasa commented on Aug 9, 2016

    @Lukasa
    Member

    @huseyinyilmaz That is not possible, I'm afraid: you'd need to ask @dstufft to provide tools to do that. It's a nice idea, certainly, although it requires much more formalisation of the trove classifiers system that currently exists.

  6. sigmavirus24 commented on Aug 9, 2016

    @sigmavirus24
    Contributor

    @huseyinyilmaz I think you're going to have a bad time as more and more projects find it unreasonable to support Python 3.2. There are very few users on that version and it does not even receive security updates.

  7. dstufft commented on Aug 9, 2016

    @dstufft
    Contributor

    There are updates being made to PEP 503 that will make it possible. It'll take some time for setuptools/pip/etc to filter out that respects that.

  8. locked as resolved and limited conversation to collaborators on Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions