- Drop attrs lib and replace with pydantic.
- Remove unused modules.
No significant changes.
- Fix an error when parsing a setup.py file that has a UTF-8 BOM. #364
- Update
WheelCache
usage to be compatible withpip==23.1
#363
- Fix for prior release that was using
shell=True
without the proper command, launch subprocess withoutshell=True
. #353
No significant changes.
- Support for named package categories in Pipfile and Pipfile.lock beyond the default and develop categories. #345
- Fix non-deterministic markers by removing
lru_cache
usage frommarkers.py
. #344
- Rely on
packaging
andpkg_resources
internal topip
. #343
- Fix bug with local file installs that are not marked
editable = "true"
getting an unexpected#egg
fragment. #342
requirementslib
has converted off of pip-shims project which had grown into a complicated interface to usingpip
. It was problematic becausepip-shims
could never foresee and accommodate future looking changes to internal interfaces ofpip
. Also,pip-shims
slowed down this library and required downstream tools such aspipenv
to continue vendoring it despite having already dropped usages. Due to the impact of this change, it requires a major version increase ofrequirementslib
to2.0.0
To utilize version2.0.0
ofrequirementslib
, ensure you havepip>=22.2
as this has not been fully tested to support earlier versions ofpip
Breakage of the internalpip
interface usage is possible with earlier versions. Additionally, the interface onNamedRequierment
renamed class methodget_dependencies
todependencies
andget_abstract_dependencies
toabstract_dependencies
in order to match interface withLine
class and avoid naming collision with the utility methods they call. #334
requirementslib
adjusted code paths to prevent import ofsetuptools
that causes issues when upgradingsetuptools
. #339
- Rewrite imports of
pip_shims.shims
to befrom pip_shims import shims
so that they can be rewritten by the vendoring scripts inpipenv
. #332
- Resolved an issue introduced in 1.6.5 that failed to parse refs in VCS uris #330
- Fix tracebacks on encountering Annotated variables #307
- Change style of
packaging
imports for downstreampipenv
to be able to patch this more easily. #324
- Fix boolean logical bug whereby a name may have already been supplied to
Line.parse_name
but it was sometimes recomputed incorrectly. #319 - In order to fix the requirementslib build and compatibility with
pip==22.1
this change adds a filerequirementslib.models.old_pip_utils
to maintain the prior version ofunpack_url
asold_unpack_url
that was dropped frompip==22.1
. #321
- Fix an issue for projects with an at sign (
@
) in the path #309 - Resolved issue where a beta python version in the python_version marker would cause an error. #317
- Fix deprecation warning for setuptools.config.read_configuration when using setuptools >= v61.0.0 #315
No significant changes.
- Fixed bug introduced in requirementslib==1.6.2 where the pyproject.toml would always be deleted after use. #313
- Updates to support pip==22.* and pass in required verbosity argument to
VcsSupport.obtain
. Pinpyparsing<3.0.0
in order to prevent failure with parsing certain system markers. #308
- Handle edge case of installing from url with fragment containing a subdirectory as the location to the package. #312
- Officially drop support for Python 3.6. #308
- Simplify the ast parsing so that it will give up to building the metadata when it's unable to parse. #268
- Switch from
appdirs
toplatformdirs
. #295
- Fix an AST parse error on Python 3.9+. #288
- Replace
chardet
withcharset_normalizer
. #296 - Fix the initialization of
pep517.HookCaller
. #299
- Officially drop support for Python 2.7 and 3.5. #301
- Expand env vars in the URL of requirements. #276
- Replace the deprecated arguments of
attrs
with recommended ones. #271
- Fix a bug that file URLs will be incorrectly unquoted during parsing. #274
- Fix the PEP 517 requires in default
pyproject.toml
and clean the temp files. #262 - Fix an unparse error that the dictionary keys are unhashable. #266
- Fix a bug that dist-info inside
venv
directory will be mistaken as the editable package's metadata. #273
- Don't copy whole tree for local directory dependencies. #259
- Fix a bug that assignments with type annotations are missing from the AST. #253
- Fix a bug that
package_dir
points to a wrong location when parsingsetup.cfg
. #255
- Packages which use a function call in
setup.py
to find their own name dynamically will now successfully resolve. #251
- Switch to BFS algorithm to iterate possible metadata directories. #186
- Fix a bug that + character in URL auth are converted to a space. #244
- Fixed an issue in the AST parser which caused failures when parsing
setup.py
files with assignments (e.g.variable = some_value
) to the same name more than once, followed by operations on those variables (e.g.new_value = variable + other_variable
). #246 - Copy symlinks as well for local path requirements. #248
- Fix a bug that non-string value for name argument will be taken as requirement name. #249
- Subdirectory fragments on VCS URLs which also contain
#egg=
fragments will now be included correctly in requirements. #236 - Fixed a regression which caused collisions to occur between valid named requirements and invalid local filesystem paths. #239
- Fixed a bug in
setup.py
parsing in whichsetup.py
files which passed a dictionary to thesetup
function returned metadata that could not be meaningfully processed. #241
- Fix an issue where the list of not-supported python versions in a marker was being truncated. #228
- Fixed a bug which prevented the use of
wheel_cache
instances frompip
due to deprecated invocation. #230 Requirementslib
will now ensure thatPEP508
style direct URL lines are preserved as being direct URL references when converting to and fromRequirementslib.requirement
instances. #232- Fix a bug that
1.x
specifiers can't be parsed correctly. #234
- Fixed a bug in
AST
parsing on python 2.7 which caused the parser to fail if any attributes could not be resolved. #226
- Added
requirementslib.models.metadata
module withget_package
,get_package_version
, andget_package_from_requirement
interfaces. #219
- Fixed an issue in parsing setup files that incorrectly parsed the
in
operator and failed to properly expand referenced dictionaries. #222 - Fixed an issue that did not take into account micro versions when generating markers from
python_requires
. #223
- Fixed an issue which prevented parsing of
setup.cfg
files using thesetuptools
native configuration reader. #216 - URI instances will no longer print masked username fields when neither a username or password is supplied. #220
- Added support for hiding tokens from URLs when printing them to the screen. #192
- Fix AST parsing when
setup.py
contains binary operators other than+
and-
. #179 - Fix test failures due to updates to the
pyparsing
API. #181 - Fixed an issue with loading
Pipfile
data due toplette
model misalignment. #182 - Fixed failed calls to
.lower
ontomlkit
'sBool
object during pipfile load as the API seems to have changed here. #183 - Added import guards to prevent
ImportErrors
which could occur when attempting to import now-removedpkg_resources.extern.requirements
. #185 - Fixed an issue which prevented loading
Lockfile
-based references to local paths when callingas_requirements()
on arequirementslib.models.lockfile.Lockfile
instance. #188 - Updated references to
Link
instances which no longer have theis_artifact
property. #190 - Updated all references to newly shimmed code to fix breakages due to
pip 19.3
release: - Fixed references toCommand
object frompip
in favor ofInstallCommand
which is now properly shimmed viapip-shims
- Fixed invocation ofVcsSupport
andVersionControl
objects for compatibility - Removed addition of options toCommand
as they are redundant when usingInstallCommand
- Cutget_finder
andstart_resolver
over to newly shimmed approaches inpip-shims
#191 - Fixed a bug in parsing of
Pipfiles
with missing or misnamedsource
sections which could causetomlkit
errors when loading legacyPipfiles
. #194 - Corrected an unexpected behavior which resulted in a
KeyError
when attempting to call__getitem__
on aPipfile
instance with a section that was not present. #195 - Fixed an issue in
Lockfile
path and model auto-detection when called without theload
classmethod which caused initialization to fail due to anAttributeError
. #196 - Fixed an issue which caused build directories to be deleted before dependencies could be determined for editable source reqiurements. #200
- Fixed a bug which could cause parsing to fail for
setup.cfg
files on python 2. #202 - Fixed an issue in binary operator mapping in the
ast_parse_setup_py
functionality of the dependency parser which could cause dependency resolution to fail. #204 - Fixed an issue which prevented successful parsing of
setup.py
files which were notutf-8
encoded. #205 - Fixed an issue which caused mappings of binary operators to fail to evaluate when parsing
setup.py
files. #206 - Fixed mapping and evaluation of boolean operators and comparisons when evaluating
setup.py
files with AST parser to discover dependencies. #207
- Added support for parsing lists of variables as extras in setup.py files via
ast.BinOp
traversal. #177
- Fixed quoting of markers when formatting requirements as pip-compatible lines. #173
- Quotes surrounding requirement lines will now be stripped only if matching pairs are found to ensure requirements can be parsed correctly. #176
- Added support to the AST parser for discovering non-standard invocations of
setup
insetup.py
, e.g. using the fully qualified function name. #163 - Fixed an issue which caused dynamic references in
setup.cfg
to fail whenpackage_dir
was specified insetup.py
. #165 - Fixed handling of
@
-signs infile:
URLs, unbreaking the use of local packages in e.g. Jenkins workspaces. #168 - Fixed occasional recursion error when parsing function references using AST parser on
setup.py
files. #169 - Fixed an intermittent issue caused by the use of
lru_cache
on a helper function in the translation of markers. #171 - Added enhanced
get_line()
functionality toLine
objects and expanded test coverage to incorporate hypothesis. #174, #77
- Fixed a bug which caused local dependencies to incorrectly return
wheel
as their name. #158 - Wheels which are successfully built but which contain no valid metadata will now correctly be skipped over during requirements parsing in favor of sdists. #160
- Implemented an AST parser for
setup.py
for parsing package names, dependencies, and version information if available. #106 - Fully implement marker merging and consolidation logic using
requirement.merge_markers(markers)
. #153
- Updated
attrs
dependency to constraint>=18.2
. #142 - Fixed a bug which forced early querying for dependencies via pypi or other indexes just by simply creating a
Requirement
instance. - Added the ability to skip tests requiring internet by settingREQUIREMENTSLIB_SKIP_INTERNET_TESTS
. #145 - Egg fragments on
PEP-508
style direct URL dependencies are now disregarded rather than merged with the leading name. #146 - Fixed a bug which prevented the successful loading of pipfiles using
Pipfile.load
. #148 - Fixed a bug which prevented handling special setup.cfg directives during dependency parsing. #150
- Fixed an issue which caused the merging of markers to inadvertently use
or
to merge even different variables. #153
- Fixed a bug which prevented successful parsing of VCS urls with dashes. #138
- Fixed a bug which caused significant degradation in performance while loading requirements. #140
Added full support for parsing PEP-508 compliant direct URL dependencies.
Fully implemented pep517 dependency mapping for VCS, URL, and file-type requirements.
Expanded type-checking coverage. #108
- Fixed a parsing bug which incorrectly represented local VCS uris with progressively fewer forward slashes in the
scheme
, causing dependency resolution to fail. #135
- Added
is_pep517
andbuild_backend
properties to the top levelRequirement
object to help determine how to build the requirement. #125
- Suppressed output written to
stdout
by pip during clones of repositories to non-base branches. #124 - Fixed a bug which caused local file and VCS requirements to be discovered in a depth-first, inexact search, which sometimes caused incorrect matches to be returned. #128
- Fixed a bug with link generation on VCS requirements without URI schemes. #132
VCSRequirement.get_checkout_dir
will now properly respect thesrc_dir
argument. #133
- Fixed a bug which caused runtime monkeypatching of plette validation to fail. #120
- Enhanced parsing of dependency and extras detail from
setup.cfg
files. #118
- Take the path passed in if it's valid when loading or creating the lockfile/pipfile. #114
- Don't write redundant
egg-info
under project root whensrc
is used as package base. #115 - Fixed an issue which prevented parsing of extras and dependency information from local
setup.py
files and could cause irrecoverable errors. #116
- Fixed a bug with parsing branch names which contain slashes. #112
- Added support for loading metadata from
pyproject.toml
. #102 - Local and remote archive
FileRequirements
will now be unpacked to a temporary directory for parsing. #103 - Dependency information will now be parsed from local paths, including locally unpacked archives, via
setup.py egg_info
execution. #104 - Additional metadata will now be gathered for
Requirement
objects which contain asetup.cfg
on their base path. #105 - Requirement names will now be harvested from all available sources, including from
setup.py
execution,setup.cfg
files, and any metadata provided as input. #107 - Added a flag for PEP508 style direct url requirements. #99
- Fixed a bug with
Pipfile.load()
which caused a falseValidationError
to raise when parsing a validPipfile
. #110
- Restructured library imports to improve performance. #95
- Fixed an issue which caused failures when determining the path to
setup.py
files. #93
- Fixed a bug which prevented installation of editable vcs requirements with subdirectory specifiers. #91
- Fixed a bug which prevented mercurial repositories from acquiring commit hashes successfully. #89
- Fixed an issue which caused accidental leakage of open
requests.session
instances. #87
Pipfile
andLockfile
models will now properly perform import and export operations with fully data serialization. #83- Added a new interface for merging
dev
anddefault
sections in bothPipfile
andLockfile
objects usingget_deps(dev=True, only=False)
. #85
Requirement.as_line()
now provides an argument to make the inclusion of markers optional by passinginclude_markers=False
. #82Pipfile
andLockfile
models are now able to successfully perform creation operations on projects which currently do not have existing files if suppliedcreate=True
. #84
- Fixed a bug in named requirement normalization which caused querying the index to fail when looking up requirements with dots in their names. #79
- Fixed a bug which caused VCS URIs to build incorrectly when calling
VCSRequirement.as_line()
in some cases. #73 - Fixed bug that editable package with ref by @ is not supported correctly #74
- Add space before environment markers ; to make editable packages can be installed by pip #70
Requirement.get_commit_hash
andRequirement.update_repo
will no longer clone local repositories to temporary directories or local src directories in order to determine commit hashes. #60- Added
Requirement.lock_vcs_ref()
api for locking the VCS commit hash to the current commit (and obtaining it and determining it if necessary). #64 Requirement.as_line()
now offers the parameteras_list
to return requirements more suited for passing directly tosubprocess.run
andsubprocess.Popen
calls. #67
- Fixed a bug error formatting of the path validator method of local requirements. #57
- Fixed an issue which prevented successful loads of
Pipfile
objects missing entries in some sections. #59 - Fixed an issue which caused
Requirement.get_commit_hash()
to fail for local requirements. #67
- Fixed an issue which caused local file uri based VCS requirements to fail when parsed from the
Pipfile
format. #53
- Improved
Pipfile.lock
loading time by lazily loading requirements in favor of quicker access to metadata and text. #51
- Fixed a bug which caused wheel requirements to include specifiers in
Requirement.as_line()
output, preventing installation when passing this output to pip. #49
- Allow locking of specific vcs references using a new api:
Requirement.req.get_commit_hash()
andRequirement.commit_hash
and updates viaRequirement.req.update_repo()
. #47
- Fixed a bug which sometimes caused extras to be dropped when parsing named requirements using constraint-style specifiers. #44
- Fix parsing error in Requirement.as_ireq() if requirement contains hashes. #45
- Added support for
Requirement.get_dependencies()
to return unpinned dependencies. - Implemented full support for both parsing and writing lockfiles.
- Introduced lazy imports to enhance runtime performance.
- Switch to
packaging.canonicalize_name()
instead of custom canonicalization function. - Added
Requirement.copy()
to the api to copy a requirement. #33 - Add pep423 formatting to package names when generating
as_line()
output. - Sort extras when building lines.
- Improve local editable requirement name resolution. #36
- Fixed a bug which prevented dependency resolution using pip >= 18.0.
- Fix pipfile parser bug which mishandled missing
requires
section. #33 - Fixed a bug which caused extras to be excluded from VCS urls generated from pipfiles. #41
- Unvendored
pipfile
in favor ofplette
. #33
- Unvendored
pipfile
in favor ofplette
. #33 - Moved pipfile and lockfile models to
plette
and added api wrappers for compatibility. #43
- If a package is stored on a network share drive, we now resolve it in a way that gets the correct relative path (#29)
- Properly handle malformed urls and avoid referencing unbound variables. (#32)
- Fixed a bug which prevented the inclusion of all markers when parsing requirements from existing pipfile entries. pypa/pipenv#2520 (#26)
- requirementslib will now correctly handle subdirectory fragments on output and input for both pipfile and pip-style requirements. (#27)
- Move slow imports to improve import times. (#23)
- Use
hostname
instead ofnetloc
to format urls to avoid dropping usernames when they are included. (#22)
- Requirementslib will no longer incorrectly write absolute paths or uris where relative paths were provided as inputs.
- Fixed a bug with formatting VCS requirements when translating implicit SSH URIs to ssh URLs. (#20)
- Fixed an issue with resolving certain packages which imported and executed other libraries (such as
versioneer
) duringsetup.py
execution. (#18)
- Fixed a quotation error when passing markers to
Requirement.constraint_line
andRequirement.markers_as_pip
. (#17)
- Cleaned up relative path conversions to ensure they are always handled in posix style. (#15)
- Fixed a bug which caused converting relative paths to return
None
. (#14)
- Fixed a bug which caused the base relative path to be listed as
./.
instead of.
. (#12) - Fixed a bug that caused egg fragments to be added to
Requirement.as_line()
output for file requirements. (#13)
- Fixed a problem with loading relative paths in pipfiles with windows-style slashes. (#11)
- Fixed a bug with default values used during lockfile generation. (#9)
- Fixed usage documentation. (#9)
- Updated automation scripts to add release scripts and tagging scripts. (1-d0479c0a)
- Fix parsing bug with local VCS uris (1-22283f73)
- Fix bug which kept vcs refs in local relative paths (2-34b712ee)
- Cleanup unused imports and migrate history file to changelog. (1-1cddf326)
- Add pipfile parser to parse all requirements from pipfile to requirement format and generate pipfile hashes.
- Add towncrier.
- Reorganize and reformat codebase, refactor.
- Implement lockfile parser and allow it to output to requirements.txt format.
- Better parsing of named requirements with extras.
- Add constraint_line property for pip constraintfile input.
- Rewrite parser logic for cleanliness and consistency.
- Add lockfile parser and allow it to output to requirements format.
- Reorganize and format codebase, refactor code.
- Normalize windows paths for local non-vcs requirements.
- Normalize windows paths for local non-vcs requirements.
- Fixed a bug which mixed posix-style and windows-style path separators for relative paths.
- Raise an explicit error when handling the current directory as a requirement if it isn't installable.
- Bugfix for local file requirements which had their URIs inappropriately truncated.
- Requirement line output will now properly match the URI scheme supplied at creation time.
- Fixed a bug with path resolution related to ramdisks on windows.
- Fix a bug which caused parsing to fail by adding extra whitespace to requirements.
- Vendored patched pipfile
- Fix editable URI naming on windows.
- Fixed a bug causing failures on -e . paths with extras.
- Fall back to pip/setuptools as a parser for setup.py files and project names.
- Bugfix for parsing setup.py file paths.
- Resolve names in setup.py files if available.
- Fix a bug with populating Link objects when there is no URI.
- Properly unquote URIs which have been urlencoded.
- Parse wheel names.
- Fix windows relative path generation.
- Add InstallRequirement generation.
- Bugfix for parsing editable local paths (they were being parsed as named requirements.)
- Bugfix.
- Bugfix for including egg fragments in non-vcs urls.
- Fix import bug.
- Bugfixes for remote files and zipfiles, extras on urls.
- Initial commit