profile
viewpoint
Pradyun Gedam pradyunsg Earth 616 (for now) https://pradyunsg.me Student, @pypa member, @psf fellow, @toml-lang core, past intern at @bloomberg and @enthought.

djui/alias-tips 427

An oh-my-zsh plugin to help remembering those aliases you defined once

getify/JSON.minify 351

Simple minifier for JSON to remove comments and whitespace

pradyun/Py2C 195

Py2C — a Python to C++ converter

pradyun/Sublime-Rainbow-Theme 7

Adaptive themes for Sublime Text

pradyun/PyTML 3

A Pythonic language that compiles into HTML (Don't even think of using)

pradyun/Sublime-Rainbow-ColorScheme 2

A bright color scheme for Sublime Text 2 and 3.

pradyun/kaptan 1

configuration manager in your pocket.

not-deployed/not-deployed.github.io 0

Because, sometimes, you need a page up without any work.

pradyun/alias-tips 0

An oh-my-zsh plugin to help remembering those aliases you defined once

issue commentpypa/warehouse

Geolocate user IP addresses when presenting them in UI

And yes, I'm assuming we wouldn't be allowed to redistribute it.

https://db-ip.com/db/download/ip-to-country-lite is under https://creativecommons.org/licenses/by/4.0/, which does allow redistribution.

That's not the case for Geolite's dB though -- they changed licensing last year for California Consumer Privacy Act (CCPA): https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

di

comment created time in 5 hours

issue openedtimburgan/timburgan

chess|move|g2h1|111

Just push 'Submit new issue'. You don't need to do anything else.

created time in 6 hours

Pull request review commentpypa/pip

Deprecate setup.py install fallback when wheel package is absent

 def _should_build(      if not req.use_pep517 and not is_wheel_installed():         # we don't build legacy requirements if wheel is not installed-        logger.info(-            "Using legacy setup.py install for %s, "-            "since package 'wheel' is not installed.", req.name,+        deprecated(+            reason=(+                "Cannot build a wheel for {} which do not use PEP 517 "+                "since package 'wheel' is not installed. "+                "pip will fall back to legacy 'setup.py install' for this "+                "package.".format(req.name)+            ),+            replacement=(+                "to install the 'wheel' package or enable --use-pep517"+            ),+            gone_in="20.3",

We need 6 months before changing behaviors, according to the deprecation policy.

sbidoul

comment created time in 10 hours

issue commentpypa/setuptools

Ubuntu has its own fork of distutils

This was of course, in the direction of distros stopping patches like debian distutils patch, in favor of better metadata to indicate these details and behaviors originating from upstream (like pip's pypa/pip#7002) that remove the likelyhood of users getting PermissioError and things like that.

prometheanfire

comment created time in 10 hours

issue commenttoml-lang/toml

Doubt: Spaces within the table key

I was gonna transfer the issue over, but I guess this is also fine?

eksortso

comment created time in 10 hours

issue commenttoml-lang/toml.io

Doubt: Space within the table key

@cannikin we should add an issue template and add this information into the README.

Basically, a better phrasing of "please file issues and questions related to the TOML specification at [link]. This repository/issue tracker is only for the toml.io website and not for the language specification."

ju-sh

comment created time in 10 hours

issue commentpypa/setuptools

Ubuntu has its own fork of distutils

Oh, and for pip, adding an INSTALLER file that didn't contain "pip" was a cleaner patch than manipulating the code to disable the version check.

We needed these details to be documented in some form, and IIRC, one of the Linux distro folks (or me?) did volunteer to file a PR but I don't think that ever happened.

prometheanfire

comment created time in 10 hours

issue commentpypa/setuptools

Ubuntu has its own fork of distutils

Unfortunately, so much time has passed that I haven't retained any actionable points from our discussion.

If I remember correctly...

The conclusion was that Debian and other Linux distros should stop shipping RECORD in dist-info folders for packages that they want to be managing (which renders pip unable to uninstall them, and thus won't try uninstalling them). This was a quick-fix-that-works-now and would have a suboptimal error message at the start which could be changed a bit in future releases and the change would be backported by the distros.

Another, longer-term approach for presenting a better error message would be to have some agreement on how to indicate a package as "externally managed" in the metadata. I'd initially proposed just using INSTALLER, but folks did flag that "externally managed" is different piece of metadata than "end user installer" (pip/pipenv/dpkg are valid INSTALLER values, but only 1 is externally managed, and pip shouldn't be keeping an allowlist of any kind) and that we just need to augment the information - either yet-another file or changing the contents of installer.

I do remember that someone from the Debian team did start working on a patch to update all the Debian packages to remove RECORD files at the Sprints, but idk if this ever rolled out. Some folks (not me!) did volunteer to start a discussion / PEP for the "externally managed" meradata. I don't think I ever saw a PEP draft for this, but I could be wrong.

prometheanfire

comment created time in 10 hours

issue commentsquidfunk/mkdocs-material

Missing LICENSE files for `.icons`, in source distributions on PyPI

Consider adding check-manifest to the CI linters list, to catch potential issues like this. :)

pradyunsg

comment created time in a day

pull request commenttoml-lang/toml

Add invalid float examples

Thanks @marzer for the PR, and thanks all for an interesting discussion. :)

marzer

comment created time in a day

push eventtoml-lang/toml

Mark Gillard

commit sha 6c72d6f06123351bd4aed22e6c7d4811b9f74c33

Adding invalid float examples (#760)

view details

push time in a day

PR merged toml-lang/toml

Add invalid float examples

Clarifies 'floats' section to explicitly demonstrate that omission of integer or fractional+exponent parts isn't legal (closes #759).

+9 -0

12 comments

1 changed file

marzer

pr closed time in a day

issue closedtoml-lang/toml

Should floats allow omission of integer or fractional/exponent?

I recently did a conformance pass over toml++ to ensure it passed any remaining test cases from both BurntSushi's and iarna's test suites, and was surprised to find that I wasn't passing some of the floating-point tests. Specifically, I was accepting some inputs that would be valid as literals in C and C++, but are apparently not in TOML. Excerpt from my test suite before I updated it:

// omitting leading integer part
parse_expected_value(FILE_LINE_ARGS, "     .1 "sv,       .1 );
parse_expected_value(FILE_LINE_ARGS, "    +.1 "sv,      +.1 );
parse_expected_value(FILE_LINE_ARGS, "    -.1 "sv,      -.1 );
parse_expected_value(FILE_LINE_ARGS, "   .1e1 "sv,     .1e1 );
parse_expected_value(FILE_LINE_ARGS, "  .1e+1 "sv,    .1e+1 );
parse_expected_value(FILE_LINE_ARGS, "  .1e-1 "sv,    .1e-1 );
parse_expected_value(FILE_LINE_ARGS, "  +.1e1 "sv,    +.1e1 );
parse_expected_value(FILE_LINE_ARGS, " +.1e+1 "sv,   +.1e+1 );
parse_expected_value(FILE_LINE_ARGS, " +.1e-1 "sv,   +.1e-1 );
parse_expected_value(FILE_LINE_ARGS, "  -.1e1 "sv,    -.1e1 );
parse_expected_value(FILE_LINE_ARGS, " -.1e+1 "sv,   -.1e+1 );
parse_expected_value(FILE_LINE_ARGS, " -.1e-1 "sv,   -.1e-1 );

// omitting trailing fractional part
parse_expected_value(FILE_LINE_ARGS, "     1. "sv,       1. );
parse_expected_value(FILE_LINE_ARGS, "    +1. "sv,      +1. );
parse_expected_value(FILE_LINE_ARGS, "    -1. "sv,      -1. );
parse_expected_value(FILE_LINE_ARGS, "   1.e1 "sv,     1.e1 );
parse_expected_value(FILE_LINE_ARGS, "  1.e+1 "sv,    1.e+1 );
parse_expected_value(FILE_LINE_ARGS, "  1.e-1 "sv,    1.e-1 );
parse_expected_value(FILE_LINE_ARGS, "  +1.e1 "sv,    +1.e1 );
parse_expected_value(FILE_LINE_ARGS, " +1.e+1 "sv,   +1.e+1 );
parse_expected_value(FILE_LINE_ARGS, " +1.e-1 "sv,   +1.e-1 );
parse_expected_value(FILE_LINE_ARGS, "  -1.e1 "sv,    -1.e1 );
parse_expected_value(FILE_LINE_ARGS, " -1.e+1 "sv,   -1.e+1 );
parse_expected_value(FILE_LINE_ARGS, " -1.e-1 "sv,   -1.e-1 );

All of those representations are valid in C and C++ (and I assume other languages, too), but not legal in TOML.

Upon re-reading the TOML spec I realized that it is fairly clear that the integer part is always required (it's never subject to an 'or'), so my knee-jerk assumption that followed the same rules as C and C++ wasn't particularly clever. Despite that, prefixing or suffixing an integer with a '.' character is a common short-hand for expressing that the value is in fact a float of some sort, and until encountering these test case violations, my assumption was that it was allowed in TOML seemed like a fairly natural one.

I guess the question is: should these representations, or some subset of them, be legal? If the answer is ultimately 'No', I think it would be wise to add a few invalid examples to the spec doc to explicitly call them out.

closed time in a day

marzer

issue commentpypa/pip

Remove the pip search command

The plan is definitely to deprecate in 20.2.

dstufft

comment created time in a day

issue commentpypa/pip

The --target option clashes with other command line flags and config files

This is also covered by https://github.com/pypa/pip/pull/7828.

dstufft

comment created time in a day

Pull request review commenttoml-lang/toml

Adding invalid float examples

 An exponent part is an E (upper or lower case) followed by an integer part (which follows the same rules as decimal integer values but may include leading zeros). +Note that unlike other languages, TOML does not allow abbreviation of floats;+the decimal point, if used, must be surrounded by at least one digit on each side.
The decimal point, if used, must be surrounded by at least one digit on each side.
marzer

comment created time in 2 days

pull request commentpypa/pip

Basic skeleton to start pkg_resources migration

Travis, MacOS 3.8 and Ubuntu 3.8 failed.

[snip]
----------------------------- Captured stdout call -----------------------------
Script result: python -m pip install argparse>=1.4
  return code: 2
-- stderr: --------------------
    WARNING: Skipping argparse as it is not installed.
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/pytest-of-vsts/pytest-2/popen-gw0/pip0/pip/src/pip/_internal/cli/base_command.py", line 215, in _main
    status = self.run(options, args)
  File "/tmp/pytest-of-vsts/pytest-2/popen-gw0/pip0/pip/src/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/tmp/pytest-of-vsts/pytest-2/popen-gw0/pip0/pip/src/pip/_internal/commands/install.py", line 387, in run
    installed = install_given_reqs(
  File "/tmp/pytest-of-vsts/pytest-2/popen-gw0/pip0/pip/src/pip/_internal/req/__init__.py", line 96, in install_given_reqs
    uninstalled_pathset.commit()
AttributeError: 'NoneType' object has no attribute 'commit'

-- stdout: --------------------
Collecting argparse>=1.4
  Downloading argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Installing collected packages: argparse
  Attempting uninstall: argparse
[snip]
FAILED tests/functional/test_install.py::test_upgrade_argparse_shadowed - Ass...
=== 1 failed, 287 passed, 3 skipped, 4 xfailed, 3 warnings in 169.23 seconds ===

Doesn't look like a flaky test to me. ;)

uranusjr

comment created time in 2 days

issue openedsquidfunk/mkdocs-material

Missing LICENSE files for `.icons`, in source distributions on PyPI

<!-- ⚠️ WARNING

Half of all issues created do not contain enough information to help or are not appropriate for the issue tracker (i.e. one-line questions). If you think you found a bug, follow the steps outlined below closely. Any issue that does not meet these conditions may be closed unnoticed.

Why? Because the maintainers of this project are wasting a lot of time answering questions that are not directly related to this project.

Make sure that your request fulfills all of the following requirements. -->

I checked that...

  • [x] ... the documentation does not mention anything about my problem
  • [ ] ... the problem doesn't occur with the default MkDocs template
  • [x] ... the problem is not in any of my customizations (CSS, JS, template)
  • [x] ... there are no open or closed issues that are related to my problem

Description

<!-- Please provide a brief description of the bug --> The LICENSE files for the contents of the .icons directory are not included in the source distributions on PyPI.

Expected behavior

<!-- Please describe what you expected to happen -->

These would be included.

Actual behavior

<!-- Please describe what is actually happening --> They're not included. :)

Steps to reproduce the bug

<!-- Please provide the steps to repoduce the issue -->

  1. Download the source tarball from https://pypi.org/project/mkdocs-material/#files.
  2. Check the files in the tarball.
  3. Notice that there's only 1 LICENSE file (none in the .icons directory).
$ wget https://files.pythonhosted.org/packages/32/a9/93be906519987d53ee068e528a7fea8dde7c84b3a3869907da1fd7ef14fa/mkdocs-material-5.4.0.tar.gz
$ tar --list --file=mkdocs-material-5.4.0.tar.gz | grep LICENSE
mkdocs-material-5.4.0/LICENSE

Package versions

<!-- Please provide all package versions -->

  • Python: not relevant
  • MkDocs: not relevant
  • Material: 5.4.0 (and looks like all of 5.x series)

Project configuration

<!-- Please provide your mkdocs.yml to a REASONABLE amount of detail --> Not relevant.

System information

<!-- Please provide your operating system and browser version --> Not relevant.

created time in 2 days

issue commentpypa/pip

Pip maintainers: what do you want to know about pip's use?

Paul stated 4 of my questions already. >.<

Beyond what has already been mentioned, I think it'd be great to get answers to these:

  1. what do users think pip is/does? (something like a "tell me, in a sentence or two, what pip does" question in a survey) This is in the direction of understanding what the users' mental model is of "what pip does", and to understand what functionality they view as "main" in pip.

  2. which users use which functionality within pip? Epic 1 above is about who uses pip and Epic 3 is about what functionality pip provides -- I want to know the connections between the two. Related to Paul's point 5, but much broader.

  3. how/where do users look for information about pip / Python Packaging when (a) they want to accomplish task X and (b) when they get an error message? This is in the direction of better understanding where we should try to put information for the users -- descriptions in the CLI? Documentation? Web searches? StackOverflow? Mailing lists? somewhere else?

  4. Do users look that pip's documentation theme and perceive that as "official", since it looks like the CPython documentation? Would they prefer if we change it to something else (say https://squidfunk.github.io/mkdocs-material/getting-started/)? [note 1]

  5. what are the areas where pip's existing behavior is suboptimal, but users don't report it as an issue / communicate to maintainers about them anymore? eg: places where pip could present a better error message to reduce a complicated discovery step which they might've internalized by now, but newer users still hit and get confused by. eg: pip w/ packages that have compiled extensions without wheels.

  6. what issues/roadblocks/speedbreakers do beginners hit? If/how can we smooth these roadblocks? (this is a separate question, since I don't think any of pip's existing devs/contributors fall into beginner programmer) We might want to do this for other user personas/categories, but I feel like that'll get really big in scope very quickly. :)

[note 1]: This was the original reason we adopted the theme, but I personally really find the navigation capabilities of the theme and available elements/styling to be suboptimal. I really want us to switch over to something with better navigation, design, content elements, search etc for our documentation theme.

nlhkabu

comment created time in 2 days

push eventpradyunsg/talks

Pradyun Gedam

commit sha 73c1101412265b219efa09b8fdf54b28c2cd5406

Add a trial index.html file

view details

push time in 2 days

push eventpradyunsg/dotfiles

Pradyun Gedam

commit sha 626cf7224a9a71327c269d6a9c7a53e9f4e08935

Enable rbenv

view details

push time in 2 days

Pull request review commentpypa/pip

Deprecate requirements format "base=>1.0[extra]"

 def test_nonexistent_options_listed_in_order(script, data):     assert matches == ['nonexistent', 'nope']  +def test_install_deprecated_extra(script, data):+    """+    Warn about deprecated order of specifiers and extras.+    """+    simple = script.site_packages / 'simple'++    result = script.pip(+        'install', '--no-index', '--find-links=' + data.find_links,+        'requires_simple_extra>=0.1[extra]', expect_stderr=True,

Put this in a requirements.txt file and install from it.

We're hitting a bug in the test pipeline in Windows.

jku

comment created time in 2 days

issue commentpypa/virtualenv

The argument --clear is too greedy as of v20

@inno v20 was, as you noted, a major rewrite accompanied with a major version bump. As @gaborbernat noted, this behaviour change is intentional, and the major version bump denotes that there might be breaking changes in the release such as this one. AFAIK, virtualenv did not make any forward compatibility promises and, further, the 20.0 release for explicitly communicated and documented as a backwards incompatible release.

If you want virtualenv to behave differently, please elaborate on your use case of why you want to place non-virtualenv files into the virtualenv directory and why virtualenv should be supporting that use case.

inno

comment created time in 2 days

pull request commentpypa/pip

Add resolver docs

@McSinyx's analysis is correct, but the failing checks aren't a blocker for merging this PR. I can merge it once I'm on my PC (GitHub doesn't let me merge from a mobile device if any CI check fails).

nlhkabu

comment created time in 2 days

issue commentpypa/pip

Implement step 1 in resolver rollout process

@nlhkabu there's 2 PRs and 1 issue cross-linked to this issue. The PRs are adding an error message that could use a review (I merged them eagerly since it's easy enough to iterate in a follow up PR).

The issue is where I'd need inputs, specifically around what the exact message should be.

nlhkabu

comment created time in 2 days

push eventpypa/pip

Devesh Kumar Singh

commit sha e0d625ba93f291709b8f729c898827b43005c46f

Add type annotations for pip._internal.commands.configuration

view details

Devesh Kumar Singh

commit sha 61f344b0407fdce2bfce02864f062539c289c415

Add type annotations for pip._internal.commands.install

view details

Devesh Kumar Singh

commit sha 005cc1636cca943aef58baa44969afb180377923

Add news entry

view details

Devesh Kumar Singh

commit sha 21ca1620d10b8696259a3781a958b02d897faccb

Change target_temp_dir type to TempDirectory

view details

Devesh Kumar Singh

commit sha 87249b9850bb390750f5e8e349c7ab6ccc75e359

Assert target_temp_dir instead of if check

view details

Devesh Kumar Singh

commit sha fb057308981225f5fbca9fcbc9e3d6c8eb88c99b

Align write_output types with logger.info

view details

Pradyun Gedam

commit sha 04c861ec17fc0f7dd449da7cbfb7edba4d543746

Merge pull request #8365 from deveshks/add-mypy-types-commands Complete type annotations in "pip._internal.commands.{configuration,install}"

view details

push time in 2 days

PR merged pypa/pip

Complete type annotations in "pip._internal.commands.{configuration,install}"

Towards https://github.com/pypa/pip/issues/4748

Added type annotations to pip._internal.commands.configuration and pip._internal.commands.install

+41 -28

5 comments

4 changed files

deveshks

pr closed time in 2 days

pull request commentpypa/pip

Remove unused comes_from argument of parse_requirements

I think it was supposed to be the name of the specific requirements file that it is sourced from?

sbidoul

comment created time in 2 days

create barnchpradyunsg/talks

branch : master

created branch time in 3 days

created repositorypradyunsg/talks

Public Talks by Pradyun Gedam

created time in 3 days

issue commentpypa/pip

Updating the message when the user hits a conflict w/ installed packages

/cc @ei8fdb @nlhkabu for their inputs on the messages to present to the users in both these cases.

pradyunsg

comment created time in 3 days

Pull request review commenttoml-lang/toml

Adding invalid float examples

 Floats should be implemented as IEEE 754 binary64 values. A float consists of an integer part (which follows the same rules as decimal integer values) followed by a fractional part and/or an exponent part. If both a fractional part and exponent part are present, the fractional part must precede-the exponent part.+the exponent part. Omitting the integer part is invalid, as is omitting both

Let's move this sentence to be with the example, possibly rewording it.

This (to me) reads like this is related to how IEEE754 describes floats, which it isn't. Further, I think we should state this after we clarify what "fractional" and "exponent" parts mean, which is where the example sits currently. :)

Moving this there would also follow the style that most of the spec uses: this-will-work description+example, followed by this-will-not-work description+example.

marzer

comment created time in 3 days

PR closed toml-lang/compliance

Add command-line argument "version" in test-runner

Tests for multiple versions may be kept as subdirectories under the tests directory. This PR adds support to select a target version to test against by specifying the --version argument. The default value is the latest version.

This commit should be compatible with #3

+36 -14

2 comments

1 changed file

amanbh

pr closed time in 4 days

push eventpypa/pip

Stéphane Bidoul

commit sha caad983734de960b71825edea29f6cf54599b21c

Fix docstring typo

view details

Stéphane Bidoul

commit sha df79ae4233e38d93aa3aebd64e60c26574d115ad

Enable strict typing in req_file.py

view details

Pradyun Gedam

commit sha cf418d7290342129fb4b687d3566cf9cdc94a2ca

Merge pull request #8544 from sbidoul/req_file-typing-sbi

view details

push time in 4 days

PR merged pypa/pip

Enable strict typing in req_file.py trivial

Towards #4748

Plus a docstring typo.

(I came to doing this because I'm toying with requirements file parsing and wondering if req_file.py could be exposed as a standalone library, maintained by pip maintainers)

+6 -7

2 comments

1 changed file

sbidoul

pr closed time in 4 days

pull request commentpradyunsg/installer

Initial implementation

Note to self: need to allow for some mechanism to add "install-time metadata" like INSTALLER, REQUESTED, direct_url.json (PEP 610) and more in the future (like proposed HASH file) without hard-coding support for the specific files in the code. This would allow for addition of these files to be done transparently as the .dist-info directory's contents evolve.

pradyunsg

comment created time in 4 days

issue openedpypa/pip

Updating the message when the user hits a conflict w/ installed packages

Environment

  • pip version: master today.
  • Python version: all
  • OS: all

<!-- Feel free to add more information about your environment here -->

Description

We've decided to update the error message presented to the user when the final result set of packages that a user contains dependency conflicts.

Context: #8513, #7744 and a recent team meeting regarding the new resolver rollout.

Expected behavior <!-- A clear and concise description of what you expected to happen. --> The behavior has to be changed in two ways, each related to a different part of the resolver rollout plan:

  • The legacy resolver would present a message nudging users to realize that the upcoming new resolver might behave differently (see #8513)
  • The new resolver would present a message nudging users "hey, do you want the resolver to always be strict!? tell us!" (see https://github.com/pypa/pip/issues/7744#issuecomment-651411121)

How to Reproduce / Output

To get the current message, run:

$ pip install six==1.10.0
$ pip install cherrypy==11.0.0
Collecting cherrypy==11.0.0
  Downloading CherryPy-11.0.0-py2.py3-none-any.whl (435 kB)
     |████████████████████████████████| 435 kB 5.3 MB/s 
Requirement already satisfied: six in /Users/pradyunsg/.virtualenvs/tmp-7af976d02abc202/lib/python3.8/site-packages (from cherrypy==11.0.0) (1.10.0)
Collecting portend>=2.1.1
  Downloading portend-2.6-py2.py3-none-any.whl (5.1 kB)
Collecting cheroot>=5.2.0
  Downloading cheroot-8.3.0-py2.py3-none-any.whl (86 kB)
     |████████████████████████████████| 86 kB 5.9 MB/s 
Collecting tempora>=1.8
  Downloading tempora-3.0.0-py2.py3-none-any.whl (14 kB)
Collecting more-itertools>=2.6
  Using cached more_itertools-8.4.0-py3-none-any.whl (43 kB)
Collecting jaraco.functools
  Downloading jaraco.functools-3.0.1-py3-none-any.whl (6.7 kB)
Collecting pytz
  Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB)
ERROR: cheroot 8.3.0 has requirement six>=1.11.0, but you'll have six 1.10.0 which is incompatible.
Installing collected packages: more-itertools, jaraco.functools, pytz, tempora, portend, cheroot, cherrypy
Successfully installed cheroot-8.3.0 cherrypy-11.0.0 jaraco.functools-3.0.1 more-itertools-8.4.0 portend-2.6 pytz-2020.1 tempora-3.0.0

Note the line starting with "ERROR:".

created time in 4 days

issue commentpypa/twine

Are twine maintainers OK to have a `twine build` command?

https://discuss.python.org/t/building-distributions-and-drawing-the-platypus/2062/67?u=pradyunsg

I am no longer investing effort into this directly, and noting the latest developments in this space for completeness. It seems to me that some of the folks who were previously opposed to having an independent tool for this task, are now in favor of doing so.

pradyunsg

comment created time in 4 days

pull request commentpypa/pip

Enable strict typing in req_file.py

(I came to doing this because I'm toying with requirements file parsing and wondering if req_file.py could be exposed as a standalone library, maintained by pip maintainers)

Oh boi. I'm curious how you think this would work -- I'll try to avoid saying much without a concrete proposal for why and *how. :)

sbidoul

comment created time in 4 days

issue commentpypa/sampleproject

The unit test cannot be run separately

The tests can only be run after installing the package - this is a best practice, to ensure that the tests are being run against what would be installed for end users vs what's available in your local directory.

visuve

comment created time in 4 days

Pull request review commentpypa/pip

Use lazy wheel to obtain dep info for new resolver

 def __init__(             version=version,         ) +    def iter_dependencies(self):+        # type: () -> Iterable[Optional[Requirement]]+        dist = None  # type: Optional[Distribution]+        preparer, lazy_wheel = self._factory.preparer, self._factory.lazy_wheel+        remote_wheel = self._link.is_wheel and not self._link.is_file+        if lazy_wheel and remote_wheel and not preparer.require_hashes:+            assert self._name is not None+            logger.info('Collecting %s', self._ireq.req or self._ireq)+            # If RuntimeError is raised, fallback to self.dist.+            with indent_log(), suppress(RuntimeError):

I'd suggest raising a specific subclass and instead of suppressing it, to logger.debug when that happens.

McSinyx

comment created time in 4 days

pull request commentpypa/pip

Skip installing if the version matches locally

Whoops.

uranusjr

comment created time in 4 days

pull request commentpypa/pip

Rollout flags (--use-feature, --use-deprecated)

This is a flag that:

  • explicitly contains "unstable" in the name
  • is not exposed in any of the CLI help documentation
  • was explicitly communicated as for testing the in-development version of the resolver.

I don't think people are setting this in multi-user profiles, and that is not something common for testing unstable functionality. I don't think we need to handle this flag differently due to this edge case - these users are using an unstable feature, with additional complexity on top from other tooling. They are opting in for dealing with these complexities (either themselves or by someone else in control of their systems).

I'll note that this PR is the result of a long discussion on the rollout (see #8371), and is part of something that has been discussed at some length already. If you'd like to discuss this further, I suggest filing a new issue instead of making additional comments on this PR.

pradyunsg

comment created time in 4 days

Pull request review commentpypa/pip

Use lazy wheel to obtain dep info for new resolver

 def __init__(             version=version,         ) +    def iter_dependencies(self):+        # type: () -> Iterable[Optional[Requirement]]+        dist = None  # type: Optional[Distribution]+        preparer, lazy_wheel = self._factory.preparer, self._factory.lazy_wheel+        remote_wheel = self._link.is_wheel and not self._link.is_file+        if lazy_wheel and remote_wheel and not preparer.require_hashes:+            assert self._name is not None+            logger.info('Collecting %s', self._ireq.req or self._ireq)+            # If RuntimeError is raised, fallback to self.dist.+            with indent_log(), suppress(RuntimeError):

Why would a Runtime Error be raised here?

McSinyx

comment created time in 4 days

pull request commentpypa/pip

Rollout flags (--use-feature, --use-deprecated)

Is there a way to differentiate the way it is passed

If it's coming from anything other than the command line, pip config list should show you whether it's declared in a file or as an environment variable.

pradyunsg

comment created time in 4 days

pull request commentpypa/pip

Format code with Black

Awesome. I've gone ahead and filed a tracking issue for doing this and self-assigned it, since I'd like to take this up myself (after the 20.2 release).

@deveshks I think we're going to be updating the entire codebase in one big sweep commit, mostly since the changes are automated and, thus, much easier to audit (run black on the previous commit) so it's not necessary to break it up. And, we're going to be almost-equally disruptive regardless of how staggered we make the update, so doing it in one-big-sweep gives us a clean cut which is easier to communicate around. :)

hugovk

comment created time in 4 days

issue commentpypa/pip

Linting improvements (Aug 2020)

Self-assigned because I'd like to do this myself.

pradyunsg

comment created time in 4 days

issue openedpypa/pip

Linting improvements (Aug 2020)

Follow up to #7084

There's basically 2 broad tasks here:

  • Upgrade all of our linting tools to the latest versions (especially isort).
  • Adopt black for formatting code, enforcing a consistent code style.

This should be done after the pip 20.2 release has been made, to minimise any potential disruption to the release planning/process.

created time in 4 days

Pull request review commentpypa/pip

Byte-compile files after installation

 def is_entrypoint_wrapper(name):                 filter=filter,             ) +    def pyc_source_file_paths():+        # type: () -> Iterator[text_type]+        # We de-duplicate installation paths, since there can be overlap (e.g.+        # file in .data maps to same location as file in wheel root).+        # Sorting installation paths makes it easier to reproduce and debug+        # issues related to permissions on existing files.+        for installed_path in sorted(set(installed.values())):+            full_installed_path = os.path.join(lib_dir, installed_path)+            if not os.path.isfile(full_installed_path):+                continue+            if not full_installed_path.endswith('.py'):+                continue+            yield full_installed_path++    def pyc_output_path(path):+        # type: (text_type) -> text_type+        """Return the path the pyc file would have been written to.+        """+        if PY2:+            if sys.flags.optimize:+                return path + 'o'+            else:+                return path + 'c'+        else:+            return importlib.util.cache_from_source(path)++    # Compile all of the pyc files for the installed files+    if pycompile:+        with captured_stdout() as stdout:+            with warnings.catch_warnings():+                warnings.filterwarnings('ignore')+                for path in pyc_source_file_paths():+                    # Python 2's `compileall.compile_file` is compatible with+                    # unicode input, but the declared type doesn't indicate+                    # it.+                    path_arg = cast('str', path)+                    success = compileall.compile_file(

3 more months. Just 3 more.

chrahunt

comment created time in 4 days

pull request commentpypa/pip

Format code with Black

And, https://github.com/psf/black/pull/1132 makes black's handling of strings so much better.

@hugovk Would you be willing to take this forward still, or would it be OK if I pick this up?

I'd like us to close this PR and open a new one now, since the CI checks have been updated, and it'll be much nicer to have all the checks be up-to-date in a new PR rather than to have a mix of old and new checks in the PR view.

hugovk

comment created time in 4 days

pull request commentpypa/pip

Format code with Black

And, it's been released. :)

https://pypi.org/project/isort/5.0.2

hugovk

comment created time in 4 days

issue commentpypa/packaging.python.org

Document the license argument to setup.py

SPDX identifiers for Python package licensing is a work-in-progress proposal: https://discuss.python.org/t/improving-license-clarity-with-better-package-metadata/2154?u=pradyunsg. If you'd like to show your support for that effort, consider doing so on that thread/topic.

For this issue though, I think the actionable item is to amend https://github.com/pypa/packaging.python.org/pull/492/files#diff-4e95d0a5cf515ad0ea4ec6b129020f69R285-R286 to not nudge users to specify licenses like License :: OSI Approved :: MIT License in the license argument. :)

cjerdonek

comment created time in 4 days

pull request commentscopatz/fundable-packaging-improvements

Conda-press text

@scopatz You've filed this against your own repository. 👀

scopatz

comment created time in 4 days

pull request commentpypa/pep517

Pull out high-level interfaces as an extended example

Suggestion: move it into examples/*, to clearly denote that it's an example and make room for us to add additional things if there are any.

takluyver

comment created time in 4 days

push eventpradyunsg/dotfiles

Pradyun Gedam

commit sha fa6385c872bd953c469788923d157b9125c50678

Significantly improve 'manage check' - Add verbosity - Improve my personal checks.yaml file

view details

Pradyun Gedam

commit sha 0bcccc9f416b8765fb03d1448e6547a01d78af29

Allow passing version in mkpkg()

view details

push time in 4 days

push eventpradyunsg/dotfiles

Pradyun Gedam

commit sha e61cb3934d00dd10b54f4a179284f0c7d904c540

v: Fix the behaviors

view details

Pradyun Gedam

commit sha d22a7a021d67cd81313ca8d6b6448b370fdbecd7

git: better aliases - Move complex-ish aliases into dedicated scripts. - Drop the never-used add-remote-* aliases.

view details

push time in 4 days

push eventpradyunsg/pip

Pradyun Gedam

commit sha cd95531951895d0b5926cc223c40190d0fe8a996

Add --use-feature and --deprecated-feature flags

view details

Pradyun Gedam

commit sha 79de2c8911eee4b4c7a8ec984647c8771078a3b0

Switch to --use-feature for determining which resolver to use Also changes all invocations in the tests, to the new flag.

view details

Pradyun Gedam

commit sha 26e29aa70e603db8162115df14f4ef9258265a8e

Disallow --unstable-feature, pointing to --use-feature instead

view details

Pradyun Gedam

commit sha a8eaf11d7fba59d7909bad9fe962fbdf8d4adfbe

Use the correct flag name Co-authored-by: Stéphane Bidoul <stephane.bidoul@acsone.eu>

view details

Pradyun Gedam

commit sha 49b793cd037d4c1d708883cb4ccde85be35951f0

Set correct envvar for new-resolver tests

view details

Chris Hunt

commit sha 94421cfb1add27c0ccaac13fe43246dcd7136315

Extract console script spec calculation from install_wheel This big chunk of code was independent of the rest of our wheel installation process. Moving it out enforces that there are no dependencies between it and the original function, and makes it easier to read the original function.

view details

Chris Hunt

commit sha 3fad029b7740c735a8de4b9321706458d0fad72f

Test `get_entrypoints` when none are expected

view details

Christopher Hunt

commit sha dd38d81a6e48fab6edbc333d693e86e729dc689c

Merge pull request #8536 from chrahunt/add-no-entrypoint-test Test `wheel.get_entrypoints` when none are expected

view details

Chris Hunt

commit sha a953787152862c8a072f761b0b2d21eb4afd98e5

Extract entrypoint test text construction into variable We need this to construct the new argument to `get_entrypoints`.

view details

Chris Hunt

commit sha d49d97f19f50d7520284dc606f75516c7a63d63e

Pass Wheel distribution to install.wheel.get_entrypoints Right now we're just wiring up the arguments. Next we will actually use them.

view details

Chris Hunt

commit sha 479154b4ae03f5091a926736c669456099ab25c7

Get Wheel entrypoints from Distribution instead of file Since the Distribution pulls its data directly from the Wheel file, without extracting intermediate files to disk, this brings us closer to installing from Wheels without extracting everything.

view details

Chris Hunt

commit sha 3930e4b0630f941e17b3b10e57de6d886be903d5

Drop unused argument

view details

Chris Hunt

commit sha 043320013542642f69ae89facf562ca3ed659e14

Move dest_info_dir construction closer to first use Reducing the scope of variables makes it easier to refactor, since we can extract whole contiguous chunks of code later.

view details

Christopher Hunt

commit sha 231211a7ab92708182bf16b2c981b29b48b5e0a6

Merge pull request #8531 from chrahunt/simplify-get-entrypoints Get entrypoints directly from wheel during installation

view details

Chris Hunt

commit sha d441f9518b4c70ee75384dc5811679ace70b2805

Get wheel RECORD directly from wheel file This reduces our dependence on disk files, and removes some complexity around Python 2/3 compatibility with the csv module.

view details

Chris Hunt

commit sha d7b5a776b3df79cbe63673ec248a40f9871a68f4

Move record_path closer to first use

view details

Christopher Hunt

commit sha 196f5487f9d88715489b0c49ff44ae88822c8670

Merge pull request #8535 from chrahunt/refactor/extract-console-script-spec-source Extract console script spec calculation from install_unpacked_wheel

view details

Christopher Hunt

commit sha feb2a24f1412412d650e6fb2b68960414836bd55

Merge pull request #8537 from chrahunt/refactor/read-record-from-wheel Read RECORD from wheel file directly during install

view details

Pradyun Gedam

commit sha ace54858360a21cf3543a50dfbcfc52c89e143e1

Change reject_invalid_constraint_types to be reusable

view details

Pradyun Gedam

commit sha 20431888cbc39d8d719d5007e2097938876706e2

Move check_invalid_constraint_type to req_install.py

view details

push time in 5 days

delete branch pradyunsg/pip

delete branch : rollout-flags

delete time in 5 days

push eventpypa/pip

Pradyun Gedam

commit sha cd95531951895d0b5926cc223c40190d0fe8a996

Add --use-feature and --deprecated-feature flags

view details

Pradyun Gedam

commit sha 79de2c8911eee4b4c7a8ec984647c8771078a3b0

Switch to --use-feature for determining which resolver to use Also changes all invocations in the tests, to the new flag.

view details

Pradyun Gedam

commit sha 26e29aa70e603db8162115df14f4ef9258265a8e

Disallow --unstable-feature, pointing to --use-feature instead

view details

Pradyun Gedam

commit sha a8eaf11d7fba59d7909bad9fe962fbdf8d4adfbe

Use the correct flag name Co-authored-by: Stéphane Bidoul <stephane.bidoul@acsone.eu>

view details

Pradyun Gedam

commit sha 49b793cd037d4c1d708883cb4ccde85be35951f0

Set correct envvar for new-resolver tests

view details

Pradyun Gedam

commit sha 8db4fc8224c268777c766ea3f170bda12b5a156c

Merge pull request #8530 from pradyunsg/rollout-flags

view details

push time in 5 days

PR merged pypa/pip

Rollout flags (--use-feature, --use-deprecated) trivial type: enhancement type: maintenance

This implements the feature rollout approach we have concensus on (from #8371) and handles everything except the warnings for #8513.

AFAICT, there's gonna be 2 more follow up PRs to this:

  • Implementing the warnings mentioned in #8513.
  • Properly documenting how this would work with pip's deprecation policy.

Since we'd have a dedicated documentation PR, I suggest we skip the changelog entry for this PR.

+97 -65

2 comments

8 changed files

pradyunsg

pr closed time in 5 days

pull request commentpypa/pip

Rollout flags (--use-feature, --use-deprecated)

I'm gonna go ahead and merge this, since there's multiple green ticks, and the specific wording can be iterated upon in a follow up PR. :)

pradyunsg

comment created time in 5 days

delete branch pradyunsg/pip

delete branch : warn-on-unsupported-use-of-constraints

delete time in 5 days

push eventpypa/pip

Pradyun Gedam

commit sha ace54858360a21cf3543a50dfbcfc52c89e143e1

Change reject_invalid_constraint_types to be reusable

view details

Pradyun Gedam

commit sha 20431888cbc39d8d719d5007e2097938876706e2

Move check_invalid_constraint_type to req_install.py

view details

Pradyun Gedam

commit sha 6437bec2698a26939aa3d226f454983606be4537

Warn on to-be-removed forms of constraints

view details

Pradyun Gedam

commit sha 28592d4c31d3ddf0e2dfed23aea83a0dc002222e

Allow for the deprecation warning in tests

view details

Pradyun Gedam

commit sha 107ec292c2e3b504ca8202a44e4da5fdd2f27e25

Merge pull request #8539 from pradyunsg/warn-on-unsupported-use-of-constraints

view details

push time in 5 days

PR merged pypa/pip

Warn on unsupported use of constraints trivial type: deprecation

Toward #8513

+46 -33

1 comment

4 changed files

pradyunsg

pr closed time in 5 days

pull request commentpypa/pip

Warn on unsupported use of constraints

Gonna skip the NEWS fragment for this, since we'd be covering this in the proper release notes and an appropriate changelog entry can be added later.

All the ticks are green, so I'm gonna go ahead and merge this! ^>^

pradyunsg

comment created time in 5 days

issue commentpypa/setuptools

Ubuntu has its own fork of distutils

Also relevant: https://sources.debian.org/patches/python3.8/

Specifically: https://sources.debian.org/patches/python3.8/3.8.4%7Erc1-1/distutils-install-layout.diff/

prometheanfire

comment created time in 5 days

issue commentpypa/setuptools

Ubuntu has its own fork of distutils

Can I get some help from Debian and/or Ubuntu to apply these tweaks to distutils?

/cc @kitterma (one of the Debian Python folks)

prometheanfire

comment created time in 5 days

push eventpradyunsg/pip

Pradyun Gedam

commit sha 28592d4c31d3ddf0e2dfed23aea83a0dc002222e

Allow for the deprecation warning in tests

view details

push time in 5 days

PR opened pypa/pip

Warn on unsupported use of constraints

Toward #8513

+39 -33

0 comment

3 changed files

pr created time in 5 days

create barnchpradyunsg/pip

branch : warn-on-unsupported-use-of-constraints

created branch time in 5 days

Pull request review commentpypa/pip

Rollout flags (--use-feature, --use-deprecated)

 def test_new_resolver_can_install(script):         "0.1.0",     )     script.pip(-        "install", "--unstable-feature=resolver",+        "install", "--use-feature=2020-resolver",

#8430 would improve this significantly -- although I do hear what you're saying.

I'd liked to come up with something general, but time constraints didn't help. :)

pradyunsg

comment created time in 5 days

pull request commentpypa/pip

Rollout flags (--use-feature, --use-deprecated)

@ei8fdb @nlhkabu With this PR, if the user passes --unstable-feature=resolver they get the following error:

Screenshot 2020-07-03 at 6 37 47 PM

pradyunsg

comment created time in 5 days

push eventpradyunsg/pip

Nguyễn Gia Phong

commit sha dd3a3b5eb7c2319d77a0efa9a0b245883564f5b3

Parallelize network operations in pip list

view details

Chris Hunt

commit sha 09d75b8a58ed02e7506a72ef31025fd1767290bd

Remove encouraging comments These comments are relevant to this function, since it is long overdue for refactoring. This code isn't special in that regard, and we should feel free to consider any piece of code eligible to be broken up or put into a class. So we remove these comments in fairness to the rest of the code, and to remove a distraction during upcoming code reviews.

view details

Chris Hunt

commit sha 541ce8748a551832a537aa769413858d5fe494d6

Remove redundant entrypoint text normalization Currently we do processing in `get_entrypoints` so incoming text is more compatible with `pkg_resources`. It turns out that `pkg_resources` is already doing the same normalization, so we can omit it. This simplifies `get_entrypoints`, opening the way for us to pass it a plain string instead of a file path.

view details

Chris Hunt

commit sha d93b8b3e5340fa63d50efe4892d567b848f30774

Do not shadow outer variable in loop `source` is provided as an argument to this function. Shadowing it can lead to type errors if the intermediate types change.

view details

Chris Hunt

commit sha 01e0d8befbdd74e0be5dad2f90547947d7a97fd9

Get data directories directly from zip This reduces our dependence on the files being extracted to the filesystem. Compare the name extraction to the similar code in `utils.wheel.wheel_dist_info_dir`. We don't need to give `.data` directories the same strict treatment (yet) because it isn't inconvenient if there happen to be multiple of them in a single Wheel file.

view details

Chris Hunt

commit sha abed1d6d39bcfdf8ee9b1ffdc94607bb47826222

Set `data_dirs` closer to first use Reducing the scope of variables reduces possible dependencies between parts of this function, and will make it easier to extract this section into its own function.

view details

Chris Hunt

commit sha 8259528ed9573120e0110258f341f47f14df440a

Simplify and optimize getting zip subdirs Since we only care about the first path part, we can stop at 1 split. We do not need a list, so the unnecessary conversion has been dropped.

view details

Christopher Hunt

commit sha 8097de536407a53758b1a4a86b987c7a70972571

Merge pull request #8528 from chrahunt/simplify-get-entrypoints Remove redundant entrypoint text normalization

view details

Christopher Hunt

commit sha cba5f11057fe4c893c7f1b48fcfc346c0ac9ba23

Merge pull request #8524 from chrahunt/remove-always-applicable-comments Remove encouraging comments

view details

Christopher Hunt

commit sha e3ba8d9a49dca48b53872a8777c6988081dfec88

Merge pull request #8529 from chrahunt/optimize-wheel-subdir-getter Simplify and optimize getting zip subdirs

view details

Christopher Hunt

commit sha ea7ee7d8e0d8ea37744ad04ac85a1f5782bf7072

Merge pull request #8526 from chrahunt/reduce-dependence-on-files Reduce dependence on disk files during Wheel installation

view details

Chris Hunt

commit sha dcd5cadcfddca7e0554cad57018bda7641465f60

Expect a plain list in get_csv_rows_for_installed This makes get_csv_rows_for_installed simpler, because it is not modifying its arguments. We can also more easily refactor RECORD file reading since it is now decoupled from getting the installed RECORD file rows.

view details

Christopher Hunt

commit sha e2bcc56f71770656721906ff2413b1e1d40ef022

Merge pull request #8533 from chrahunt/read-record-separately Expect a plain list in get_csv_rows_for_installed

view details

Pradyun Gedam

commit sha 0acdbf89436581510206a4a1a612e37123eaafd6

Merge pull request #8504 from McSinyx/list-speed-up-nw Parallelize pip list --outdated and --uptodate

view details

push time in 6 days

push eventpypa/pip

Nguyễn Gia Phong

commit sha dd3a3b5eb7c2319d77a0efa9a0b245883564f5b3

Parallelize network operations in pip list

view details

Pradyun Gedam

commit sha 0acdbf89436581510206a4a1a612e37123eaafd6

Merge pull request #8504 from McSinyx/list-speed-up-nw Parallelize pip list --outdated and --uptodate

view details

push time in 6 days

PR merged pypa/pip

Parallelize pip list --outdated and --uptodate type: feature request

This reverses GH-8167 and parallelizes the networking operations done by pip list --outdated and pip list --uptodate. It would be lovely if this can make it before the next beta release (GH-8206).

I wonder if we should roll this out an an unstable feature or just keep it as-is. Currently sometimes Control C needs to be issued twice for the command to be terminated properly.

+3 -1

3 comments

2 changed files

McSinyx

pr closed time in 6 days

pull request commentpypa/pip

Expect a plain list in get_csv_rows_for_installed

@chrahunt have you seen pradyunsg/installer#1?

chrahunt

comment created time in 6 days

pull request commenttoml-lang/toml.io

Adds link to raw spec in markdown

Suggestion - let's have it before the heading on mobile, and off to the right on desktop?

cannikin

comment created time in 6 days

issue commentpython/steering-council

Temporarily ban and formerly reprimand for users that violated Brett's ceasefire request

@Ricyteach this issue's first post does not mention python-ideas, and is requesting action on the python-dev mailing list.

The final sentence in the first post is seems to be the rationale on why this request is for only python-dev.

tiran

comment created time in 6 days

push eventpradyunsg/pip

Pradyun Gedam

commit sha 49b793cd037d4c1d708883cb4ccde85be35951f0

Set correct envvar for new-resolver tests

view details

push time in 6 days

Pull request review commentpython/peps

Rephrase the PEP 623

 These macros and functions are marked as deprecated, using Python 3.10 ----------- -* Following macros, enum members will be marked as deprecated.-  ``Py_DEPRECATED(3.10)`` macro will be used as possible. But they-  will be deprecated only in comment and document if the macro can+* Following macros, enum members are marked as deprecated.+  ``Py_DEPRECATED(3.10)`` macro are used as possible. But they+  are eprecated only in comment and document if the macro can
  are deprecated only in comment and document if the macro can
vstinner

comment created time in 6 days

pull request commenttoml-lang/compliance

Add tests for v1.0.0-rc from iarna's repository

@iarna Would it be OK to have a single commit adding the tests from your repository, and to add a copyright line in the current license for you (instead of adding another license file to the repository)?

amanbh

comment created time in 6 days

issue commenttoml-lang/toml

TOML 1.0.0-rc2?

I'd like to add in #759 as well.

ChristianSi

comment created time in 6 days

issue commenttoml-lang/toml

Should floats allow omission of integer or fractional/exponent?

I guess the question is: should these representations, or some subset of them, be legal?

No. I think nearly all of the mentioned examples are equally (if not more) clear with a "0" in the appropriate location.

If the answer is ultimately 'No', I think it would be wise to add a few invalid examples to the spec doc to explicitly call them out.

Please do. :)

I'd suggest keeping it very limited though -- perhaps just a single sentence + code block w/ 2 examples (one for trailing, one for leading).

marzer

comment created time in 6 days

push eventpradyunsg/pip

Pradyun Gedam

commit sha a8eaf11d7fba59d7909bad9fe962fbdf8d4adfbe

Use the correct flag name Co-authored-by: Stéphane Bidoul <stephane.bidoul@acsone.eu>

view details

push time in 6 days

Pull request review commentpypa/pip

Rollout flags (--use-feature, --deprecated-feature)

 def check_list_path_option(options):     action='append',     default=[],     choices=['resolver'],-    help=SUPPRESS_HELP,  # TODO: Enable this when the resolver actually works.-    # help='Enable unstable feature(s) that may be backward incompatible.',+    help=SUPPRESS_HELP,  # TODO: drop this in pip 20.3+)  # type: Callable[..., Option]++use_new_feature = partial(+    Option,+    '--use-feature',+    dest='features_enabled',+    metavar='feature',+    action='append',+    default=[],+    choices=['2020-resolver'],+    help='Enable new functionality, that may be backward incompatible.',+)  # type: Callable[..., Option]++use_deprecated_feature = partial(+    Option,+    '--deprecated-feature',

The latter! Whoops!

pradyunsg

comment created time in 6 days

issue commentpypa/pip

I need to add tests for a few PRs I've made

This one is up for grabs, for any contributor who is familiar enough with pip's workflows to not need hand-holding around how to run the tests. Please go ahead and take a look at the PRs to understand what behavior needs to be tested. I'm happy to answer questions/help out with writing / figuring out these tests. :)

pradyunsg

comment created time in 6 days

issue commentpypa/pip

Implement step 1 in resolver rollout process

  • Add a warning on pip install X for users who are likely to experience problems with the new resolver

I'm going to break this out into a separate PR(s?).

@pfmoore @uranusjr Need a bit of help here... As far as I can tell, the main areas where the two resolvers' behavior will differ are:

  • when there's a conflict in the dependency graph
  • handling of constraints

Am I missing something, or are these the only "broad" areas where the behavior differs?

nlhkabu

comment created time in 6 days

issue commentpypa/pip

Implement step 1 in resolver rollout process

  • Allow users to turn on the new resolver with --use-feature=2020-resolver
  • Raise an error when a user uses --unstable-feature=resolver - pointing the users to use --use-feature=2020-resolver instead.

#8530 implements this.

  • Remove --unstable-feature=resolver

To me, this means stop handling (and accepting) that like any other command line option. In other words, it would look something like:

$ pip install --random-non-existent-option=whatever

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --random-non-existent-option

These seem a bit... contradictory to the last bullet's intent, so I've gone ahead and implemented specific handling for --unstable-feature, to print the helpful error message. It'll be easy enough to remove the less-than-25 lines of code to drop --unstable-feature in pip 20.3.

@nlhkabu @ei8fdb Lemme know if that sounds OK. :)

nlhkabu

comment created time in 6 days

PR opened pypa/pip

Rollout flags (--use-feature, --deprecated-feature) trivial type: enhancement type: maintenance

This implements the feature rollout approach we have concensus on (from #8371) and handles everything except the warnings for #8513.

AFAICT, there's gonna be 2 more follow up PRs to this:

  • Implementing the warnings mentioned in #8513.
  • Properly documenting how this would work with pip's deprecation policy.

Since we'd have a dedicated documentation PR, I suggest we skip the changelog entry for this PR.

+95 -63

0 comment

7 changed files

pr created time in 6 days

create barnchpradyunsg/pip

branch : rollout-flags

created branch time in 6 days

push eventpradyunsg/pip

Tzu-ping Chung

commit sha f81fd19a7bbfe742f1b6a05efd8694a2bd40be69

Ensure entry points are read as UTF-8 Like the wheel metadata, this is, strictly speaking, unspecified. But UTF-8 is the de-facto standard, and we should support that.

view details

Tzu-ping Chung

commit sha 216328ce102d43ba5ac9cfbc12396645db14e15c

News

view details

Tzu-ping Chung

commit sha dc82ac2e0c382dbd17b3b6898faf12a2d4174948

Fix typo in NEWS.rst

view details

Tzu-ping Chung

commit sha b0c1308d64878c26948bcde6cfc047b1fcd021c2

Always Unicode

view details

Jussi Kukkonen

commit sha dd42e7ec258f2a8b8006068a8663bc3f51cb0a87

test server: Don't mask invalid signals on py38 This removes warnings from test output in python 3.8: /usr/lib/python3.8/signal.py:60: RuntimeWarning: invalid signal number 32, please use valid_signals()

view details

Devesh Kumar Singh

commit sha 7a8f374c399b4bb1b8effb59e278d7dd9fee955a

Add option to list config files with pip config

view details

Devesh Kumar Singh

commit sha b9d19a64d7ee168abe8253578c1af6f50c0e07da

List values per configuration file

view details

Devesh Kumar Singh

commit sha 2fcad8ffa7d78b7cc06221112d385f765137e37c

Rename subcommand from list-files to debug

view details

Devesh Kumar Singh

commit sha f0f692e8e9808e2b61aa5369e80f4a7c4a72547e

Add env and env var values

view details

Devesh Kumar Singh

commit sha 6e62481568c3a833a7726cf0b300bac3486d40f8

Add unit tests for pip config debug

view details

Devesh Kumar Singh

commit sha 056f119ca91f5c57f210eee4386173fbd3dfebb1

Add test to verify global config file path

view details

Pradyun Gedam

commit sha e774eccf46f8465db707de108ea41a9cd9a41b66

Merge pull request #8343 from uranusjr/entrypoint-unicode

view details

Xavier Fernandez

commit sha 09f9b0030d0a3fe98cfe14e6fd9511100c3155e3

Merge pull request #8096 from deveshks/list-config-files Add option to list config files with pip config

view details

Jussi Kukkonen

commit sha 23ec070cf1ffa2449da276a78d6361de932c7792

test server: use set of signals This is what signal.pthread_sigmask() really wants and matches signal.valid_signals() output Co-authored-by: Christopher Hunt <chrahunt@gmail.com>

view details

Christopher Hunt

commit sha 4645ecbdb096373d6711406527b3b1fdc4fb785c

Merge pull request #8447 from jku/use-valid-signals-on-py38 test server: Don't mask invalid signals on py38

view details

Chris Hunt

commit sha 7c2fa59cd3de770e7b36c618e980e91f9f702729

Add early return in fix_script No behavior change, just making this function easier to refactor.

view details

Stéphane Bidoul

commit sha af3080f43ec56941285e6040eec829a59fb59d47

Merge pull request #8525 from chrahunt/trivial-early-return Add early return in fix_script

view details

push time in 6 days

pull request commentpypa/pip

Remove encouraging comments

🤷🏻‍♂️

I'd added these back when I was refactoring this code -- don't mind keeping it, don't mind removing it.

chrahunt

comment created time in 6 days

pull request commentpypa/pip

Remove redundant entrypoint text normalization

(I blame my patchy Internet connection)

chrahunt

comment created time in 6 days

issue commentpypa/warehouse

Geolocate user IP addresses when presenting them in UI

@di Is there some reason (perhaps legal) that we can't have the Geolite2 or db-ips actual databases in a dependency of warehouse, and not add them into this repository directly?

If we can do that, I feel like we should since we could have it be updated at some appropriate cadence and, more importantly, avoid making the git repository for this project bigger.

di

comment created time in 6 days

pull request commentpypa/pip

Freeze with hashes

If you will give me a green light (and guide) on this PR and on the PEP, I will create the tests (seems like it will take some time)

Sounds like a plan. I'll flag that the PEP would need to be written, discussed on discuss.python.org and accepted.

NoahGorny

comment created time in 7 days

Pull request review commentpypa/pip

Freeze with hashes

 def _generate_file(path, **kwargs):         installer_file.write(b'pip\n')     generated.append(installer_path) +    # Document source package hash+    hash_file_path = os.path.join(dest_info_dir, 'HASH')

This would need a PEP to standardize this metadata. (see https://www.python.org/dev/peps/pep-0610/ for an example of a similar PEP proposing to add a new file into the dist_info directory).

NoahGorny

comment created time in 7 days

issue commentpypa/pip

Fail legacy install if .egg-info directory was not created

The relevant bit of code:

https://github.com/pypa/pip/blob/0b23b772d5fc3a64e9ff77579135d70a22933c27/src/pip/_internal/operations/install/legacy.py#L109-L124

chrahunt

comment created time in 7 days

issue commentpypa/pip

Disallow explicitly passing install-location-related arguments in --install-options

The relevant bit of code: https://github.com/pypa/pip/blob/4645ecbdb096373d6711406527b3b1fdc4fb785c/src/pip/_internal/commands/install.py#L635-L649

chrahunt

comment created time in 7 days

pull request commentpypa/pip

feat(pip/_internal/*): Use custom raise_for_status method

@gutsytechster Thanks for the multiple updates on this PR!

Would you be willing to update it once more, so that we can go ahead and merge this? Or would you prefer that someone else takes this forward from here? I'd like to get this into pip 20.2 (due this month), but this is certainly not a blocker in any form.

gutsytechster

comment created time in 7 days

issue commentpypa/pip

Parallel downloads

I am beginner to open-source please help what technologies should I learn so that I can do this project?

@jsar3004 Hi! I suggest you get started by looking at other tasks, such as good first issues in pip and [other PyPA tooling](org:pypa label:"good first issue"). This is a significantly large task, with multiple moving parts -- it would not be possible to work on this without an initial ramp-up, gaining a better understanding of how pip works and what pip's development workflows are.

cool-RR

comment created time in 7 days

more