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

Fix bug with incorrectly defactorized dependencies #772


Copy link

@bartsanchez bartsanchez commented Mar 10, 2018

fixes #706

By performing dependencies replacement before applying factors,
since previously this function was being incorrectly called with
unrolled dependencies.

Thanks for contributing a pull request!

If you are contributing for the first time or provide a trivial fix don't worry too
much about the checklist - we will help you get started.

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation,breaking, doc, misc
    • if pr has no issue: consider creating one first or change it to the pr number after creating the pr
    • "sign" fragment with "by @"
    • please use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files - by @superuser."
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

By performing dependencies replacement before applying factors,
since previously this function was being incorrectly called with
unrolled dependencies.
Copy link

@codecov codecov bot commented Mar 10, 2018

Codecov Report

Merging #772 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #772      +/-   ##
+ Coverage   94.83%   94.84%   +<.01%     
  Files          11       11              
  Lines        2402     2406       +4     
+ Hits         2278     2282       +4     
  Misses        124      124
Impacted Files Coverage Δ
tox/ 97.76% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a9ea31...1fc5b93. Read the comment docs.

Copy link

@gaborbernat gaborbernat left a comment


@gaborbernat gaborbernat merged commit 765c977 into tox-dev:master Mar 13, 2018
4 checks passed
obestwalter added a commit that referenced this issue Jul 12, 2018

Quick and dirty for a patch release fixing a regression.

This (partially) reverts commit 765c977

* leave original test for fix as reproducer
* leave changed assertion in previous test that is now failing commented out
DmytroLitvinov added a commit to DmytroLitvinov/kuna that referenced this issue Aug 6, 2018

### Update [pip]( from **10.0.1** to **18.0**.

   ### 18.0


- Switch to a Calendar based versioning scheme.
- Formally document our deprecation process as a minimum of 6 months of deprecation
- Adopt and document NEWS fragment writing style.
- Switch to releasing a new, non bug fix version of pip every 3 months.

Deprecations and Removals

- Remove the legacy format from pip list. (3651, 3654)
- Dropped support for Python 3.3. (3796)
- Remove support for cleaning up egg fragment postfixes. (4174)
- Remove the shim for the old location. (5520)

  For the past 2 years, it&#39;s only been redirecting users to use the newer location.


- Introduce a new --prefer-binary flag, to prefer older wheels over newer source packages. (3785)
- Improve autocompletion function on file name completion after options
  which have ``&lt;file&gt;``, ``&lt;dir&gt;`` or ``&lt;path&gt;`` as metavar. (4842, 5125)
- Add support for installing PEP 518 build dependencies from source. (5229)
- Improve status message when upgrade is skipped due to only-if-needed strategy. (5319)

Bug Fixes

- Update pip&#39;s self-check logic to not use a virtualenv specific file and honor cache-dir. (3905)
- Remove compiled pyo files for wheel packages. (4471)
- Speed up printing of newly installed package versions. (5127)
- Restrict install time dependency warnings to directly-dependant packages. (5196, 5457)

  Warning about the entire package set has resulted in users getting confused as
  to why pip is printing these warnings.
- Improve handling of PEP 518 build requirements: support environment markers and extras. (5230, 5265)
- Remove username/password from log message when using index with basic auth. (5249)
- Remove trailing os.sep from PATH directories to avoid false negatives. (5293)
- Fix &quot;pip wheel pip&quot; being blocked by the &quot;don&#39;t use pip to modify itself&quot; check. (5311, 5312)
- Disable pip&#39;s version check (and upgrade message) when installed by a different package manager. (5346)

  This works better with Linux distributions where pip&#39;s upgrade message may
  result in users running pip in a manner that modifies files that should be
  managed by the OS&#39;s package manager.
