diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a729bbc44..a0ddb13d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,8 +51,5 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Lint - run: go vet ./... - - name: Tests run: go test -v github.com/jfrog/jfrog-cli-core/v2/tests -timeout 0 -race diff --git a/artifactory/commands/npm/publish.go b/artifactory/commands/npm/publish.go index 86b0ab248..f8f3327aa 100644 --- a/artifactory/commands/npm/publish.go +++ b/artifactory/commands/npm/publish.go @@ -383,7 +383,7 @@ func (npc *NpmPublishCommand) setPackageInfo() error { } if fileInfo.IsDir() { - npc.packageInfo, err = biutils.ReadPackageInfoFromPackageJson(npc.publishPath, npc.npmVersion) + npc.packageInfo, err = biutils.ReadPackageInfoFromPackageJsonIfExists(npc.publishPath, npc.npmVersion) return err } log.Debug("The provided path is not a directory, we assume this is a compressed npm package") diff --git a/artifactory/commands/transferfiles/delayedartifactshandler.go b/artifactory/commands/transferfiles/delayedartifactshandler.go index 277cbe503..8e04b740a 100644 --- a/artifactory/commands/transferfiles/delayedartifactshandler.go +++ b/artifactory/commands/transferfiles/delayedartifactshandler.go @@ -369,6 +369,11 @@ func (w *SplitContentWriter) closeCurrentFile() error { if err := w.writer.Close(); err != nil { return err } + defer func() { + // Reset writer and counter. + w.recordCount = 0 + w.writer = nil + }() if w.writer.GetFilePath() != "" { fullPath, err := getUniqueErrorOrDelayFilePath(w.dirPath, func() string { return w.filePrefix @@ -384,9 +389,6 @@ func (w *SplitContentWriter) closeCurrentFile() error { w.fileIndex++ } } - // Reset writer and counter. - w.recordCount = 0 - w.writer = nil return nil } diff --git a/artifactory/commands/transferfiles/localgeneratedfilter.go b/artifactory/commands/transferfiles/localgeneratedfilter.go index 20f3fd344..5bb6560e3 100644 --- a/artifactory/commands/transferfiles/localgeneratedfilter.go +++ b/artifactory/commands/transferfiles/localgeneratedfilter.go @@ -20,7 +20,7 @@ import ( const ( locallyGeneratedApi = "api/localgenerated/filter/paths" minArtifactoryVersionForLocallyGenerated = "7.55.0" - maxConcurrentLocallyGeneratedRequests = 2 + maxConcurrentLocallyGeneratedRequests = 5 ) // The request and response payload of POST '/api/localgenerated/filter/paths' diff --git a/artifactory/commands/transferfiles/manager.go b/artifactory/commands/transferfiles/manager.go index e9904b592..b6777ca3b 100644 --- a/artifactory/commands/transferfiles/manager.go +++ b/artifactory/commands/transferfiles/manager.go @@ -40,7 +40,8 @@ type transferDelayAction func(phase phaseBase, addedDelayFiles []string) error // Transfer files using the 'producer-consumer' mechanism and apply a delay action. func (ftm *transferManager) doTransferWithProducerConsumer(transferAction transferActionWithProducerConsumerType, delayAction transferDelayAction) error { - ftm.pcDetails = newProducerConsumerWrapper() + // Set the producer-consumer value into the referenced value. This allow the Graceful Stop mechanism to access ftm.pcDetails when needed to stop the transfer. + *ftm.pcDetails = newProducerConsumerWrapper() return ftm.doTransfer(ftm.pcDetails, transferAction, delayAction) } @@ -203,14 +204,14 @@ type producerConsumerWrapper struct { errorsQueue *clientUtils.ErrorsQueue } -func newProducerConsumerWrapper() *producerConsumerWrapper { +func newProducerConsumerWrapper() producerConsumerWrapper { chunkUploaderProducerConsumer := parallel.NewRunner(GetThreads(), tasksMaxCapacity, false) chunkBuilderProducerConsumer := parallel.NewRunner(GetThreads(), tasksMaxCapacity, false) chunkUploaderProducerConsumer.SetFinishedNotification(true) chunkBuilderProducerConsumer.SetFinishedNotification(true) errorsQueue := clientUtils.NewErrorsQueue(1) - return &producerConsumerWrapper{ + return producerConsumerWrapper{ chunkUploaderProducerConsumer: chunkUploaderProducerConsumer, chunkBuilderProducerConsumer: chunkBuilderProducerConsumer, errorsQueue: errorsQueue, diff --git a/artifactory/commands/transferfiles/phase.go b/artifactory/commands/transferfiles/phase.go index d204c64d4..c9e9f2bbd 100644 --- a/artifactory/commands/transferfiles/phase.go +++ b/artifactory/commands/transferfiles/phase.go @@ -145,7 +145,8 @@ func (pb *phaseBase) setStopSignal(stopSignal chan os.Signal) { } func createTransferPhase(i int) transferPhase { - curPhaseBase := phaseBase{phaseId: i} + // Initialize a pointer to an empty producerConsumerWrapper to allow access the real value in StopGracefully + curPhaseBase := phaseBase{phaseId: i, pcDetails: &producerConsumerWrapper{}} switch i { case api.Phase1: return &fullTransferPhase{phaseBase: curPhaseBase} diff --git a/artifactory/commands/transferfiles/phase_test.go b/artifactory/commands/transferfiles/phase_test.go index dede22a24..8b1d7044a 100644 --- a/artifactory/commands/transferfiles/phase_test.go +++ b/artifactory/commands/transferfiles/phase_test.go @@ -13,7 +13,8 @@ import ( const zeroUint32 uint32 = 0 func TestStopGracefully(t *testing.T) { - pBase := &phaseBase{pcDetails: newProducerConsumerWrapper()} + pcWrapper := newProducerConsumerWrapper() + pBase := &phaseBase{pcDetails: &pcWrapper} chunkUploaderProducerConsumer := pBase.pcDetails.chunkUploaderProducerConsumer chunkBuilderProducerConsumer := pBase.pcDetails.chunkBuilderProducerConsumer go func() { diff --git a/artifactory/commands/transferfiles/transferfileprogress.go b/artifactory/commands/transferfiles/transferfileprogress.go index aa8a47d8d..8c19ac83b 100644 --- a/artifactory/commands/transferfiles/transferfileprogress.go +++ b/artifactory/commands/transferfiles/transferfileprogress.go @@ -73,8 +73,6 @@ func initTransferProgressMng(allSourceLocalRepos []string, tdc *TransferFilesCom transfer.runningTime = transfer.transferMng.NewRunningTimeProgressBar() transfer.speedBar = transfer.transferMng.NewSpeedProgBar() transfer.timeEstBar = transfer.transferMng.NewTimeEstBar() - transfer.visitedFoldersBar = transfer.transferMng.NewVisitedFoldersBar() - transfer.delayedBar = transfer.transferMng.NewDelayedBar() // Init global error count for the process transfer.errorBar = transfer.transferMng.NewErrorBar() tdc.progressbar = &transfer @@ -90,6 +88,8 @@ func (t *TransferProgressMng) NewRepository(name string) { } t.emptyLine = t.barsMng.NewHeadlineBar("") t.currentRepoHeadline = t.barsMng.NewHeadlineBarWithSpinner("Current repository: " + color.Green.Render(name)) + t.visitedFoldersBar = t.transferMng.NewVisitedFoldersBar() + t.delayedBar = t.transferMng.NewDelayedBar() t.transferMng.StopCurrentRepoProgressBars(false) } @@ -209,6 +209,8 @@ func (t *TransferProgressMng) RemoveRepository() { // Abort all current repository's bars t.currentRepoHeadline.Abort(true) t.currentRepoHeadline = nil + t.visitedFoldersBar.GetBar().Abort(true) + t.delayedBar.GetBar().Abort(true) t.emptyLine.Abort(true) t.emptyLine = nil // Abort all phases bars diff --git a/artifactory/commands/transferfiles/utils.go b/artifactory/commands/transferfiles/utils.go index 902bd5421..14ebd3380 100644 --- a/artifactory/commands/transferfiles/utils.go +++ b/artifactory/commands/transferfiles/utils.go @@ -374,7 +374,10 @@ func interruptIfRequested(stopSignal chan os.Signal) error { return err } if exist { - stopSignal <- os.Interrupt + select { + case stopSignal <- os.Interrupt: + default: + } } return nil } diff --git a/go.mod b/go.mod index 673d6962d..7065e6f93 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/google/uuid v1.3.1 github.com/gookit/color v1.5.4 github.com/jedib0t/go-pretty/v6 v6.4.8 - github.com/jfrog/build-info-go v1.9.13 + github.com/jfrog/build-info-go v1.9.14 github.com/jfrog/gofrog v1.3.1 github.com/jfrog/jfrog-apps-config v1.0.1 github.com/jfrog/jfrog-client-go v1.34.3 @@ -101,4 +101,4 @@ require ( // replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20231003120621-90e9d7ea05e9 -// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go dev +// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231019085746-e1b192457664 diff --git a/go.sum b/go.sum index bb400aa67..369bfedd0 100644 --- a/go.sum +++ b/go.sum @@ -196,8 +196,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.8 h1:HiNzyMSEpsBaduKhmK+CwcpulEeBrTmxutz4oX/oWkg= github.com/jedib0t/go-pretty/v6 v6.4.8/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= -github.com/jfrog/build-info-go v1.9.13 h1:OeoGzPVK/O4TOUYk35uL4bXg/hleyqMrjGjjmyLOYrg= -github.com/jfrog/build-info-go v1.9.13/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= +github.com/jfrog/build-info-go v1.9.14 h1:xVezJ16Vpm/boRBn3lI1THCQmkylm+6R4zYWxOQ0NSM= +github.com/jfrog/build-info-go v1.9.14/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= github.com/jfrog/gofrog v1.3.1 h1:QqAwQXCVReT724uga1AYqG/ZyrNQ6f+iTxmzkb+YFQk= github.com/jfrog/gofrog v1.3.1/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= diff --git a/utils/progressbar/transferprogressbarmanager.go b/utils/progressbar/transferprogressbarmanager.go index 340166dc2..dcf13ca17 100644 --- a/utils/progressbar/transferprogressbarmanager.go +++ b/utils/progressbar/transferprogressbarmanager.go @@ -23,7 +23,6 @@ type transferLabels struct { Repositories string Files string Storage string - Note string TransferSpeed string EstimatedTime string VisitedFolders string @@ -31,10 +30,6 @@ type transferLabels struct { TransferFailures string WorkingThreads string RunningFor string - DiffStorage string - DiffFiles string - FailedStorage string - FailedFiles string } func formatString(emoji, key string, windows bool) string { @@ -47,23 +42,18 @@ func formatString(emoji, key string, windows bool) string { return key } -func initSProgressBarLabels(windows bool) transferLabels { +func initProgressBarLabels(windows bool) transferLabels { pbs := transferLabels{} pbs.Repositories = formatString("๐Ÿ“ฆ", " Repositories", windows) pbs.Files = formatString("๐Ÿ“„", " Files", windows) pbs.Storage = formatString("๐Ÿ—„ ", " Storage", windows) - pbs.Note = formatString(" ๐ŸŸ ", " Note: ", windows) pbs.TransferSpeed = formatString(" โšก", " Transfer speed: ", windows) pbs.EstimatedTime = formatString(" โŒ›", " Estimated time remaining: ", windows) - pbs.VisitedFolders = formatString(" ๐Ÿ“", " Visited folders: ", windows) - pbs.DelayedFiles = formatString(" โœ‹", " Delayed files: ", windows) pbs.TransferFailures = formatString(" โŒ", " Transfer failures: ", windows) pbs.WorkingThreads = formatString(" ๐Ÿงต", " Working threads: ", windows) pbs.RunningFor = formatString(" ๐Ÿƒ๐Ÿผ", " Running for: ", windows) - pbs.DiffStorage = formatString("๐Ÿ—„ ", " Diff Storage", windows) - pbs.DiffFiles = formatString("๐Ÿ“„", " Diff Files", windows) - pbs.FailedFiles = formatString("๐Ÿ“„", " Failed Files", windows) - pbs.FailedStorage = formatString("๐Ÿ—„ ", " Failed Storage", windows) + pbs.VisitedFolders = formatString(" ๐Ÿ“", " Visited folders: ", windows) + pbs.DelayedFiles = formatString(" โœ‹", " Delayed files: ", windows) return pbs } @@ -85,7 +75,7 @@ func InitTransferProgressBarMng(state *state.TransferStateManager, allRepos []st mng.stateMng = state mng.allRepos = allRepos mng.generalShouldStop = false - mng.transferLabels = initSProgressBarLabels(coreutils.IsWindows()) + mng.transferLabels = initProgressBarLabels(coreutils.IsWindows()) return } diff --git a/utils/reposnapshot/node.go b/utils/reposnapshot/node.go index eadeb3bb4..33d862244 100644 --- a/utils/reposnapshot/node.go +++ b/utils/reposnapshot/node.go @@ -52,20 +52,26 @@ func (node *Node) action(action ActionOnNodeFunc) error { // Convert node to wrapper in order to save it to file. func (node *Node) convertToWrapper() (wrapper *NodeExportWrapper, err error) { + var children []*Node err = node.action(func(node *Node) error { wrapper = &NodeExportWrapper{ Name: node.name, Completed: node.NodeStatus == Completed, } - for i := range node.children { - converted, err := node.children[i].convertToWrapper() - if err != nil { - return err - } - wrapper.Children = append(wrapper.Children, converted) - } + children = node.children return nil }) + if err != nil { + return + } + + for i := range children { + converted, err := children[i].convertToWrapper() + if err != nil { + return nil, err + } + wrapper.Children = append(wrapper.Children, converted) + } return } @@ -107,17 +113,19 @@ func (node *Node) getActualPath() (actualPath string, err error) { } // Sets node as completed, clear its contents, notifies parent to check completion. -func (node *Node) setCompleted() error { - return node.action(func(node *Node) error { +func (node *Node) setCompleted() (err error) { + var parent *Node + err = node.action(func(node *Node) error { node.NodeStatus = Completed node.children = nil - parent := node.parent + parent = node.parent node.parent = nil - if parent != nil { - return parent.CheckCompleted() - } return nil }) + if err == nil && parent != nil { + return parent.CheckCompleted() + } + return } // Check if node completed - if done exploring, done handling files, children are completed. @@ -233,30 +241,39 @@ func (node *Node) RestartExploring() error { // For a structure such as repo->dir1->dir2->dir3 // The initial call will be to the root, and for an input of ({"dir1","dir2"}), and the final output will be a pointer to dir2. func (node *Node) findMatchingNode(childrenDirs []string) (matchingNode *Node, err error) { - err = node.action(func(node *Node) error { - // The node was found in the cache. Let's return it. - if len(childrenDirs) == 0 { - matchingNode = node - return nil - } + // The node was found in the cache. Let's return it. + if len(childrenDirs) == 0 { + matchingNode = node + return + } - // Check if any of the current node's children are parents of the current node. - for i := range node.children { - if node.children[i].name == childrenDirs[0] { - matchingNode, err = node.children[i].findMatchingNode(childrenDirs[1:]) - return err - } + // Check if any of the current node's children are parents of the current node. + var children []*Node + err = node.action(func(node *Node) error { + children = node.children + return nil + }) + if err != nil { + return + } + for i := range children { + if children[i].name == childrenDirs[0] { + matchingNode, err = children[i].findMatchingNode(childrenDirs[1:]) + return } + } - // None of the current node's children are parents of the current node. - // This means we need to start creating the searched node parents. - newNode := CreateNewNode(childrenDirs[0], node) - newNode.parent = node + // None of the current node's children are parents of the current node. + // This means we need to start creating the searched node parents. + newNode := CreateNewNode(childrenDirs[0], node) + err = node.action(func(node *Node) error { node.children = append(node.children, newNode) - matchingNode, err = newNode.findMatchingNode(childrenDirs[1:]) - return err + return nil }) - return + if err != nil { + return + } + return newNode.findMatchingNode(childrenDirs[1:]) } func CreateNewNode(dirName string, parent *Node) *Node { diff --git a/xray/commands/audit/sca/npm/npm.go b/xray/commands/audit/sca/npm/npm.go index 9c863f877..3574a3065 100644 --- a/xray/commands/audit/sca/npm/npm.go +++ b/xray/commands/audit/sca/npm/npm.go @@ -24,7 +24,7 @@ func BuildDependencyTree(params utils.AuditParams) (dependencyTrees []*xrayUtils if err != nil { return } - packageInfo, err := biutils.ReadPackageInfoFromPackageJson(currentDir, npmVersion) + packageInfo, err := biutils.ReadPackageInfoFromPackageJsonIfExists(currentDir, npmVersion) if err != nil { return } diff --git a/xray/commands/audit/sca/python/python_test.go b/xray/commands/audit/sca/python/python_test.go index bf8ae768d..b5bc99fa8 100644 --- a/xray/commands/audit/sca/python/python_test.go +++ b/xray/commands/audit/sca/python/python_test.go @@ -1,10 +1,11 @@ package python import ( - "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/sca" "path/filepath" "testing" + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/sca" + "github.com/jfrog/build-info-go/utils/pythonutils" "github.com/stretchr/testify/assert" ) @@ -43,7 +44,7 @@ func TestPipDependencyListRequirementsFallback(t *testing.T) { assert.Contains(t, uniqueDeps, pythonPackageTypeIdentifier+"pexpect:4.7.0") assert.Contains(t, uniqueDeps, pythonPackageTypeIdentifier+"ptyprocess:0.7.0") assert.Len(t, rootNode, 1) - if assert.True(t, len(rootNode[0].Nodes) > 2) { + if assert.GreaterOrEqual(t, len(rootNode[0].Nodes), 2) { childNode := sca.GetAndAssertNode(t, rootNode[0].Nodes, "pexpect:4.7.0") if childNode != nil { // Test child module @@ -105,16 +106,16 @@ func TestBuildPoetryDependencyList(t *testing.T) { _, cleanUp := sca.CreateTestWorkspace(t, "poetry-project") defer cleanUp() expectedPoetryUniqueDeps := []string{ - pythonPackageTypeIdentifier + "wcwidth:0.2.5", + pythonPackageTypeIdentifier + "wcwidth:0.2.8", pythonPackageTypeIdentifier + "colorama:0.4.6", - pythonPackageTypeIdentifier + "packaging:22.0", + pythonPackageTypeIdentifier + "packaging:23.2", pythonPackageTypeIdentifier + "python:", pythonPackageTypeIdentifier + "pluggy:0.13.1", pythonPackageTypeIdentifier + "py:1.11.0", pythonPackageTypeIdentifier + "atomicwrites:1.4.1", - pythonPackageTypeIdentifier + "attrs:22.1.0", - pythonPackageTypeIdentifier + "more-itertools:9.0.0", - pythonPackageTypeIdentifier + "numpy:1.24.0", + pythonPackageTypeIdentifier + "attrs:23.1.0", + pythonPackageTypeIdentifier + "more-itertools:10.1.0", + pythonPackageTypeIdentifier + "numpy:1.26.1", pythonPackageTypeIdentifier + "pytest:5.4.3", } // Run getModulesDependencyTrees @@ -130,7 +131,7 @@ func TestBuildPoetryDependencyList(t *testing.T) { childNode := sca.GetAndAssertNode(t, rootNode[0].Nodes, "pytest:5.4.3") // Test sub child module if assert.NotNil(t, childNode) { - sca.GetAndAssertNode(t, childNode.Nodes, "packaging:22.0") + sca.GetAndAssertNode(t, childNode.Nodes, "packaging:23.2") } } } diff --git a/xray/commands/audit/sca/yarn/yarn.go b/xray/commands/audit/sca/yarn/yarn.go index ed15121dc..60ce98fd8 100644 --- a/xray/commands/audit/sca/yarn/yarn.go +++ b/xray/commands/audit/sca/yarn/yarn.go @@ -20,7 +20,7 @@ func BuildDependencyTree() (dependencyTrees []*xrayUtils.GraphNode, uniqueDeps [ return } - packageInfo, err := biUtils.ReadPackageInfoFromPackageJson(currentDir, nil) + packageInfo, err := biUtils.ReadPackageInfoFromPackageJsonIfExists(currentDir, nil) if errorutils.CheckError(err) != nil { return } diff --git a/xray/commands/testdata/poetry-project/poetry.lock b/xray/commands/testdata/poetry-project/poetry.lock index 6933e7ee5..d627e76eb 100644 --- a/xray/commands/testdata/poetry-project/poetry.lock +++ b/xray/commands/testdata/poetry-project/poetry.lock @@ -1,118 +1,116 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - { file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11" }, + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] [[package]] name = "attrs" -version = "22.1.0" +version = "23.1.0" description = "Classes Without Boilerplate" -category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.7" files = [ - { file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c" }, - { file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6" }, + {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, + {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, ] [package.extras] -dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] -docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] -tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] -tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] [[package]] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ - { file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" }, - { file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" }, + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] [[package]] name = "more-itertools" -version = "9.0.0" +version = "10.1.0" description = "More routines for operating on iterables, beyond itertools" -category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - { file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab" }, - { file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41" }, + {file = "more-itertools-10.1.0.tar.gz", hash = "sha256:626c369fa0eb37bac0291bce8259b332fd59ac792fa5497b59837309cd5b114a"}, + {file = "more_itertools-10.1.0-py3-none-any.whl", hash = "sha256:64e0735fcfdc6f3464ea133afe8ea4483b1c5fe3a3d69852e6503b43a0b222e6"}, ] [[package]] name = "numpy" -version = "1.24.0" +version = "1.26.1" description = "Fundamental package for array computing in Python" -category = "main" optional = false -python-versions = ">=3.8" +python-versions = "<3.13,>=3.9" files = [ - { file = "numpy-1.24.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6e73a1f4f5b74a42abb55bc2b3d869f1b38cbc8776da5f8b66bf110284f7a437" }, - { file = "numpy-1.24.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9387c7d6d50e8f8c31e7bfc034241e9c6f4b3eb5db8d118d6487047b922f82af" }, - { file = "numpy-1.24.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ad6a024a32ee61d18f5b402cd02e9c0e22c0fb9dc23751991b3a16d209d972e" }, - { file = "numpy-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73cf2c5b5a07450f20a0c8e04d9955491970177dce8df8d6903bf253e53268e0" }, - { file = "numpy-1.24.0-cp310-cp310-win32.whl", hash = "sha256:cec79ff3984b2d1d103183fc4a3361f5b55bbb66cb395cbf5a920a4bb1fd588d" }, - { file = "numpy-1.24.0-cp310-cp310-win_amd64.whl", hash = "sha256:4f5e78b8b710cd7cd1a8145994cfffc6ddd5911669a437777d8cedfce6c83a98" }, - { file = "numpy-1.24.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4445f472b246cad6514cc09fbb5ecb7aab09ca2acc3c16f29f8dca6c468af501" }, - { file = "numpy-1.24.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ec3e5e8172a0a6a4f3c2e7423d4a8434c41349141b04744b11a90e017a95bad5" }, - { file = "numpy-1.24.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9168790149f917ad8e3cf5047b353fefef753bd50b07c547da0bdf30bc15d91" }, - { file = "numpy-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ada6c1e9608ceadaf7020e1deea508b73ace85560a16f51bef26aecb93626a72" }, - { file = "numpy-1.24.0-cp311-cp311-win32.whl", hash = "sha256:f3c4a9a9f92734a4728ddbd331e0124eabbc968a0359a506e8e74a9b0d2d419b" }, - { file = "numpy-1.24.0-cp311-cp311-win_amd64.whl", hash = "sha256:90075ef2c6ac6397d0035bcd8b298b26e481a7035f7a3f382c047eb9c3414db0" }, - { file = "numpy-1.24.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0885d9a7666cafe5f9876c57bfee34226e2b2847bfb94c9505e18d81011e5401" }, - { file = "numpy-1.24.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e63d2157f9fc98cc178870db83b0e0c85acdadd598b134b00ebec9e0db57a01f" }, - { file = "numpy-1.24.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf8960f72997e56781eb1c2ea256a70124f92a543b384f89e5fb3503a308b1d3" }, - { file = "numpy-1.24.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f8e0df2ecc1928ef7256f18e309c9d6229b08b5be859163f5caa59c93d53646" }, - { file = "numpy-1.24.0-cp38-cp38-win32.whl", hash = "sha256:fe44e925c68fb5e8db1334bf30ac1a1b6b963b932a19cf41d2e899cf02f36aab" }, - { file = "numpy-1.24.0-cp38-cp38-win_amd64.whl", hash = "sha256:d7f223554aba7280e6057727333ed357b71b7da7422d02ff5e91b857888c25d1" }, - { file = "numpy-1.24.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ab11f6a7602cf8ea4c093e091938207de3068c5693a0520168ecf4395750f7ea" }, - { file = "numpy-1.24.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12bba5561d8118981f2f1ff069ecae200c05d7b6c78a5cdac0911f74bc71cbd1" }, - { file = "numpy-1.24.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9af91f794d2d3007d91d749ebc955302889261db514eb24caef30e03e8ec1e41" }, - { file = "numpy-1.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b1ddfac6a82d4f3c8e99436c90b9c2c68c0bb14658d1684cdd00f05fab241f5" }, - { file = "numpy-1.24.0-cp39-cp39-win32.whl", hash = "sha256:ac4fe68f1a5a18136acebd4eff91aab8bed00d1ef2fdb34b5d9192297ffbbdfc" }, - { file = "numpy-1.24.0-cp39-cp39-win_amd64.whl", hash = "sha256:667b5b1f6a352419e340f6475ef9930348ae5cb7fca15f2cc3afcb530823715e" }, - { file = "numpy-1.24.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4d01f7832fa319a36fd75ba10ea4027c9338ede875792f7bf617f4b45056fc3a" }, - { file = "numpy-1.24.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbb0490f0a880700a6cc4d000384baf19c1f4df59fff158d9482d4dbbca2b239" }, - { file = "numpy-1.24.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:0104d8adaa3a4cc60c2777cab5196593bf8a7f416eda133be1f3803dd0838886" }, - { file = "numpy-1.24.0.tar.gz", hash = "sha256:c4ab7c9711fe6b235e86487ca74c1b092a6dd59a3cb45b63241ea0a148501853" }, + {file = "numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82e871307a6331b5f09efda3c22e03c095d957f04bf6bc1804f30048d0e5e7af"}, + {file = "numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdd9ec98f0063d93baeb01aad472a1a0840dee302842a2746a7a8e92968f9575"}, + {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d78f269e0c4fd365fc2992c00353e4530d274ba68f15e968d8bc3c69ce5f5244"}, + {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ab9163ca8aeb7fd32fe93866490654d2f7dda4e61bc6297bf72ce07fdc02f67"}, + {file = "numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:78ca54b2f9daffa5f323f34cdf21e1d9779a54073f0018a3094ab907938331a2"}, + {file = "numpy-1.26.1-cp310-cp310-win32.whl", hash = "sha256:d1cfc92db6af1fd37a7bb58e55c8383b4aa1ba23d012bdbba26b4bcca45ac297"}, + {file = "numpy-1.26.1-cp310-cp310-win_amd64.whl", hash = "sha256:d2984cb6caaf05294b8466966627e80bf6c7afd273279077679cb010acb0e5ab"}, + {file = "numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cd7837b2b734ca72959a1caf3309457a318c934abef7a43a14bb984e574bbb9a"}, + {file = "numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c59c046c31a43310ad0199d6299e59f57a289e22f0f36951ced1c9eac3665b9"}, + {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58e8c51a7cf43090d124d5073bc29ab2755822181fcad978b12e144e5e5a4b3"}, + {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6081aed64714a18c72b168a9276095ef9155dd7888b9e74b5987808f0dd0a974"}, + {file = "numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:97e5d6a9f0702c2863aaabf19f0d1b6c2628fbe476438ce0b5ce06e83085064c"}, + {file = "numpy-1.26.1-cp311-cp311-win32.whl", hash = "sha256:b9d45d1dbb9de84894cc50efece5b09939752a2d75aab3a8b0cef6f3a35ecd6b"}, + {file = "numpy-1.26.1-cp311-cp311-win_amd64.whl", hash = "sha256:3649d566e2fc067597125428db15d60eb42a4e0897fc48d28cb75dc2e0454e53"}, + {file = "numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d1bd82d539607951cac963388534da3b7ea0e18b149a53cf883d8f699178c0f"}, + {file = "numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:afd5ced4e5a96dac6725daeb5242a35494243f2239244fad10a90ce58b071d24"}, + {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a03fb25610ef560a6201ff06df4f8105292ba56e7cdd196ea350d123fc32e24e"}, + {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcfaf015b79d1f9f9c9fd0731a907407dc3e45769262d657d754c3a028586124"}, + {file = "numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e509cbc488c735b43b5ffea175235cec24bbc57b227ef1acc691725beb230d1c"}, + {file = "numpy-1.26.1-cp312-cp312-win32.whl", hash = "sha256:af22f3d8e228d84d1c0c44c1fbdeb80f97a15a0abe4f080960393a00db733b66"}, + {file = "numpy-1.26.1-cp312-cp312-win_amd64.whl", hash = "sha256:9f42284ebf91bdf32fafac29d29d4c07e5e9d1af862ea73686581773ef9e73a7"}, + {file = "numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bb894accfd16b867d8643fc2ba6c8617c78ba2828051e9a69511644ce86ce83e"}, + {file = "numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e44ccb93f30c75dfc0c3aa3ce38f33486a75ec9abadabd4e59f114994a9c4617"}, + {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9696aa2e35cc41e398a6d42d147cf326f8f9d81befcb399bc1ed7ffea339b64e"}, + {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b411040beead47a228bde3b2241100454a6abde9df139ed087bd73fc0a4908"}, + {file = "numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1e11668d6f756ca5ef534b5be8653d16c5352cbb210a5c2a79ff288e937010d5"}, + {file = "numpy-1.26.1-cp39-cp39-win32.whl", hash = "sha256:d1d2c6b7dd618c41e202c59c1413ef9b2c8e8a15f5039e344af64195459e3104"}, + {file = "numpy-1.26.1-cp39-cp39-win_amd64.whl", hash = "sha256:59227c981d43425ca5e5c01094d59eb14e8772ce6975d4b2fc1e106a833d5ae2"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:06934e1a22c54636a059215d6da99e23286424f316fddd979f5071093b648668"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76ff661a867d9272cd2a99eed002470f46dbe0943a5ffd140f49be84f68ffc42"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:6965888d65d2848e8768824ca8288db0a81263c1efccec881cb35a0d805fcd2f"}, + {file = "numpy-1.26.1.tar.gz", hash = "sha256:c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe"}, ] [[package]] name = "packaging" -version = "22.0" +version = "23.2" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ - { file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3" }, - { file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3" }, + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] [[package]] name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - { file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d" }, - { file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" }, + {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, + {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] [package.extras] @@ -122,30 +120,28 @@ dev = ["pre-commit", "tox"] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ - { file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378" }, - { file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719" }, + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] [[package]] name = "pytest" version = "5.4.3" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.5" files = [ - { file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1" }, - { file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" }, + {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, + {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, ] [package.dependencies] -atomicwrites = { version = ">=1.0", markers = "sys_platform == \"win32\"" } +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" -colorama = { version = "*", markers = "sys_platform == \"win32\"" } +colorama = {version = "*", markers = "sys_platform == \"win32\""} more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" @@ -158,17 +154,16 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "wcwidth" -version = "0.2.5" +version = "0.2.8" description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" optional = false python-versions = "*" files = [ - { file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784" }, - { file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" }, + {file = "wcwidth-0.2.8-py2.py3-none-any.whl", hash = "sha256:77f719e01648ed600dfa5402c347481c0992263b81a027344f3e1ba25493a704"}, + {file = "wcwidth-0.2.8.tar.gz", hash = "sha256:8705c569999ffbb4f6a87c6d1b80f324bd6db952f5eb0b95bc07517f4c1813d4"}, ] [metadata] lock-version = "2.0" -python-versions = "^3.8" -content-hash = "775f49c34f3ace0990c73cf202e261c405e3ebfbd83ae2166aabf27ef44e8e14" +python-versions = ">=3.9,<3.13" +content-hash = "c71b73750693c3c89a13db5fa21920e241d9bd5a5e104e2ead175987c487dc9a" diff --git a/xray/commands/testdata/poetry-project/pyproject.toml b/xray/commands/testdata/poetry-project/pyproject.toml index 52ea7daf4..d675caf01 100644 --- a/xray/commands/testdata/poetry-project/pyproject.toml +++ b/xray/commands/testdata/poetry-project/pyproject.toml @@ -5,8 +5,8 @@ description = "" authors = ["Tal Arian "] [tool.poetry.dependencies] -python = "^3.8" -numpy = "^1.23.0" +python = ">=3.9,<3.13" +numpy = "^1.26.0" [tool.poetry.dev-dependencies] pytest = "^5.2"