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

Version 3.0 is marked as Python 2 compatible but throws syntax errors #38

Closed
adifelice-godaddy opened this issue Oct 17, 2022 · 11 comments

Comments

@adifelice-godaddy
Copy link

adifelice-godaddy commented Oct 17, 2022

Issue

Installing pyramid==1.9.1 on a Python 2.7 environment also installs PasteDeploy-3.0 which doesn't seem to be compatible with Python 2.7.

Error

Traceback (most recent call last):
  File "/Users/user/.virtualenvs/myproject/bin/pserve", line 8, in <module>
    sys.exit(main())
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 32, in main
    return command.run()
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 167, in run
    loader = self._get_config_loader(config_uri)
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/pyramid/scripts/common.py", line 23, in get_config_loader
    return plaster.get_loader(config_uri, protocols=['wsgi'])
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/plaster/loaders.py", line 116, in get_loader
    loader = loader_info.load(config_uri)
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/plaster/loaders.py", line 204, in load
    return self.factory(config_uri)
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/plaster/loaders.py", line 199, in factory
    self._factory = self.entry_point.load()
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/plaster_pastedeploy/__init__.py", line 7, in <module>
    from paste.deploy import loadapp, loadserver, loadfilter, appconfig
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/paste/deploy/__init__.py", line 3, in <module>
    from paste.deploy.loadwsgi import *  # noqa F401,F403
  File "/Users/user/.virtualenvs/myproject/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 82
    args[0] = f'Error in file {parser.filename}: {e}'

Observation

The setup.cfg definition is missing the python_requires instruction.

@mmerickel
Copy link
Member

Ok I forgot to release the package with python_requires metadata...

  1. I will release a bugfix with the correct metadata.
  2. I would like to pull 3.0 and release a new version with the correct metadata but I cannot atm.

@ianb maybe you could add me as an owner so I can manage the PyPI releases? Right now I cannot as only a maintainer role.

@mmerickel
Copy link
Member

In the short term I have released 3.0.1 with the correct metadata. That's all I can do unless I get owner on PyPI.

mergify bot pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 17, 2022
## Description
PasteDeploy, which is a dependency of pylons, released a new version 3.0 which includes an f-string and is therefore not Python 2 compatible (see relevant [issue](Pylons/pastedeploy#38)). This is unfortunately breaking our CI so we will pin PasteDeploy to <3.0 for our pylons tests for now.

I've pinned PasteDeploy in our pylons tests and framework tests, as well as pyramid tests (which indirectly rely on PasteDeploy as well).

## Checklist
- [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] Ensure tests are passing for affected code.
- [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.





## Motivation


## Design 


## Testing strategy




## Relevant issue(s)


## Testing strategy




## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.
mergify bot pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 18, 2022
## Description
PasteDeploy, which is a dependency of pylons, released a new version 3.0 which includes an f-string and is therefore not Python 2 compatible (see relevant [issue](Pylons/pastedeploy#38)). This is unfortunately breaking our CI so we will pin PasteDeploy to <3.0 for our pylons tests for now.

I've pinned PasteDeploy in our pylons tests and framework tests, as well as pyramid tests (which indirectly rely on PasteDeploy as well).

## Checklist
- [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] Ensure tests are passing for affected code.
- [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

## Motivation

## Design

## Testing strategy

## Relevant issue(s)

## Testing strategy

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit ca1240a)
mergify bot pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 18, 2022
## Description
PasteDeploy, which is a dependency of pylons, released a new version 3.0 which includes an f-string and is therefore not Python 2 compatible (see relevant [issue](Pylons/pastedeploy#38)). This is unfortunately breaking our CI so we will pin PasteDeploy to <3.0 for our pylons tests for now.

I've pinned PasteDeploy in our pylons tests and framework tests, as well as pyramid tests (which indirectly rely on PasteDeploy as well).

## Checklist
- [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] Ensure tests are passing for affected code.
- [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

## Motivation

## Design

## Testing strategy

## Relevant issue(s)

## Testing strategy

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit ca1240a)

# Conflicts:
#	.github/workflows/test_frameworks.yml
@arxitim
Copy link

arxitim commented Oct 19, 2022

It would be really helpful to change exactly version 3.0, because now Python versions that do not support f-string try to install an incompatible version of this package with them(

Most of our CI builds started crashing because they try to install that exact version, because it doesn't specify the minimum Python version

We have already fixed the builds, but maybe other projects have encountered this problem too

majorgreys pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 19, 2022
PasteDeploy, which is a dependency of pylons, released a new version 3.0 which includes an f-string and is therefore not Python 2 compatible (see relevant [issue](Pylons/pastedeploy#38)). This is unfortunately breaking our CI so we will pin PasteDeploy to <3.0 for our pylons tests for now.

I've pinned PasteDeploy in our pylons tests and framework tests, as well as pyramid tests (which indirectly rely on PasteDeploy as well).

- [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] Ensure tests are passing for affected code.
- [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.
Kyle-Verhoog pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 24, 2022
PasteDeploy, which is a dependency of pylons, released a new version 3.0 which includes an f-string and is therefore not Python 2 compatible (see relevant [issue](Pylons/pastedeploy#38)). This is unfortunately breaking our CI so we will pin PasteDeploy to <3.0 for our pylons tests for now.

I've pinned PasteDeploy in our pylons tests and framework tests, as well as pyramid tests (which indirectly rely on PasteDeploy as well).

- [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] Ensure tests are passing for affected code.
- [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

Co-authored-by: Yun Kim <35776586+Yun-Kim@users.noreply.github.com>
@UncleGoogle
Copy link

Similar situation here. But importing package on Python 3.6 seems work (or at least do not raise exceptions), despite in 3.0.0 release notes there is a dropped support for Python 3.6.

@jvanasco
Copy link

jvanasco commented Dec 5, 2022

@mmerickel maintainers are allowed to "yank" a release on PyPi. Doing that should fix all the CI issues people are having (unless someone hardcoded 3.0 to their package).

@mmerickel
Copy link
Member

How can I yank a release? Is there an API I have to hit? The PyPI website does not give maintainers access to any UI features.

Screenshot 2022-12-05 at 10 41 11

@jvanasco
Copy link

jvanasco commented Dec 5, 2022

Ugh. Let me check. Maintainers were supposed to have this ability since last year.

@jvanasco
Copy link

jvanasco commented Dec 5, 2022

FFS. It seems like PyPi has been using "maintainers" and "owners" interchangeably on this feature and it is owners only. I'm filing a ticket with them.

@mmerickel
Copy link
Member

Hey folks, a little late in the game but I did get ownership rights and I have yanked version 3.0 from PyPI.

@mmerickel
Copy link
Member

To be clear, 3.0.1 is fine and still available.

@jvanasco
Copy link

jvanasco commented Jan 4, 2023

Thank you so much, @mmerickel ! This has been holding back some CI systems for me!

FWIW, I did start a ticket with PyPi over the inability of maintainers to yank releases. See pypi/warehouse#12643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants