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

[BUG] Restore support for newlines in Summary #2895

Closed
1 task done
kiorky opened this issue Nov 18, 2021 · 2 comments
Closed
1 task done

[BUG] Restore support for newlines in Summary #2895

kiorky opened this issue Nov 18, 2021 · 2 comments

Comments

@kiorky
Copy link

kiorky commented Nov 18, 2021

setuptools version

>=59

Python version

3.8

OS

linux

Additional environment information

No response

Description

 File "/code/venv/lib/python3.8/site-packages/setuptools/dist.py", line 151, in single_line
   raise ValueError('Newlines are not allowed')

reopening of #2893 which does not address correctly the issue introduced by #1390.

Expected behavior

Warning or nothing, just escape silently \n for oneline metadata fields

Lot of already released eggs wont ever comply to this policy, but we need to install them at the version they are pinned in our builds for the sake of reproducibility.

How to Reproduce

pip install django-hijack==2.1.10

see #2893 (comment)

Output

  ERROR: Command errored out with exit status 1:
   command: venv/bugpip/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-10qe4uxx/django-hijack_c7b8d72ff0ad41998610fe76e5822048/setup.py'"'"'; __file__='"'"'/tmp/pip-install-10qe4uxx/django-hijack_c7b8d72ff0ad41998610fe76e5822048/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-awfzhldp
       cwd: /tmp/pip-install-10qe4uxx/django-hijack_c7b8d72ff0ad41998610fe76e5822048/
  Complete output (26 lines):
  running egg_info
  creating /tmp/pip-pip-egg-info-awfzhldp/django_hijack.egg-info
  writing /tmp/pip-pip-egg-info-awfzhldp/django_hijack.egg-info/PKG-INFO
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-10qe4uxx/django-hijack_c7b8d72ff0ad41998610fe76e5822048/setup.py", line 44, in <module>
      setup(name="django-hijack",
    File "venv/bugpip/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "venv/bugpip/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 292, in run
      writer(self, ep.name, os.path.join(self.egg_info, ep.name))
    File "venv/bugpip/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 656, in write_pkg_info
      metadata.write_pkg_info(cmd.egg_info)
    File "/usr/lib/python3.8/distutils/dist.py", line 1117, in write_pkg_info
      self.write_pkg_file(pkg_info)
    File "venv/bugpip/lib/python3.8/site-packages/setuptools/dist.py", line 167, in write_pkg_file
      write_field('Summary', single_line(self.get_description()))
    File "venv/bugpip/lib/python3.8/site-packages/setuptools/dist.py", line 151, in single_line
      raise ValueError('Newlines are not allowed')
  ValueError: Newlines are not allowed

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@kiorky kiorky added bug Needs Triage Issues that need to be evaluated for severity and status. labels Nov 18, 2021
@jaraco
Copy link
Member

jaraco commented Nov 18, 2021

Please do not file duplicate issues.

@jaraco jaraco closed this as completed Nov 18, 2021
@jaraco jaraco added duplicate and removed bug Needs Triage Issues that need to be evaluated for severity and status. labels Nov 18, 2021
Tobias-Fischer added a commit to Tobias-Fischer/catkin_pkg that referenced this issue Nov 18, 2021
…uptools

Currently many builds are broken with the newest setuptools
This is because of pypa/setuptools#2870
See e.g. pypa/setuptools#1390 pypa/setuptools#2895 pypa/setuptools#2893
@kiorky
Copy link
Author

kiorky commented Nov 18, 2021

So please do not close not fixed bug.

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

No branches or pull requests

2 participants