- Check for file existence and unlink first when clobbering existing files during a wheel install. (5366)
- Improve error message to be more specific when no files are found as listed in as listed in PKG-INFO. (5381)
- Always read ``pyproject.toml`` as UTF-8. This fixes Unicode handling on Windows and Python 2. (5482)
- Fix a crash that occurs when PATH not set, while generating script location warning. (5558)
- Disallow packages with ``pyproject.toml`` files that have an empty build-system table. (5627)

Vendored Libraries

- Update CacheControl to 0.12.5.
- Update certifi to 2018.4.16.
- Update distro to 1.3.0.
- Update idna to 2.7.
- Update ipaddress to 1.0.22.
- Update pkg_resources to 39.2.0 (via setuptools).
- Update progress to 1.4.
- Update pytoml to 0.1.16.
- Update requests to 2.19.1.
- Update urllib3 to 1.23.

Improved Documentation

- Document how to use pip with a proxy server. (512, 5574)
- Document that the output of pip show is in RFC-compliant mail header format. (5261)


  - PyPI:
  - Changelog:
  - Homepage:

### Update [tox]( from **3.0.0** to **3.1.3**.

   ### 3.1.2


- Revert &quot;Fix bug with incorrectly defactorized dependencies (`772 &lt;;`_)&quot; due to a regression (`(799) &lt;;`_) - by :user:`obestwalter`
   ### 3.1.1


- PyPi documentation for ``3.1.0`` is broken. Added test to check for this, and
  fix it by :user:`gaborbernat`. (`879
   ### 3.1.0


- Add ``ignore_basepython_conflict``, which determines whether conflicting
  ``basepython`` settings for environments containing default factors, such as
  ``py27`` or ``django18-py35``, should be ignored or result in warnings. This
  was a common source of misconfiguration and is rarely, if ever, desirable from
  a user perspective - by :user:`stephenfin` (`477 &lt;;`_)
- Fix bug with incorrectly defactorized dependencies (deps passed to pip were not de-factorized) - by :user:`bartsanchez` (`706 &lt;;`_)


- Add support for multiple PyPy versions using default factors. This allows you
  to use, for example, ``pypy27`` knowing that the correct intepreter will be
  used by default - by :user:`stephenfin` (`19 &lt;;`_)
- Add support to explicitly invoke interpreter directives for environments with
  long path lengths. In the event that ``tox`` cannot invoke scripts with a
  system-limited shebang (e.x. a Linux host running a Jenkins Pipeline), a user
  can set the environment variable ``TOX_LIMITED_SHEBANG`` to workaround the
  system&#39;s limitation (e.x. ``export TOX_LIMITED_SHEBANG=1``) - by :user:`jdknight` (`794 &lt;;`_)
- introduce a constants module to be used internally and as experimental API - by :user:`obestwalter` (`798 &lt;;`_)
- Make ``py2`` and ``py3`` aliases also resolve via ``py`` on windows by :user:`asottile`. This enables the following things:
  ``tox -e py2`` and ``tox -e py3`` work on windows (they already work on posix); and setting ``basepython=python2`` or ``basepython=python3`` now works on windows. (`856 &lt;;`_)
- Replace the internal version parsing logic from the not well tested `PEP-386 &lt;;`_ parser for the more general `PEP-440 &lt;;`_. `packaging &gt;= 17.1 &lt;;`_ is now an install dependency by :user:`gaborbernat`. (`860 &lt;;`_)


- extend the plugin documentation and make lot of small fixes and improvements - by :user:`obestwalter` (`797 &lt;;`_)
- tidy up tests - remove unused fixtures, update old cinstructs, etc. - by :user:`obestwalter` (`799 &lt;;`_)
- Various improvements to documentation: open browser once documentation generation is done, show Github/Travis info on documentation page, remove duplicate header for changelog, generate unreleased news as DRAFT on top of changelog, make the changelog page more compact and readable (width up to 1280px) by :user:`gaborbernat` (`859 &lt;;`_)


- filter out unwanted files in package - by :user:`obestwalter` (`754 &lt;;`_)
- make the already existing implicit API explicit - by :user:`obestwalter` (`800 &lt;;`_)
- improve tox quickstart and corresponding tests - by :user:`obestwalter` (`801 &lt;;`_)
- tweak codecov settings via .codecov.yml - by :user:`obestwalter` (`802 &lt;;`_)


  - PyPI:
  - Changelog:
  - Docs:

### Update [Sphinx]( from **1.7.5** to **1.7.6**.

   ### 1.7.6


Incompatible changes


Features added

Bugs fixed

* 5037: LaTeX ``\sphinxupquote{}`` breaks in Russian
* sphinx.testing uses deprecated pytest API; ``Node.get_marker(name)``
* 5016: crashed when recommonmark.AutoStrictify is enabled
* 5022: latex: crashed with docutils package provided by Debian/Ubuntu
* 5009: latex: a label for table is vanished if table does not have a caption
* 5048: crashed with numbered toctree
* 2410: C, render empty argument lists for macros.
* C++, fix lookup of full template specializations with no template arguments.
* 4667: C++, fix assertion on missing references in global scope when using
  intersphinx. Thanks to Alan M. Carroll.
* 5019: autodoc: crashed by Form Feed Character
* 5032: autodoc: loses the first staticmethod parameter for old styled classes
* 5036: quickstart: Typing Ctrl-U clears the whole of line
* 5066: html: &quot;relations&quot; sidebar is not shown by default
* 5091: latex: curly braces in index entries are not handled correctly
* 5070: epub: Wrong internal href fragment links
* 5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
* 5076: napoleon raises RuntimeError with python 3.7
* 5125: sphinx-build: Interface of ``sphinx:main()`` has changed
* sphinx-build: ```` refers ``sys.argv`` instead of given
* 5146: autosummary: warning is emitted when the first line of docstring ends
  with literal notation
* autosummary: warnings of autosummary indicates wrong location (refs: 5146)
* 5143: autodoc: crashed on inspecting dict like object which does not support



  - PyPI:
  - Changelog:
  - Homepage:

### Update [cryptography]( from **2.2.2** to **2.3**.

   ### 2.3

  allowed tag truncation by default which can allow tag forgery in some cases.
  The method now enforces the ``min_tag_length`` provided to the
  :class:`~cryptography.hazmat.primitives.ciphers.modes.GCM` constructor.
* Added support for Python 3.7.
* Added :meth:`~cryptography.fernet.Fernet.extract_timestamp` to get the
  authenticated timestamp of a :doc:`Fernet &lt;/fernet&gt;` token.
* Support for Python 2.7.x without ``hmac.compare_digest`` has been deprecated.
  We will require Python 2.7.7 or higher (or 2.7.6 on Ubuntu) in the next
  ``cryptography`` release.
* Fixed multiple issues preventing ``cryptography`` from compiling against
  LibreSSL 2.7.x.
* Added
  for quick serial number searches in CRLs.
* The :class:`~cryptography.x509.RelativeDistinguishedName` class now
  preserves the order of attributes. Duplicate attributes now raise an error
  instead of silently discarding duplicates.
* :func:`~cryptography.hazmat.primitives.keywrap.aes_key_unwrap` and
  now raise :class:`~cryptography.hazmat.primitives.keywrap.InvalidUnwrap` if
  the wrapped key is an invalid length, instead of ``ValueError``.

.. _v2-2-2:


  - PyPI:
  - Changelog:
  - Repo:

### Update [PyYAML]( from **3.12** to **3.13**.

*The bot wasn't able to find a changelog for this release. [Got an idea?](*

  - PyPI:
  - Homepage:
@@ -1115,6 +1115,11 @@ def _replace(self, value, name=None, section_name=None, crossonly=False):
return replaced

def _replace_if_needed(self, x, name, replace, crossonly):
if replace and x and hasattr(x, 'replace'):
Copy link

@blueyed blueyed Sep 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this check for the _replace attr?

Copy link

@blueyed blueyed Sep 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, does not help.

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

Successfully merging this pull request may close these issues.

3 participants