#bandersnatch

1 messages ยท Page 1 of 1 (latest)

unique wren
#

Need to finish PEP691 support this weekend. That's my goal

narrow grailBOT
#

Bumps sphinx from 4.5.0 to 5.1.0.

Release notes
Sourced from sphinx's releases.

v5.1.0
Changelog: https://www.sphinx-doc.org/en/master/changes.html
v5.0.2
Changelog: https://www.sphinx-doc.org/en/master/changes.html
v5.0.1
Changelog: https://www.sphinx-doc.org/en/master/changes.html
v5.0.0
No release notes provided.
v5.0.0b1
Changelog: https://www.sphinx-doc.org/en/master/changes.html

Changelog
Sourced from sphinx's changelog.

Release 5.1.0 (relea...

#

Bumps filelock from 3.6.0 to 3.7.1.

Changelog
Sourced from filelock's changelog.

Changelog

Commits

4730a40 Make the readme documentation point to the index page
4555608 Add ability to return immediately when a lock cannot be obtained instโ€ฆ (#142)
08a292e [pre-commit.ci] pre-commit autoupdate (#143)
30a3b9c [pre-commit.ci] pre-commit autoupdate (#141)
665c9f3 [pre-commit.ci] pre-commit autoupdate (#140)
edb1888 [pre-commit.ci] pre-commit autoupda...

#

Bumps botocore from 1.25.4 to 1.27.36.

Changelog
Sourced from botocore's changelog.

1.27.36

api-change:account: This release enables customers to manage the primary contact information for their AWS accounts. For more information, see https://docs.aws.amazon.com/accounts/latest/reference/API_Operations.html
api-change:ec2: Added support for EC2 M1 Mac instances. For more information, please visit aws.amazon.com/mac.
api-change:iotdeviceadvisor: Added new...

#

Bumps black from 22.3.0 to 22.6.0.

Release notes
Sourced from black's releases.

22.6.0
Style

Fix unstable formatting involving #fmt: skip and # fmt:skip comments (notice the lack of spaces) (#2970)

Preview style

Docstring quotes are no longer moved if it would violate the line length limit (#3044)
Parentheses around return annotations are now managed (#2990)
Remove unnecessary parentheses around awaited objects (#2991)
Remove unnecessary parentheses in wit...

#

Bumps myst-parser from 0.17.2 to 0.18.0.

Release notes
Sourced from myst-parser's releases.

v0.18.0
What's Changed

๐Ÿ‘Œ IMPROVE: Do not let sphinx check the config type by @โ€‹chrisjsewell in executablebooks/MyST-Parser#559
โ™ป๏ธ๐Ÿ“š Restructure code base and documentation by @โ€‹chrisjsewell in executablebooks/MyST-Parser#566
๐Ÿ› FIX: floor table column widths to integers by @โ€‹Jean-Abou-Samra in executablebooks/MyST-Parser#568
โฌ†๏ธ Drop Sphinx 3, add Sphin...

narrow grailBOT
unique wren
#

Need to fix root simple index.html to generate the two other files too ...

#

And add some more JSON file generation into existing tests - I expected them to exist but they don't

narrow grailBOT
#
  • Move to 6.0.0.dev0 version
  • Add config for setting formats to save to storage
    • simple-format
    • Valid options: ALL, HTML or JSON
  • Move mirror simple generation functions to new simple module
  • Add new tests to test_simple.py
    • Made tests be included with install by adding an init.py

Tests

  • Add unittest coverage to SimpleAPI object
    • Test valid and invalid format requests
    • Test the JSON output for PEP691 compliance
      • Per pacakge
      • Global index
  • A...
unique wren
#

Bah - close - seems I do have a bug with the packages writing out the JSON file ... Will try work that out tomorrow or some stage this week.

narrow grailBOT
#

Bumps pyparsing from 2.4.7 to 3.0.9.

Release notes
Sourced from pyparsing's releases.

pyparsing 3.0.9

Added Unicode set BasicMultilingualPlane (may also be referenced as BMP) representing the Basic Multilingual Plane (Unicode characters up to code point 65535). Can be used to parse most language characters, but omits emojis, wingdings, etc. Raised in discussion with Dave Tapley (issue #392).

To address mypy confusion of pyparsing.Optional and ty...

#

Bumps flake8-bugbear from 22.4.25 to 22.7.1.

Release notes
Sourced from flake8-bugbear's releases.

22.7.1

Implement late-binding loop check (#265)

late-binding closures are a classic gotcha.

22.6.22

Don't crash when select / extend_select are None (#261)

Unlocks new flake8 release - Thanks @โ€‹asottile

Ignore lambda arguments for B020 (#259)
Fix missing space typos in B021, B022 error messages (#257)

Commits

f68a235 Update version + Cha...

#

Bumps setuptools from 62.1.0 to 63.2.0.

Release notes
Sourced from setuptools's releases.

v63.2.0
No release notes provided.
v63.1.0
No release notes provided.
v63.0.0
No release notes provided.
v63.0.0b1
This is a beta release including PEP 660 functionality.
Summary

Implement PEP 660 allowing both "strict" and "lax/loose" approaches, pypa/setuptools#3265
Handle config_settings as they would be passed by pip, pypa/setuptools#3380
U...

#

Bumps pytest-asyncio from 0.18.3 to 0.19.0.

Release notes
Sourced from pytest-asyncio's releases.

pytest-asyncio 0.19.0

title: 'pytest-asyncio: pytest support for asyncio'

pytest-asyncio is an Apache2 licensed library, written in Python, for
testing asyncio code with pytest.
asyncio code is usually written in the form of coroutines, which makes
it slightly more difficult to test using normal testing tools.
pytest-asyncio provides useful ...

unique wren
#

Busy bots

unique wren
#

What a battle

stuck aurora
#

nice!

#

I was gonna try to review this week sometime, but you don't have to wait for me

unique wren
#

It was harder cause I extracted most of the simple API stuff into a new simple.py module

#

and wanted high testing naturally

#

Would love a second eye over it, which I don't get often on bandersnatcho

#

Guess I should add to the docs too ... Will do that tomorrow. Now I go get drunk.

#

bandersnatch does not exist no HTML tho with this diff ... ๐Ÿ˜

#

So I'll open an issue for that once we merge this to fix

narrow grailBOT
narrow grailBOT
unique wren
#

So I donโ€™t spam others. @vale swan I cut this release so I can merge tomorrow or Monday my 6.0.0 pre release for bandersnatch. This is such a large change I might do my first ever alpha release

vale swan
#

Hmm I did want to review it, but I don't think I'll be able to do that in a day ๐Ÿ˜…

#

I haven't even kept up the related PEPs so I'd have to catch up on those first and then review your PR

unique wren
#

Thatโ€™s all cool. Others attached are most in the know but they rarely review

#

Some co authored the PEP with me

#

/ wrote most of it

#

Donald has been rad with it all

#

I need to do the banderx diff after merging this to test serving the new json files etc.

#

Then once thatโ€™s done itโ€™s release - then work on getting the xmlrpc calls bandersnatch does replaced - we have ideas for that ๐Ÿ™‚

#

I also want to hassle again updating PyPIโ€™s bandersnatch โ€ฆ once this is all done.

teal moss
#

does bandersnatch (or someone know of a mirror which) support lazy mirroring? When a client asks bandersnatch for a package and it does not have it, bandersnatch will check pypi and download the file before providing it to the client?

unique wren
#

Devpi

teal moss
#

ty

unique wren
narrow grailBOT
vale swan
#

the problem with the coverage bot is that it updates the comment as coverage data from all of the various jobs roll in

#

the GH email is sent with coverage data from only one or two jobs, additional data is not reflected in the email

#

and thanks to python version and OS specific code paths, until all jobs have uploaded their coverage data, the comment is effectively useless

#

I wonder if this would help

unique wren
#

Thanks for finding the N builds. Could be a good hack. But I hate how if we change number of builds how we keep that up to date

#

Another human tweakable to be forgotten about โ€ฆ

vale swan
#

hmmm, I wonder if ${{ strategy.job-total }} would work

#

wait no

#

codecov wants N builds in a file

unique wren
#

We would have to combine jobs into 1 yaml like you did with black first I feel to get a correct total too

vale swan
#

oh yeaa I forgot CI is separated too

unique wren
#

Which my head likes for simplicity โ€ฆ

#

But I could live with it if it helps this ...

#

I was pretty proud to get a ~4% coverage increase with my last PR โค๏ธ

#

Old man can still do some code every now and then

teal moss
#

the text in the first screenshot still applies to the config applied in the second

unique wren
#

I get that, but still, if we change CI job counts in 6+ months I'm going to forget this potentially ... just trying to see if there is a way to have some level of adapting here etc. ... e.g. last year we went from 3.6+ to 3.8+ and the amount of CI jobs ran dropped drastically.

teal moss
#

ah

narrow grailBOT
#

Bumps botocore from 1.27.37 to 1.27.42.

Changelog
Sourced from botocore's changelog.

1.27.42

bugfix:TraceId: Rollback bugfix for obeying _X_AMZN_TRACE_ID env var

1.27.41

bugfix:Config: Obey _X_AMZN_TRACE_ID environment variable instead of _X_AMZ_TRACE_ID
api-change:ec2: Documentation updates for Amazon EC2.
api-change:fsx: Documentation updates for Amazon FSx
api-change:shield: AWS Shield Advanced now supports filtering for ListProtections and ListProt...

#

Bumps flake8 from 4.0.1 to 5.0.1.

Commits

405cfe0 Release 5.0.1
d20bb97 Merge pull request #1631 from PyCQA/dupe-sys-path
fce93b9 prevent duplicate plugin discovery on misconfigured pythons
3f4872a Merge pull request #1628 from mxr/patch-1
b0cad55 Remove needless sort in _style_guide_for
c7c6218 Release 5.0.0
a826649 Merge pull request #1626 from PyCQA/pycodestyle-2-9
7838f11 upgrade pycodestyle to 2.9.x
66b3211 Merge pull request #1625 from PyCQA/upgrade-...

#

Bumps urllib3 from 1.26.10 to 1.26.11.

Release notes
Sourced from urllib3's releases.

1.26.11
If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors.
:warning: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

Fixed an issue where reading more than 2 GiB in a call to HTTPResponse.read would raise an OverflowError on Python 3.9 and earlier.

Changelog
Sourced from urllib3's changelog.

1.26.11 ...

narrow grailBOT
#

Update attrs from 21.4.0 to 22.1.0.

Changelog

22.1.0

-------------------

Backwards-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Python 2.7 is not supported anymore.

Dealing with Python 2.7 tooling has become too difficult for a volunteer-run project.

We have supported Python 2 more than 2 years after it was officially discontinued and feel that we have paid our dues.
All version up to 21.4.0 from...
lone oriole
#

Alright, I'm going to just guess what I"m doing is a user error but for the life of me I can't seemed to figure out why Bandersnatch is not syncing all packages.

#

I am trying to create a complete offline pip repo and it seems like it is working but of course, out of thousands of packages that are online, two are not being updated. specically pip, and falcon

#

I see their names and others in the todo file but it never downloads it

#

I try bandersnatch sync falcon and nothing

#

I have ran mirror --force-check and now I am running verify which I can assume will take a really long time

#

The only plugin I have enabled is `[plugins]
enabled =
size_project_metadata

[size_project_metadata]
max_package_size = 100M
`

#

everything else is default bandersnatch 5.2.0

#

what could cause bandersnatch to just ignore a package when you specifically type bandersnatch sync falcon?

#

--debug doesn't really shed any light afaiks

unique wren
#

Please open an issue and post your full config and โ€”debug output from the sync for me to look at and Iโ€™ll try repro.

narrow grailBOT
#

I want to begin with, I'm pretty sure this is a user error thing but can't figure out what I'm doing wrong on this. It is not obvious whatever is causing it and bandersnatch is not very helpful in identifying the issue. Thanks in advance for any support to fix this. I have been screwing with this for over 2 weeks now and almost done with all of this.

I am trying to create a complete offline pip repo and it seems like it is working but of course, out of thousands of packages that are on...

lone oriole
#

Well, that is pretty cool โซ

#

not the issue, the automation. ๐Ÿ™‚

unique wren
#

๐Ÿ™‚ Will try look over the weekend

#

I'm all about working smarter, not harder

#

I don't even run bandersnatch anywhere anymore ๐Ÿ˜ฆ

#

I've been wanting to update PyPI's instance, but have never been give the go ahead (more so cause I wanted to test instance before doing the prod one)

#

@vale swan How do I set reminders here?

#

I've seen you do it

unique wren
vale swan
#

You could just set a reminder in #bot-commands in the PyDis server, it's meant for command spam

unique wren
#

Sounds to hard - I'll just put it in my calendar

#

But thanks

lone oriole
#

Is there a more reliable way you recommend to limit those extremely large pip packages?

#

So of the cern and nueral net pip packages are several hundred MB each. To compound the problem, some of the worst ones post nightly builds

unique wren
#

Yeah, I plan to do an allowlist for falon and pip and use everything else from your config changing the base directory obviously

lone oriole
#

Yeah, kinda figure since you said this weekend.

lone oriole
#

bandersnatch took 1.5 weeks with a gigabit downlink. ๐Ÿ˜›

unique wren
#

It's 12.7t

#

(I added this)

#

I wrote that to generate said config

#

I've used that before

#

pip install git+https://github.com/cooperlees/pypistats.git should work

#

But as you can see, i haven't touched the code in a long time

#
tf-nightly    682.6 GB

In the mid 2010's - This was the total size of pypi

tropic fossil
#

I wonder how many packages could be removed

unique wren
#

People are against removing anything

#

But a lot could and no one would care. But that's more on package maintainers to help control

tropic fossil
#

hoarders

unique wren
#

Python just does not want left pad like outcomes

tropic fossil
#

I mean, 13TB is not that much... but still...

unique wren
#

If you don't know what that is - A javascript library dev deleted his library in rage and caused lots of pain.

tropic fossil
#

Heard about it

#

but JS package ecosystem is much more messy than Python (mostly because of almost non-existent standard library)

stuck aurora
#

fundamentally PyPI can only grow in size unless people remove old releases

#

but PyPI is useful as an archive

tropic fossil
#

well, I wonder how many packages for python < 2.7 are still there

unique wren
#

Lots.

#

There is a metadata plugin that could filter based on that for bandersnatch

#

But, relies on accurate metadata that's not enforced / autogenerated from automation

teal moss
narrow grailBOT
#

Bumps mypy from 0.950 to 0.971.

Commits

1f08cf4 Update version to 0.971
61c0064 Add back workaround to avoid confusing mypy.types and types in pyinfo (#13176)
d8d900c Update version to 0.971+dev
72fa325 Update version to 0.970
2132036 Handle cwd correctly in pyinfo (#13161) (#13162)
ee10d29 flush keepalives on operator assignment statements (#13144) (#13151)
88c1b85 [mypyc] Add LoadAddress op for PyFloat_Type & PyTuple_Type (#13078) (#13150)
d06dcf0 [0....

#

Bumps coverage from 6.3.2 to 6.4.3.

Changelog
Sourced from coverage's changelog.

Version 6.4.3 โ€” 2022-08-06

Fix a failure when combining data files if the file names contained
glob-like patterns (pull 1405_). Thanks, Michael Krebs and Benjamin
Schubert.

Fix a messaging failure when combining Windows data files on a different
drive than the current directory. (pull 1430, fixing issue 1428).
Thanks, Lorenzo Micรฒ.

Fix path calculations when runnin...

#

Bumps boto3 from 1.24.36 to 1.24.46.

Changelog
Sourced from boto3's changelog.

1.24.46

enhancement:Lambda: [botocore] Add support for Trace ID in Lambda environments
api-change:chime-sdk-meetings: [botocore] Adds support for Tags on Amazon Chime SDK WebRTC sessions
api-change:config: [botocore] Add resourceType enums for Athena, GlobalAccelerator, Detective and EC2 types
api-change:dms: [botocore] Documentation updates for Database Migration Service (DMS).
...

narrow grailBOT
narrow grailBOT
#

Bumps requests from 2.27.1 to 2.28.1.

Release notes
Sourced from requests's releases.

v2.28.1
2.28.1 (2022-06-29)
Improvements

Speed optimization in iter_content with transition to yield from. (#6170)

Dependencies

Added support for chardet 5.0.0 (#6179)
Added support for charset-normalizer 2.1.0 (#6169)

New Contributors

@โ€‹hswong3i made their first contribution in psf/requests#6179
@โ€‹frenzymadness made their first contribution in psf/requests#6169

Ful...

narrow grailBOT
#

Bumps sphinx-argparse-cli from 1.8.3 to 1.10.0.

Release notes
Sourced from sphinx-argparse-cli's releases.

1.10.0
What's Changed

[pre-commit.ci] pre-commit autoupdate by @โ€‹pre-commit-ci in tox-dev/sphinx-argparse-cli#51
[pre-commit.ci] pre-commit autoupdate by @โ€‹pre-commit-ci in tox-dev/sphinx-argparse-cli#52
[pre-commit.ci] pre-commit autoupdate by @โ€‹pre-commit-ci in tox-dev/sphinx-argparse-cli#53
Bump dependencies and build tools by @โ€‹gab...

#

Bumps flake8 from 5.0.2 to 5.0.4.

Commits

6027577 Release 5.0.4
213e006 Merge pull request #1653 from asottile/lower-bound-importlib-metadata
e94ee2b require sufficiently new importlib-metadata
318a86a Merge pull request #1646 from televi/main
7b8b374 Clarify entry point naming
7160561 Merge pull request #1649 from PyCQA/pre-commit-ci-update-config
84d56a8 [pre-commit.ci] pre-commit autoupdate
ff6569b Release 5.0.3
e76b59a Merge pull request #1648 from PyC...

#

Bumps setuptools from 63.2.0 to 65.0.0.

Changelog
Sourced from setuptools's changelog.

v65.0.0
Breaking Changes
^^^^^^^^^^^^^^^^

#3505: Removed 'msvccompiler' and 'msvc9compiler' modules from distutils.
#3521: Remove bdist_msi and bdist_wininst commands, which have been deprecated since Python 3.9. Use older Setuptools for these behaviors if needed.

Documentation changes
^^^^^^^^^^^^^^^^^^^^^

#3519: Changed the note in keywords documentation regardin...

narrow grailBOT
#

Bumps freezegun from 1.2.1 to 1.2.2.

Changelog
Sourced from freezegun's changelog.

1.2.2

Removes Python 3.6 support, which reached its EOL on 2021-12-23 (https://devguide.python.org/versions/?highlight=End-of-life#unsupported-versions).

Improved static typing definitions

Don't freeze pytest timings. This avoids class-level decorator usage messing with pytest timings.

Pass through all setUp and tearDown arguments

Commits

See full diff in c...

vale swan
#

dependabot pls no >.>

vale swan
#

my inbox ๐Ÿ˜ญ

exotic tiger
#

anyone know why bandersnatch might be missing packages which are below the max_package_size i have set? if i add the project to the allowlist and run a sync on it, it will then download. it does not seem to be included in my nightly mirror run

narrow grailBOT
narrow grailBOT
unique wren
unique wren
exotic tiger
#

yeah that does seem to be what i'm seeing

unique wren
#

So I misunderstood it, seems it sums the package size โ€ฆ not the individual release sizes โ€ฆ

exotic tiger
#

That explains why adding it to the exceptions list worked.

narrow grailBOT
#

Bumps smart-open from 6.0.0 to 6.1.0.

Release notes
Sourced from smart-open's releases.

v6.1.0
6.1.0, 21 August 2022

Add cert parameter to http transport params (PR #703, @โ€‹stev-0)
Allow passing additional kwargs for Azure writes (PR #702, @โ€‹ddelange)

Changelog
Sourced from smart-open's changelog.

6.1.0, 21 August 2022

Add cert parameter to http transport params (PR #703, @โ€‹stev-0)
Allow passing additional kwargs for Azure writes (PR #702, @...

#

Bumps boto3 from 1.24.46 to 1.24.56.

Changelog
Sourced from boto3's changelog.

1.24.56

api-change:connect: [botocore] This release adds SearchSecurityProfiles API which can be used to search for Security Profile resources within a Connect Instance.
api-change:ivschat: [botocore] Documentation Change for IVS Chat API Reference - Doc-only update to change text/description for tags field.
api-change:kendra: [botocore] This release adds support for a new authen...

#

Bumps chardet from 4.0.0 to 5.0.0.

Release notes
Sourced from chardet's releases.

chardet 5.0.0
โš ๏ธ This release is the first release of chardet that no longer supports Python < 3.6 โš ๏ธ
In addition to that change, it features the following user-facing changes:

Added a prober for Johab Korean (#207, @โ€‹grizlupo)
Added a prober for UTF-16/32 BE/LE (#109, #206, @โ€‹jpz)
Added test data for Croatian, Czech, Hungarian, Polish, Slovak, Slovene, Greek, and Turk...

#

Bumps filelock from 3.7.1 to 3.8.0.

Release notes
Sourced from filelock's releases.

3.8.0
What's Changed

[pre-commit.ci] pre-commit autoupdate by @โ€‹pre-commit-ci in tox-dev/py-filelock#149
Bump actions/upload-artifact from 2 to 3 by @โ€‹dependabot in tox-dev/py-filelock#154
Bump actions/download-artifact from 2 to 3 by @โ€‹dependabot in tox-dev/py-filelock#152
Bump pre-commit/action from 2.0.3 to 3.0.0 by @โ€‹dependabot in tox-dev/py-filelock#151
Bump ac...

narrow grailBOT
#

Bumps attrs from 21.4.0 to 22.1.0.

Release notes
Sourced from attrs's releases.

22.1.0
Highlights
The main features of this release are:

The departure of Python 2.7 (enjoy your retirement!),
and the arrival of Python 3.11.

We had loftier goals feature-wise, but didn't want to block others embracing Python 3.11.
โค๏ธ Huge thanks to my GitHub sponsors, Tidelift subscribers, and Ko-fi buyers! โค๏ธ
None of my projects would exist in their current form with...

unique wren
#

Wow - I just got an email about a failure with Azure CI

#

I haven't cared about bandersnatch CI there for years. I wonder what I've forgot to remove

#

I added it way back when to get Windows CI when someone wanted support ...

#

But removed (I thought) when GitHub actions gave us Windows

narrow grailBOT
narrow grailBOT
narrow grailBOT
#

Bumps pre-commit from 2.18.1 to 2.20.0.

Release notes
Sourced from pre-commit's releases.

pre-commit v2.20.0
Features

Expose source and object-name (positional args) of prepare-commit-msg hook as PRE_COMMIT_COMIT_MSG_SOURCE and PRE_COMMIT_COMMIT_OBJECT_NAME.

#2407 PR by @โ€‹M-Whitaker.
#2406 issue by @โ€‹M-Whitaker.

Fixes

Fix language: ruby installs when --user-install is set in gemrc.

#2394 PR by @โ€‹narpfel.
#2393 issue by @โ€‹narpfel.

Adjust p...

#

Bumps botocore from 1.27.56 to 1.27.61.

Changelog
Sourced from botocore's changelog.

1.27.61

api-change:mediapackage: This release adds Ads AdTriggers and AdsOnDeliveryRestrictions to describe calls for CMAF endpoints on MediaPackage.
api-change:rds: Removes support for RDS Custom from DBInstanceClass in ModifyDBInstance

1.27.60

enhancement:Identity: TokenProvider added for bearer auth support
api-change:elbv2: Update elbv2 client to latest version
api...

#

Bumps tox from 3.25.0 to 3.25.1.

Release notes
Sourced from tox's releases.

3.25.1
What's Changed

release 3.25.0 by @โ€‹gaborbernat in tox-dev/tox#2398
[pre-commit.ci] pre-commit autoupdate by @โ€‹pre-commit-ci in tox-dev/tox#2399
Adding APPDATA as default passenv on Windows by @โ€‹niander in tox-dev/tox#2404
[pre-commit.ci] pre-commit autoupdate by @โ€‹pre-commit-ci in tox-dev/tox#2415
Avoid importing pipes on Python 3.3+ by @โ€‹adamchainz in tox-dev/tox#2418
Fix l...

narrow grailBOT
#

Bumps boto3 from 1.24.56 to 1.24.62.

Changelog
Sourced from boto3's changelog.

1.24.62

api-change:fsx: [botocore] Documentation updates for Amazon FSx for NetApp ONTAP.
api-change:voice-id: [botocore] Amazon Connect Voice ID now detects voice spoofing. When a prospective fraudster tries to spoof caller audio using audio playback or synthesized speech, Voice ID will return a risk score and outcome to indicate the how likely it is that the voice is spoofed.
...

#

Bumps botocore from 1.27.56 to 1.27.62.

Changelog
Sourced from botocore's changelog.

1.27.62

api-change:fsx: Documentation updates for Amazon FSx for NetApp ONTAP.
api-change:voice-id: Amazon Connect Voice ID now detects voice spoofing. When a prospective fraudster tries to spoof caller audio using audio playback or synthesized speech, Voice ID will return a risk score and outcome to indicate the how likely it is that the voice is spoofed.

1.27.61

api...

narrow grailBOT
#

Bumps boto3 from 1.24.56 to 1.24.63.

Changelog
Sourced from boto3's changelog.

1.24.63

enhancement:Endpoints: [botocore] Deprecate SSL common name
api-change:greengrassv2: [botocore] Adds topologyFilter to ListInstalledComponentsRequest which allows filtration of components by ROOT or ALL (including root and dependency components). Adds lastStatusChangeTimestamp to ListInstalledComponents response to show the last time a component changed state on a device....

#

Bumps botocore from 1.27.56 to 1.27.63.

Changelog
Sourced from botocore's changelog.

1.27.63

enhancement:Endpoints: Deprecate SSL common name
api-change:greengrassv2: Adds topologyFilter to ListInstalledComponentsRequest which allows filtration of components by ROOT or ALL (including root and dependency components). Adds lastStatusChangeTimestamp to ListInstalledComponents response to show the last time a component changed state on a device.
api-change:i...

narrow grailBOT
unique wren
#

6.0.0 go time

narrow grailBOT
narrow grailBOT
#

when I was running "bandersnatch sync uselesscapitalquiz" I got this error "OSError: [Errno 36] File name too long".
After some research ,It seems that the full path+filename have pass over the max-filename of the linux system which is 255bits.

This situation happens in bandersnatch 4.4/5.3 and 6.0,please help me solve this problems,thanks a lot .

[root@VM_21_104_centos /data/home/bandersnatch]# **bandersnatch sync uselesscapitalquiz**
2022-09-04 11:05:36,838 INFO: Selected stora...
narrow grailBOT
narrow grailBOT
#

Bumps coverage from 6.4.3 to 6.4.4.

Changelog
Sourced from coverage's changelog.

Version 6.4.4 โ€” 2022-08-16

Wheels are now provided for Python 3.11.

.. _changes_6-4-3:

Commits

24985c0 docs: sample html report
12d5d17 build: prep for 6.4.4
007c616 build: update 3.11 references to rc1
66ddb0b build: make upgrade (with hashes)
f7907ee docs: add some make upgrade instructions to the Makefile
18b57e1 build: use hashed pins
1dba030 build: pin windows-...

#

Bumps boto3 from 1.24.63 to 1.24.66.

Changelog
Sourced from boto3's changelog.

1.24.66

api-change:cognito-idp: [botocore] This release adds a new "AuthSessionValidity" field to the UserPoolClient in Cognito. Application admins can configure this value for their users' authentication duration, which is currently fixed at 3 minutes, up to 15 minutes. Setting this field will also apply to the SMS MFA authentication flow.
api-change:connect: [botocore...

#

Bumps flake8-bugbear from 22.7.1 to 22.8.23.

Release notes
Sourced from flake8-bugbear's releases.

22.8.23

Add B024 error code to message for B024 (#276)

22.8.22

Add B024: abstract base class with no abstract methods (#273)

Commits

bc46cb5 Update version + Change Log for 22.8.23 release
7d1adf9 Add missing error code to message for B024 (#276)
1007f5c Update version + Change Log for 22.8.22 release
881f054 Merge pull request #274 from jakkd...

narrow grailBOT
#

for example ,I already have some version of tensorflow/torch on my localdisk.

but when I want to update it and run "bandersnatch sync torch",I got this log:

bandersnatch sync torch
2022-09-06 13:31:25,529 INFO: Selected storage backend: filesystem
2022-09-06 13:31:25,739 ERROR: Unable to load entry point swift_plugin = bandersnatch_storage_plugins.swift:SwiftStorage: No module named 'keystoneauth1'
2022-09-06 13:31:25,822 INFO: Initialized project plugin blocklist_project, filtering [...

unique wren
#

Damn - We got to many dependencies ... haha

#

I stopped the spam coming here

narrow grailBOT
#

When I look in to bandersnatch log I see some "Unauthorized error" and "error when attempting to clear the cache" and "xxx package not updating. Giving up" .
Could your please tell me why and help me solve them?

I'm using bandersnatch 6.0.0 and logs are below:

2022-09-22 20:49:21,090 bandersnatch.package: INFO Fetching metadata for package: tencentcloud-sdk-python-cynosdb (serial 15172235)
2022-09-22 20:49:21,146 bandersnatch.master: WARNING Got an error when attempting to ...
narrow grailBOT
chilly stirrup
#

lol, that package looks great on PyPI

unique wren
#

Does PEP440 even talk about decimal places?

#

Surprised Google Cloud's bucket thing accepts names that long

tropic fossil
#

I was hoping for version = math.pi, but it's just a hardcoded value ๐Ÿ˜ฆ

snow sparrow
#

Version is a string so thereโ€™s no no notion of decimal places (but arguably there should be a character count limit?)

unique wren
#

Ya, thatโ€™s good start ๐Ÿ™‚

narrow grailBOT
narrow grailBOT
#

When I look into my banderlogfile, I saw a lot of "ERROR Stale serial for xxxxx (nnnnnn) not updating. Giving up."
It seems that many package have gave up updating ,how can I deal with this packages? Are they give up "fow now" or "forever"?
For now I have already "bandersnatch sync xxx xxx xxxx" manuelly but which is the better way to make them update automatically?

I am using bandersntach 6.0.0 on "docker pull image: pypa/bandersnatch"

LOG1:

/yum/pip/banderlogfile.log.2022-10-0...
narrow grailBOT
#

Hello, Iโ€™m new to bandersnatch and pypi mirrors. I tried to run a mirror last night and ended up stopping it at about 1TB of downloading. I didnโ€™t realize it was that large.

Are there any predefined lists of most commonly used plugins?

I also only need Linux plugins. No windows. So I could remove those too?

narrow grailBOT
#

Description

I want to mirror only a handful of packages with bandersnatch. To achieve this I use a docker-compose file which loads the preset configuration as shown below. After issuing the command below I get a couple of traces of different nature:

  • ERROR: Continuing to next file after error downloading -> (sounds like files cannot be found on the server side)
  • ERROR: Error syncing package: fastapi@15646760 (mirror.py:377) -> (sounds like files are already present)

Is this expe...

narrow grailBOT
#

Could you tell me how to remove official removed packages automatically?

for example : https://pypi.org/project/apicolors/

the apicolors are deleted by pypi.org 4 days ago(Nov 9), but after my bandersnatch server synced it locally,It exist till now (Nov 11).๏ผˆbut my sync interval is 30min๏ผ‰

here is the bander.log:

2022-11-06 10:21:15,841 bandersnatch.package: INFO Fetching metadata for package: apicolors (serial 15671340)2022-11-06 10:21:15,966 bandersnatch.mirror: INFO Down...
narrow grailBOT
#

Hi all! I'm trying to create a PyPI mirror for offline usage. For what I need, I don't want any of the really large packages (i.e. the AI/ML stuff). However, I'm having a hard time figuring out the correct way to filter that out. So a few questions:

  1. Is the following configuration section (I found in another issue), explicitly allowing or forbidding the regex patterns?
[regex_project_metadata]
none:match-null:info.name =
  ^tf
  ^mxnet
  ^tensorflow
  ^cupy
  \-nightly$...
narrow grailBOT
#

I had a PyPI mirror that hadn't ever had a run of verify --delete, so had grown to around 25 TB. Initially trying to run verify --delete was exhausting all of my machine's memory. It only had 8 GB of RAM, but still, the algorithm should be able to delete during the run (and therefore using a relatively constant amount of memory regardless of the number of deletions needed) rather than building a list in memory and deleting everything at the end.

I was able to get verify --delete to f...

exotic tiger
#

hey folks, i'm running a nightly bandersnatch mirror but i'm noticing packages are not being updated. it is writing a diff file which does usually include some updates but obviously there are others that its missing. any idea what could be causing this?

#

i do have exclude_platform and site_project_metadata plugins enabled but neither should be excluding the most recent package i've noticed is more than a year out of date

unique wren
#

Yeah not sure off the top of my head. Would have to see a paste of your logs to take an educated guess

#

Want to paste it?

exotic tiger
#

Logs were unfortunately not being preserved since Iโ€™m running this from a container. I fixed that and started a mirror force check. The manual mirror runs I did before that would sync up a few packages at a time but it kept missing the one particular one I knew was out of date. Iโ€™ll have to check again once this current mirror sync completes.

exotic tiger
#

well a full mirror definitely picked up the missing package updates. the incremental mirrors every 24 hours seem to pick up a lot more updates too. does the mirror command check for updated serials only for the packages listed in the global index?

round heron
#

I use bandersnatch with happyness for more than a year. In the last months I tried to contribute by adding some features interesting for my setup, which enables requirements file search from a folder with the glob feature. My setup is docker based, I made my own docker compose file with nginx to serve the packages and a small ftp server to upload new requirements file in the requirements folder. I do this to speed up the automated tests in CI/CD in my company, where the runners get the packages locally instead to retrieve them from Pypi.
I wanted to change the ftp server in a custom tornado server, which only supports a simple endopoint for the upload of requirements files, to avoid to open several ports on the networks for the ftp support. Could it be an interesting feature to add to the repo and share it along with the docker compose file, or it would be better if I implement it in a separate repo?

unique wren
#

Feels separate. I don't get why a requirements file in your projects repos does not work ...

unique wren
round heron
unique wren
#

So you upload the requirements file and use the bandersnatch requirements file plugin to download all the packages?

round heron
#

yes, since the whole pypi archive is around 10 TB, and in our company we use a relatively small amount of packages, I thought this would be a nice and scalable approach to sync only the needed packages, but not limit this list to a static one.

#

This is why I needed the glob in the requirements file list...

round heron
#

Just an update, yesterday I had a try with the tornado web server, for the moment is a private repo, but the idea is to make it public as soon as it starts working properly.
The server works properly, nginx has a location to redirect the traffic to tornado and everything goes smoothly on this way, but I noticed something strange.
But I noticed an issue on bandersnatch, not sure if it was there before and how to better test it. If I add a new requirements file after the first sync of bandersnatch, it is registered by allowlist_name.py:114, the package list is registered by allowlist_name.py:31, with the new packages, but they are never downloaded.

#

I will do some more test with a shorted package list and, in case, open an issue which could be easily replicated

narrow grailBOT
#

I'm doing some tests to upload new requirements files to the bandersnatch container and I noticed the strange behaviour of not downloading the packages of a requirements file added ater the first synchronization of packages.

I tried to do an easily repeatable test.

Append this to the default config of bandernatch:

[plugins]
enabled =
    project_requirements

[allowlist]
requirements_path = /home/francesco/bandersnatch_requirements/
requirements =
    *requirements*.txt
``...
narrow grailBOT
#

Build pypi/todo after running the โ€œbandersnatch mirror โ€ for the first time. The tool only synchronizes pypi/todo each time, and the tool does not update the pypi/todo file, so no new data can be synchronized.
Log:
`2022-12-06 17:41:37,688 bandersnatch.main: INFO No status file to move (/srv/pypi/status) - Full sync will occur
2022-12-06 17:41:37,689 bandersnatch: INFO Selected storage backend: filesystem
2022-12-06 17:41:37,689 bandersnatch: INFO Selected compare method: stat
2022-12-06...

narrow grailBOT
unique wren
#

Thatโ€™s a tough one. Do people think a parallel json metadata file reader and stat each file could be cheaper? I donโ€™t know what โ€˜duโ€™ does under the covers โ€ฆ

narrow grailBOT
#

CI has shown (with tox needing new versions) that we will need some refactors to move to the new 22.0 versions of packaging.

PR: https://github.com/pypa/bandersnatch/pull/1309/files

Example error:

==================================== ERRORS ====================================
____ ERROR collecting src/bandersnatch/tests/plugins/test_latest_release.py ____
ImportError while importing test module '/home/runner/work/bandersnatch/bandersnatch/src/bandersnatch/tests/plugins/test_lat...
narrow grailBOT
unique wren
#

Damn, s3path needs 3.11 support ๐Ÿ˜ ... Decent refactor but prob worth it to make tests pass minus s3 ... should probably isolate storage plugins tests more vs. core bandersnatch filesystem support

#

But that's probably going to be another day.

narrow grailBOT
#

In https://github.com/pypa/bandersnatch/pull/57, we added code to automatically issue PURGE requests to stale endpoints. This was to work around a persistent issue w/ PyPI where caches become routinely stale and unusable. This hack worked for a good while, but now PyPI requires authentication for PURGE requests, flooding the logs with useless 401 errors.

โฏ curl -X PURGE -i https://pypi.org/pypi/alchemize/json
HTTP/2 401 
server: Varnish
retry-after: 0
content-type: application/jso...
unique wren
#

Would have been quicker to do the PR ... haha

#

So I did it finally

#

Guess I should do a release once I merge this

vale swan
#

I'll take a look soon

vale swan
#

"soon" turned into almost an hour because of continued discussion in #hatch ๐Ÿ˜…

unique wren
#

No worries, I'm in no hurry

#

It's hard to stay motivated in a project you don't use at all and haven't for years

#

Wish someone would take it over ๐Ÿ˜ฆ

vale swan
#

I'm in the same boat, I don't use bandersnatch either

unique wren
#

I'd be more motivated if I could update the PyPI install + move it to use the s3 plugin but I've never been able to get a test instance + s3 bucket

vale swan
#

PyPI is still on v4, right?

unique wren
#

Something super old

#

in a big fat POSIX network mount costing a lot of PSF amazon credits ๐Ÿ˜ฆ

vale swan
#

IIRC I remember reading something about PyPI dropping their bandersnatch mirror? I might be totally misremembering though.

unique wren
#

Ya, started that discussion but couldn't even get a response on if that's the plan or not

#

I've not had good success with trying to help PyPA / PyPI in my life ๐Ÿ˜ฆ

#
ec2-user@mirror.dub1.pypi.io: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

I don't haz access anymore to see what it's running it seems too

vale swan
#

We're maintaining legacy software now ๐Ÿ˜ฆ

unique wren
#

A lot of people around the world seem to use it

#

Especially the 3rd world

#

With poor internet

vale swan
#

well mostly you, but I digress

vale swan
#

it's not nearly as "cool" or "critically important" as something like black or pip so it gets less attention

#

not saying that's a bad thing (it's an infra project), but just an observation

unique wren
#

Or controversial

#

And kinda just works

vale swan
#

set up once and forget about it until PyPI changes something or bugs out

vale swan
#

that stale response issue on warehouse hasn't seen activity in ages

unique wren
#

Nope. Most things bandersnatch related get that kinda of attention

unique wren
#

The docker container has over 200k downloads ... way more popular than pypi

raven knoll
#

Hi, I am researching on the use of _last-serial of the JSON rest api for incremental synchronizations, I see it is used on bandersnatch but I am unable to understand that serial generation logic/scope, did not find any spec mentioning it, there is an index _last-serial and per package _last_serial are they related to a global serial that is incremented at each update ?

narrow grailBOT
#

https://github.com/pypa/bandersnatch/blob/16137fd3861dd41cd34c060989140edeb00f8e43/src/bandersnatch/simple.py#L78-L89

The function shown above generate a package list for the global indexes i.e. /web/simple/index{.html,_v1.html,_v1.json}.

According to the pathlib.Path.glob document:

Note: Using the โ€œ**โ€ pattern in large directory trees may consume an inordinate amount of time.

This function is extremely slow (...

unique wren
#

1337

vale swan
unique wren
#

O missed this. I reviewed etc. - cheers tho.

vale swan
#

looks okay on a desk check

#

one of the tests seems more verbose than needed but it works

#

@unique wren Protocols are like ABCs but you don't need to actually inherit from them. As long as the object implements the interface (ie. methods, properties and maybe attributes?) of the Protocol, it's compatible. It's duck typing enforced by static type checkers.

#

Requiring Python 3.10+ later in the year seems a bit aggressive IMHO, but I don't know any user so take this as an uninformed opinion based on norms than anything quantitative :)

unique wren
vale swan
#

Right.

unique wren
#

Iโ€™m aggressive. If people donโ€™t like it they can run the project ๐Ÿ™‚

vale swan
#

I keep forgetting about that

#

TBH I haven't written any 3.10 code ๐Ÿ˜…

#

What's even new in 3.9/10? I don't remember

tropic fossil
#

pattern matching

tropic fossil
vale swan
#

yup

#

I think mypyc still supports Python 3.5 (although mypy itself is 3.7+ so not sure how that works, perhaps mypy still supports checking 3.5+? wait it stills supports checking Python 2 code, of course it can check 3.5...)

tropic fossil
#

I feel you... stuck on 3.7-compatible coding myself

vale swan
#

All I want is Python 3.8+. I was sad with the amount of times I could've used the wulrus operator yesterday :(

tropic fossil
#

yeah, but keep up hope, it's only 6 months till 3.7 EOL

vale swan
#

ah yes, | as Union is a 3.10 feature

unique wren
#

I also feel if people want to use old python they can also use old versions of libraries etc.

#

No one is forcing them to upgrade bandersnatch etc.

chilly stirrup
tropic fossil
#

Does mypy support Self? I remember there was some delay on it

chilly stirrup
#

The author of the PEP implemented it in mypy so probably

#

pyright definitely did

tropic fossil
#

The PR in mypy was merged day after latest release

snow sparrow
#

Also toml

torpid pivot
#

hello! can anyone help me understand the allowlist/blocklist plugins in the bandersnatch config

#

i want to mirror only a specific set of packages

#

i thought I could do something like:

[plugins]
enabled = allowlist_project

[allowlist]
packages = package1 package2 package3
#

but it just goes ahead and downloads everything

#

the documentation is unclear about how the different plugins interact

unique wren
#

Maybe new lines are needed? Havenโ€™t checked the code.

torpid pivot
#

oh, i will try with newlines, thanks for the hint

unique wren
#

If so, docs PR welcome.

torpid pivot
#

in that CI test, there is cleanup = true in the mirror configuration, what is this option?

unique wren
#

I can not recall, knowing me a typo. Iโ€™d have to grep the code to see if it does anything if itโ€™s not documented.

torpid pivot
#

can't see it in the docs. no matter, i'll have a look later

#

will try the newlines now

unique wren
#

I sadly donโ€™t use bandersnatch at all anymore and am stuck with it ๐Ÿ˜ฆ

torpid pivot
#

oh, no

#

i am trying to use it for a work-related thing, if it ends up in place, maybe we can help with maintenance

#

(we need a partial mirror of pypi internally because our CI doesn't have internet access)

unique wren
#

Remember to allowlist deps of deps. pip freeze is your friend.

#

You using docker container?

torpid pivot
#

yes

#

and yes, i guessed it wouldn't resolve deps for me

#

too complicated

unique wren
#

Could be done, but so error prone โ€ฆ

#

Even using pip / poetry libraries etc.

torpid pivot
#

Yep, it was the newlines

#

my bad, the docs consistently use that style, i just assumed it was whitespace-separated and only needed to list a few packages so put them on one line

unique wren
#

Welcome to add a validation check of param and error or update docs to help future people if you feel nice โ€ฆ would even accept white space if people want long lines I guess

torpid pivot
#

i'll make a note to hopefully come back and submit a PR either extra validation or making it more lenient

#

right now i have to complete the task at hand... getting a python CI job to work with this new mirror

unique wren
#

Another good selling point to your management - the mirror is DR if PyPI is down and you need to make a release โ€ฆ

#

Blows my mind how many companies donโ€™t archive their dependencies โ€ฆ

unique wren
#

(DR == disaster recovery)

torpid pivot
#

yeah, i'm familiar with DR, although most contexts where PyPI is down would probably not be a disaster

#

in that context it's not an easy sell to management; we don't write any python ourselves, just have a few dependencies written in python. we already discussed even eliminating those dependencies so that we don't need all this build infrastructure, but for now this is the easier approach

#

if we can't reach PyPI, we just can't update the version of those dependencies until it comes back up, not the end of the world

#

any idea what's going on here? i have an allowlist_release set, but it's downloading a random other collection of packages

#

lol wtf, i have to pay to send messages longer than 2000 characters?

#
2023-01-19 00:08:20,125 INFO: Selected storage backend: filesystem (configuration.py:131)
2023-01-19 00:08:20,126 INFO: Selected compare method: hash (configuration.py:177)
2023-01-19 00:08:20,310 INFO: Initialized release plugin allowlist_release, filtering [LIST_REDACTED] (allowlist_name.py:177)
2023-01-19 00:08:20,411 INFO: Syncing with https://pypi.org. (mirror.py:57)
2023-01-19 00:08:20,411 INFO: Current mirror serial: 16477978 (mirror.py:278)
2023-01-19 00:08:20,412 INFO: Syncing based on changelog. (mirror.py:301)
2023-01-19 00:08:21,410 INFO: No project filters are enabled. Skipping filtering (mirror.py:99)
2023-01-19 00:08:21,410 INFO: Trying to reach serial: 16478060 (mirror.py:310)
2023-01-19 00:08:21,410 INFO: 24 packages to sync. (mirror.py:312)
2023-01-19 00:08:21,410 INFO: No metadata filters are enabled. Skipping metadata filtering (mirror.py:76)
2023-01-19 00:08:21,410 INFO: Fetching metadata for package: arcanepython (serial 16477988) (package.py:58)
2023-01-19 00:08:21,411 INFO: Fetching metadata for package: arize-phoenix (serial 16478060) (package.py:58)
2023-01-19 00:08:21,412 INFO: Fetching metadata for package: b3fileparser (serial 16478000) (package.py:58)
2023-01-19 00:08:21,504 INFO: Storing index page(s): arcanepython - in /var/cache/pypi/web/simple/arcanepython (mirror.py:698)
2023-01-19 00:08:21,509 INFO: Storing index page(s): b3fileparser - in /var/cache/pypi/web/simple/b3fileparser (mirror.py:698)

[it continues with 21 other packages, none of which are listed in the allowlist]

#
LIST_REDACTED = <Requirement('aiosignal==1.3.1')>, <Requirement('attrs==22.2.0')>, <Requirement('colorama==0.4.6')>, <Requirement('bandersnatch==6.1.0')>, <Requirement('distro==1.5.0')>, <Requirement('cffi==1.15.1')>, <Requirement('pip==22.3.1')>, <Requirement('yarl==1.8.2')>, <Requirement('ruamel-yaml==0.17.21')>, <Requirement('python-socks==2.1.1')>, <Requirement('humanfriendly==10.0')>, <Requirement('packaging==23.0')>, <Requirement('wcwidth==0.2.6')>, <Requirement('docutils==0.19')>, <Requirement('lxml==4.9.2')>, <Requirement('jmespath==1.0.1')>, <Requirement('ruamel-yaml-clib==0.2.7')>, <Requirement('async-timeout==4.0.2')>, <Requirement('charset-normalizer==2.1.1')>, <Requirement('aiohttp-xmlrpc==1.5.0')>, <Requirement('cryptography==38.0.4')>, <Requirement('multidict==6.0.4')>, <Requirement('filelock==3.9.0')>, <Requirement('prompt-toolkit==3.0.28')>, <Requirement('awscrt==0.16.4')>, <Requirement('pycparser==2.21')>, <Requirement('aiohttp-socks==0.7.1')>, <Requirement('frozenlist==1.3.3')>, <Requirement('idna==3.4')>, <Requirement('six==1.16.0')>, <Requirement('aiohttp==3.8.3')>, <Requirement('urllib3==1.26.14')>, <Requirement('python-dateutil==2.8.2')>
vale swan
#

This isn't actually hosted by this server, but it's hosted by the Python Discord server where I'm staff. (There's a fairbit of overlap in membership between us two).

torpid pivot
#

i'm constantly amazed that open source projects choose discord. they justify the use of a closed platform by talking about the features, and then you have to use an external pastebin anyway

#

anyway, where does bandersnatch get the idea to download e.g. arcanepython? it's not in the list of allowlist requirements. something going wrong with hashing?

tropic fossil
vale swan
torpid pivot
#

so is .NET, but I'd still rather use Python

#

yes, sorry

#

in case anyone is interested, you must enable the allowlist_project plugin as well as allowlist_release, otherwise allowlist_release will filter the versions of those packages, but all other packages will still be allowed to be installed

unique wren
unique wren
torpid pivot
#

@unique wren then we would replace those dependencies

#

either there's a successor to PyPI, in which case we switch to that, or there isn't, in which case we can't use those dependencies any more because there is no ecosystem supporting them. the situation of "we have a stale mirror of a package cache that used to exist but no longer does" is no better than not having the mirror

#

after adding a package to the allowlist, is there something i have to do other than just run bandersnatch mirror?

#

it completes successfully, and it lists the new requirement in both log entries Initialized project plugin allowlist_project and Initialized release plugin allowlist_release, but it doesn't download the new package

#

(after it completes, there is no directory for the added package in $mirrordir/web/simple/)

unique wren
unique wren
#

Bandersnatch only look for changes from last synced serial. So if you add a new package you have to ask it to do the expensive get every package known to man kind and then resync packages that your plugins allow

#

There is a sync a particular package sub command, but I donโ€™t know if it has the โ€”force or โ€”full cli that โ€œmirrorโ€ sub command does. If it does not it should โ€ฆ

#

But like I said, I have little time and donโ€™t use it anymore so have very little incentive to spend huge time on the project

torpid pivot
#

mm, i just made the job calling bandersnatch keep a hash of the list of packages, and if it changes it adds --force-check

unique wren
#

Thatโ€™s a winner. Nice.

narrow grailBOT
#

I can't mirror the pypi packages from https://pypi.org
This is my bandersnatch.cfg
`[mirror]
directory = /data1/gwb/pypi
json = true
release-files = true
cleanup = false
master = https://pypi.org
timeout = 10
global-timeout = 1800
workers = 5
hash-index = false
simple-format = ALL
stop-on-error = false
storage-backend = filesystem
log-config = /etc/bandersnatch-log.conf
verifiers = 3
compare-method = hash
download-mirror = https://pypi.tuna.tsinghua.edu.cn/
download-...

narrow grailBOT
potent pasture
#

Does bandersnatch support mirroring local pypi index ?

unique wren
#

Thatโ€™s what it does โ€ฆ

potent pasture
#

Does bandersnatch support mirroring

unique wren
#

Mypy 1.0 found a bug - crazy it's finally 1.0

dense totem
#

I said, "Oooo, 1.0.0. How exciting." when I saw the pull request to upgrade this morning.

unique wren
#

Been a long time

narrow grailBOT
#

I have this exception

2023-02-25 22:29:51,784 INFO: considering /requirements/*********-requirements.txt (allowlist_name.py:114)
Traceback (most recent call last):
  File "", line 198, in _run_module_as_main
  File "", line 88, in _run_code
  File "/usr/local/lib/python3.11/site-packages/bandersnatch/main.py", line 231, in 
    exit(main())
         ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bandersnatch/main.py", line 227, in main
    return asyncio.run(async_main(...
unique wren
#

These old pythons so slow. Need to deprecate!

narrow grailBOT
vale swan
#

Damn, I don't even have a proper 3.10 install set up yet ๐Ÿ˜…

#

Go for it though!

unique wren
#

I don't know how you survive in the dark ages

#

Now we wait and see if anyone complains about 3.11 dockers

#

As a side happy to ansible / docker and even store in s3 ...

#

Should also get resource wins / speed with py3.11

unique wren
#

Few docker downloads

vale swan
#

It's only 0.0025% of the global population smh.

unique wren
#

More than I expected anyways

#

Cause I bet most people pin their container and forget about bandersnatch until it breaks

vale swan
#

That is indeed quite a few. I'm just carrying on with what seemed to be sarcasm :p

vale swan
unique wren
#

I never do that

vale swan
#

If it weren't for dependabot or other similar utilities, things just wouldn't be upgraded ever until it breaks

unique wren
#

Dislike it profusely

#

I use to have dirty scripts that did it

#

"Lots of small upgrades better than pinning, waiting and big bang upgrades"

#

Lots of small amounts of pain rather than lots at once

vale swan
#

Yeah... I'm a little scared for when I'll have to upgrade my Ubuntu 20.04 LTS install to the next one. Smaller (and rolling) updates are generally nicer to deal with.

unique wren
#

Leant that very early in my career as my first job was a nuclear reactor where some of the computers were 1/2 as old as I was running ancient sendmails and OS's

#

And I vowed to never get into that hole where ever i could avoid

unique wren
#

I'm even tempted to move to Fedora Server so I get upgrades more

vale swan
#

I don't expect it to be painful (except for maybe my touchpad drivers) but I just can't be bothered reconfiguring everything.

unique wren
#

I feel ya

#

My Fedora desktop is all very supported Linux hardwares so I can be more risky and just upgrade all the time

vale swan
#

My laptop is a tool to get work done. I've mostly stopped playing around with it and tweaking it.

#

I do occasional clean up and backups but other than that, not much. Standard updates are done via Ubuntu's automated reminders to update.

unique wren
#

Nice

#

Never going back to Windows?

vale swan
#

If I can, yeah. When I get a new laptop, I'll 100% dual boot Windows/Linux again.

#

... or just wipe it, I haven't used Windows in a long while. It doesn't hurt to have it though. Never know when I may need it.

unique wren
#

Have you seen any good replacement for myst-parser - They been blocking sphinx 6 for a long time ...

#

Has been a long wait

vale swan
#

you ask for a release, you get oneโœจ

unique wren
#

Amen. Time to merge our docs PR

#

To be fair I asked months ago to no response

#

But better late than never

#

Iโ€™m sure a lot of me (me included) thought black was dead

teal moss
#

if you use multiple jobs to build, it's not going to be the same as if you use one job

#

most of them are known and patched on master but still waiting for 6.2 or 6.1.4 to include them

unique wren
#

Cool. Cheers for the heads up. We only have one job and Iโ€™d expect our CI to see them?

quaint schooner
#

myst-parser had a hard time with Sphinx 6 FWIW. There was a long laundry list of things that changed and needed fixing. ๐Ÿ˜…

unique wren
#

Wonder if we can help them have a sphinx with main sphinx periodic CI run โ€ฆ might open an issue this week after I see what their CI is like โ€ฆ

#

So they can squash bugs more regularly

unique wren
#

Doc building CI is passing ...

unique wren
#

Seems to work again

narrow grailBOT
#

According to pypi/warehouse#12214 , it has been a long-existing problem for the PyPI CDN to serve stale JSON API response, causing persisting error in syncing. This time, the mirror has been broken for over a week.

Could we implement a workaround in bandersnatch, allowing setting aside the problematic package, and continue to sync other packages? That's to say, to force fetch the change log even though the todo file exists?

narrow grailBOT
#

As described in the docs, bandersnatch can filter mirror to only include the latest releases:

https://bandersnatch.readthedocs.io/en/latest/filtering_configuration.html#keep-only-latest-releases

But this can introduces some problems, and I think it boils down to a definition of what exactly the latest releases are. Currently, bandersnatch appears to sort all releases by version number:

https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch_filter_plugins/latest_name.py#L52
...

narrow grailBOT
#

As shown in the following log, I initially found that the packages "oreo" and "spanishconjugator" were not updated, but after checking the log, I found that "oreo" was missing and "spanishconjugator" failed to pass the verification.
The problem is that the failure of the subtasks' updates should not hinder the overall task's operation. Otherwise, the task will be stuck in a loop at these two packages forever.

# cat /yum/pip/todo
17825673
oreo4 17825509
spanishconjugator 17825562...
narrow grailBOT
#

blake2b_256 has been added to the digest dict in package json, pip does not know how to handle this hash name. Causing and exception when trying to install packages with pip23 or later.

If you check https://pypi.org/simple/pip against https://pypi.org/simple/pip/23.0.1/json
the digest dict does not contain the same data as the hashes dict.

$ pip install --force pip
Looking in indexes: https:///simple/
Collecting pip
  Using cached https:///packages/07/51/2c0959c5adf988c44d9e1...
unique wren
#

Bandersnatch getting some action of late โ€ฆ Iโ€™ve had so little time to look ๐Ÿ˜ฆ

unique wren
#

Lame we didn't see the PR here

azure magnet
#

Could add it?

unique wren
#

I just need to go look at settings. I thought I had new PRs is all ...

#

I think we stopped them due to dependbot weekly spam ๐Ÿ˜ so I'm torn enabling them again now I think about it

#

Ahh yeah, it's all PR events basically or nothing. I could live with new created ... but does not seem separated out ...

narrow grailBOT
narrow grailBOT
unique wren
vale swan
#

I can take a look tomorrow.

unique wren
#

No hurries or worries if busy - Just am a king of typos or silly mistakes ... ๐Ÿ™‚

#

Or forgetting things

#

Most of it was typing code mod by pyupgrade

#

Patch coverage: 92.03% and project coverage change: +3.70 ๐ŸŽ‰ โค๏ธ

junior zephyr
#

@unique wren Hey we are the group of the developers who emailed PyPI for the vulnerability in bandersnatch a few weeks ago. Would you mind if I directly message you in Discord to discuss that?

unique wren
#

Sure. But lets just submit the PR and merge it.

unique wren
unique wren
#

I don't remember ever doing this - Someone else must have

vale swan
#

In particular, step 7 "Optionally, enable required status checks. For more information, see "About status checks."

unique wren
#

Thanks - TIL

unique wren
#

Read the Docs doesn't have python3.10 for building available. I feel like when we moved to >=3.8 only too we hit the same problem ... 3.10 came out over 1.5 years ago ๐Ÿ˜ฎ ... crazy.

unique wren
narrow grailBOT
#

Hi ,
We have implemented the Private Pypi mirror setup using bandersnatch .
We have used the allowlist to allow few package and those are getting mirrored successfully.

But when I try to install it using pip from mirror , it fails as don't find the dependencies there.

is there a way allow list can mirror the all dependent packages as well so it can work just like public pypi ?

This issue is going to beat entire purpose of setting up private pypi.

narrow grailBOT
narrow grailBOT
#

sh-4.2# bandersnatch --version
bandersnatch 6.3.0

sh-4.2# bandersnatch verify --delete --json-update
2023-07-06 16:13:58,112 bandersnatch.verify: INFO Starting verify for /repo with 10 workers
2023-07-06 16:13:59,897 bandersnatch.verify: INFO Parsing 101903762
2023-07-06 16:13:59,897 bandersnatch.master: INFO Fetching https://pypi.org/pypi/101903762/json
2023-07-06 16:14:00,220 bandersnatch: INFO Initialized release plugin blocklist_release, filtering [, , , , , , ]
Traceback (most ...

narrow grailBOT
#

I'm trying to sync only packages compatible with Python 2 but it's not working

[mirror]
directory = /data/MINI_PYPI/bandersnatch/packages/
master = https://pypi.org
timeout = 20
workers = 3
hash-index = false
stop-on-error = false
json = true

[plugins]
enabled =
allowlist_project
regex_project_metadata
blocklist_project
exclude_platform
latest_release

[allowlist]
packages =
setuptools

[blocklist]
platforms =
...

narrow grailBOT
#

Hello,

Since the new merge s3path cannot import the S3DirEntry :

`2023-08-22 08:11:41,377 INFO: Selected storage backend: s3 (configuration.py:131)
2023-08-22 08:11:41,377 INFO: Selected compare method: hash (configuration.py:179)
Traceback (most recent call last):
File "./bandersnatch/bin/bandersnatch", line 8, in
sys.exit(main())
File "/builds/cloud/pypi-mirror/bandersnatch/lib/python3.8/site-packages/bandersnatch/main.py", line 226, in main
return asyncio.run(async...

unique wren
#

We even have a PR up and asking s3path if what we did was the right way around their change moving forward โ€ฆ

#

I try to keep bandersnatch up and hip

narrow grailBOT
#

as log below:

[root@softsource-agent-pypi-0 /data]# bandersnatch sync simple
2023-08-28 14:24:55,082 bandersnatch: INFO Selected storage backend: filesystem
2023-08-28 14:24:55,082 bandersnatch: INFO Selected compare method: stat
2023-08-28 14:24:55,082 bandersnatch: INFO Selected alternative download mirror https://mirrors.tuna.tsinghua.edu.cn
2023-08-28 14:24:55,236 bandersnatch: INFO Initialized project plugin blocklist_project, filtering ['pyagrum-nightly', 'tf-nightly', 'tf-nig...
narrow grailBOT
#

We've been using bandersnatch for years, recently, I found it's hard to actually run bandersnatch verify as we're using s3 as storage and it already contains millions of packages.

Loading the JSON file alone would cost a day or longer, what makes it worse is that if this process is interrupted(system reboot, container killed, both are fairly common)

So I'm thinking about another way to verify packages.

iterating packages and verify if it should exist

  1. iterate packages using `...
unique wren
#

@stuck aurora - Added in PEP700 support to bandersnatch - Would love an eye over it when you get time to check I can read the PEP ๐Ÿ˜„ (was bored in an airport lounge and thought I should do some python work for a change): https://github.com/pypa/bandersnatch/pull/1557

GitHub

Move simple module to generate API 1.1 (JSON changes only)

Since there is only additions we don't really break 1.0 so just moving to 1.1
Seems pypi did this too
PEP700: https://peps.python.org...

#

@vale swan Got to use your PR number page of awesome ๐Ÿ˜„ Thanks! Hope all is well.

vale swan
#

I'm currently head deep writing some JS (will need to rewrite this function later) for a personal project

unique wren
#

Condolences for having to write javascript

vale swan
#

It's honestly not that bad. SvelteKit + FastAPI is pretty nice to work with :)

turbid crater
#

Also you can use throw in an async function instead of Promise.reject

vale swan
vale swan
unique wren
#

bandersnatch, the new Javascript channel! haha

narrow grailBOT
narrow grailBOT
narrow grailBOT
royal trellis
#

Hello, Can someone assist me:

I am only trying to download 1 specific version of python (all files for windows/linux/egg/tgz/ etc...) of Python 3.6.8 -- to host in my offline lab.

Does this config file do what I need?

Please verify that this config file below will only download Python python 3.6.8 (and no other versions)?

# cat /etc/bandersnatch.conf | grep -v '^;' | sed '/^$/d'

[mirror]
directory = /mnt/mylabnas01/repos/pypi
json = false
release-files = true
cleanup = false
master = https://pypi.org
timeout = 10
global-timeout = 1800
workers = 5
hash-index = false
simple-format = ALL
stop-on-error = false
storage-backend = filesystem
verifiers = 3
compare-method = hash
[allowlist]
platforms =
py3.6.8

royal trellis
#

Does anyone know?

royal trellis
#

Please help me ๐Ÿ˜ฆ

unique wren
#

@royal trellis I don't think that's going to help you that much as there are a lot of wheels with py3 only and you'll possibly want them.

#

I'd recommend making a vitualenv via python3 -m venv /tmp/venv and pip install all the possible modules you'd want in there and running pip freeze to see all the packages you need (as pip will download all dependencies) then just add all them to your allow list and maybe block out windows and macos wheel etc.

#

Filtering PyPI packages is never easy sadly

narrow grailBOT
#

For some packages the version sorting of the x last relases does not work which leads to not fetching any versions.

This is caused by a problem of the version parsing in packaging.version. It usually works but the regex does not match arbitrary letters.
The problem was observed in the pytz package: versions 2004a, 2004b, 2004b.2 are pased correctly but 2004d raises an error.
Additionally the filtering is done in a large try ... except block that silently ignores the error in the ...

narrow grailBOT
#

My usecase

  • I'd like to have a slim mirror for offline usage based on a selection of a few packages
  • packages are initially given in a requirmentss.txt and externally expanded to a requirements.txt with all dependencies (including version range)
  • To keep the required storage low, I'd like to fetch max X versions while honoring the pinned versions given in the requirements.txt

Problem

Because all filters are applied in a loop in package.py, the last X versions plugin wins and...

royal trellis
#

Hello, Can someone please help me. I posted my question on stackoverflow

https://stackoverflow.com/questions/77400104/how-can-i-download-pypi-repository-which-only-contains-packages-for-python-3-6-8

I am trying to create a offline repo for pypi for only python 3.6.8 packages with bandersnatch mirror. It downloaded everything but skipped the "requests" package, and I dont know why?

Please, can someone kindly help me. Thank you so much!

unique wren
#

That's still going to download a lot of packages. As you'll get all py3 wheels ... I'd suggest just getting the last X versions as well ...

#

I don't think there is going to be a huge amount of bandersnatch gurus on stack overflow ...

rancid rapids
#

you might want to use python versions that are at least still recieving security updates.

royal trellis
#

Thanks for the feedback guys!

narrow grailBOT
narrow grailBOT
#

I've run into an issue when trying to then pull packages from a bucket backed static site, but can't tell if the issue is my config a change in static sites behaviour (and how pip deals with it)

WARNING: Skipping page http://.amazonaws.com/mirror/web/simple/pillow/ because the GET request got Content-Type: binary/octet-stream. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
ERROR: Could not find a version ...
narrow grailBOT
narrow grailBOT
#

Thanks so much for providing a means to mirror the PyPI repository!

After our latest run of bandersnatch mirror followed by bandersnatch verify --delete --json-update, our mirror is 13.3 TB is size. It was 17.7 TB before we ran the verify --delete operation. We found that some packages were not being updated after many runs of bandersnatch mirror. One such package was poetry. We got it to update with bandersnatch sync poetry before we ran the verify --delete operation.

We a...

narrow grailBOT
#
2023-12-21 20:58:01,011 bandersnatch: INFO Selected storage backend: filesystem
2023-12-21 20:58:01,011 bandersnatch: INFO Selected compare method: hash
2023-12-21 20:58:01,012 bandersnatch: INFO Selected alternative download mirror https://mirrors.tuna.tsinghua.edu.cn/
2023-12-21 20:58:01,055 bandersnatch: INFO Initialized project plugin blocklist_project, filtering ['tensorflow-io-nightly', 'tf-nightly-cpu', 'pyagrum-nightly', 'tf-nightly-gpu', 'uselesscapitalquiz', 'tf-nightly', 'a...
woven stirrup
#

Hello everyone, I've got a quick question and I'm not sure if it ever has been asked as I can't find any post on internet stating so.

Is there a way, with bandersnatch, to partially download the content of Pypi ?
Say because of my internet or because of my storage I want to download packages one letter at a time, is that doable ?

If so, would it work with a file that contains a list of packages I want do download for letter a ? (And then have it on my own frozen mirror ?)
Thank you !

stuck aurora
#

bandersnatch has filters

woven stirrup
#

Thanks a lot, I wasn't even aware I could do that through the allow and block filters, I always assumed they would only be specific to RegEx or similar expressions.

Thanks a lot !

woven stirrup
#

Well it turns out that the allowlist and Blocklist plugins require specific versions to be taken into consideration, which is not going to make the task easy at all

woven stirrup
#

Okay I made it half work by enabling the plugin project_requirements. I do have a question though, if anyone has ever used the plugin. Bandersnatch seems to print INFO : package XXX allowlisted but then does not proceed to download and or write anything to disk. I'm scratching my head over this because I do not quite get why it behaves like this.

#

My immediate concern is this line in the filtering_configuration page of the documentation: Any packages not matching the version specifier for Allowlist packages will not be downloaded and I fear this might be true to requirements too

narrow grailBOT
#

I am currently using bandersnatch for mirroring PyPI and have encountered an issue regarding incremental synchronization. I want to set up my bandersnatch mirror to only sync new packages added to pypi.org. For packages that have been removed from pypi.org, do not delete these packages from the local mirror during synchronization. In short, only perform incremental backups without deleting any packages.

how to configure bandersnatch.conf to achieve this?

narrow grailBOT
#

I have synchronized 13 terabytes of data, and I restarted the bandersnatch service due to configuration changes.
A large number of "no longer exists on PyPI" messages are displayed in the startup log. The synchronization of new packages starts about 50 minutes later.

I would like to remove these "no longer exists on PyPI" packages from todo, or is there a better way that doesn't require waiting 50 minutes.

Thanks.

Logs:

2024-02-23 00:45:52,492 INFO: 0wneg no longer exists on PyPI...

narrow grailBOT
wild lynx
#

Hi, I'm having trouble mirroring a gitlab pypi repo. The index URL follows the format https://auth-token-name:AUTHTOKEN@gitlab.com/api/v4/groups/0000000/-/packages/pypi/simple, and bandersnatch seems to parse that just fine from the config file.
Unfortunately Gitlab returns a 415 Unsupported Media Type error in the first request from bandersnatch. What am I doing wrong? I'm sure I'm not the first to mirror a gitlab pypi repo.

I've searched google/ddg for about 45 min, and there is barely anything on the subject.

unique wren
#

Bandersnatch relies on the xmlrpc APIs PyPI itself hosts that pip does not use. Due to that it does not support mirroring of private mirrors โ€ฆ

#

Would be open to discussing ways around those APIs and abstracting it to use something else โ€ฆ e.g. we could just pull the Simple API and try grab every package or something each run in small private mirrors โ€ฆ

#

But it would be a big PR and design exercise

wild lynx
#

Damn, that's unfortunate. Since supporting private repos is non-trivial, I'll have to search elsewhere for a solution.
Thanks for the swift reply! ๐Ÿ˜Š

Do you by any chance know how I'd go about mirroring a private repo?

unique wren
#

Depends how itโ€™s stored. If on a filesystem โ€ฆ rsync could even work.

#

Do you have GitLab support? Ask them?

wild lynx
#

Thank you for your time ๐Ÿ˜Š

narrow grailBOT
#

Hello, I'm using a fresh install of bandersnatch[s3] in attempt to establish a private S3-backed mirror. I discovered this issue in Python 3.9, but was able to reproduce it on Python 3.11. Here is an example configuration, and the following stack trace.

[mirror]
master = https://pypi.org
storage-backend = s3
directory = /my-s3-bucket/
diff-file = bandersnatch-diff
diff-append-epoch = true

json = false
stop-on-error = true
timeout = 30
keep_index_versions = 3
workers =...
narrow grailBOT
#
2024-03-06 20:24:02,571 bandersnatch.package: INFO Fetching metadata for package: tohoku-tus-iot-automation (serial 22195024)
2024-03-06 20:24:02,932 bandersnatch.mirror: INFO Storing index page(s): tohoku-tus-iot-automation - in /repo/web/simple/tohoku-tus-iot-automation
2024-03-06 21:28:19,422 bandersnatch.package: INFO Fetching metadata for package: tohoku-tus-iot-automation (serial 22196068)
2024-03-06 21:28:20,140 bandersnatch.mirror: INFO Storing index page(s): tohoku-tus-iot-...
narrow grailBOT
#

I have started to see test failures related to symlinks not being created correctly on my Windows workstation.

Platform and Version

Bandersnatch version: 10f652c1

Windows version information:

Edition		Windows 10 Pro
Version		22H2
Installed on	โ€Ž2021-โ€Ž04-โ€Ž03
OS build	19045.4170
Experience	Windows Feature Experience Pack 1000.19054.1000.0

Test Logs

The following unit tests all have similar failures:

  • tests/test_mirror.py - symlink error is in captured ...
narrow grailBOT
#

As logs below , when I am trying to sync bob.bio.csu, instead it's syncing to bob-bio-cso directory.
which makes our client cannot install bob.bio.cso(404 not found),But we should use bon-bio-cso instead.
Excuse me ,How can I turn this feature off (not replacing "." to "-")?

# bandersnatch -c /mirrors_scripts/bandersnatch/bandersnatch.conf.repo sync bob.bio.csu
2024-04-05 09:31:06,659 bandersnatch: INFO Selected storage backend: filesystem
2024-04-05 09:31:06,660 bandersnatch: INF...
narrow grailBOT
#

Hello,

I'm using v6.5.0 and when I attempt to use bandersnatch verify --delete I get a key error.
I read the docs, and from what I understand, storage-backend defaults to filesystem, so I didn't think it would be required to add it into the configuration file.
https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#storage-backend
image

The mirror section looks like this:
...

narrow grailBOT
#

S3Path (and swift - But going to drop support unless someone else wants to help port it) is our biggest blocker to moving to Python 3.12. There is so much context here I sadly don't have as I've used S3 very little and never with bandersnatch.

Would love help from someone to help port this. I've spent a hour or so today and I don't have the time to spend on this, but would love to try and keep bandersnatch able to run on latest versions of python.

I feel we need to remove our own S3Path...

unique wren
#

^^ Would love any help here

#

I am an s3 n00b but would love to be able to offer bandersnatch in >= 3.12

unique wren
#

This has to be the saddest channel on this discord server ๐Ÿ˜ฆ

#

Most other channels get action, none here โ€ฆ haha

unique wren
#

s3 will be the death of me: https://github.com/pypa/bandersnatch/pull/1728
(and my lack of ever using it due to being @ Meta/Facebook for 11+ years)

Least the maintainer of s3path has been awesome helping me: https://github.com/liormizr/s3path/issues/172

Would love help from anyone who's s3 savvy with bandersnatch ...

GitHub

Move to version 6.6.0dev0
Make CI pass for 3.12

Drop support for swift unless someone speaks up and wants to help support it - This will cause a temporary coverage reduction
Move python_requires +...

GitHub

Hi, I am the maintainer of bandersnatch, but I have very little s3 skills in general - so would love help moving to >= 3.12 + S3Path and cleaning up our usage of s3path which I feel we hacked ar...

wanton steeple
#

Popping in to say hello! ๐Ÿ‘‹

Is the S3 work still top of the list? I havenโ€™t used S3 and Bandersnatch together, but Iโ€™m happy to try and chip in where I can.

unique wren
# wanton steeple Popping in to say hello! ๐Ÿ‘‹ Is the S3 work still top of the list? I havenโ€™t us...

Hello. S3 still has some code Iโ€™d like to refactor. Weโ€™ve made it to 3.12 but Iโ€™d love to fix some s3path private API weโ€™re still hitting. I talk about it here with the s3path devs here:

https://github.com/liormizr/s3path/issues/172#issuecomment-2119279403

GitHub

Hi, I am the maintainer of bandersnatch, but I have very little s3 skills in general - so would love help moving to >= 3.12 + S3Path and cleaning up our usage of s3path which I feel we hacked ar...

#

So would love help fixing that if you see a way.

#

I havenโ€™t spent huge time on it but Iโ€™d love to fix it before I release the next version โ€ฆ (which I really need to do)

wanton steeple
#

Thanks! I wish my time available to contribute was more regular, but if I have time this weekend/next week I will prioritize these.

unique wren
#

Understandable, and that would be awesome ๐Ÿ˜„

unique wren
#

Feel free to ask any questions here - tag me tho so I get a notification ๐Ÿ˜„

narrow grailBOT
flint portal
#

@unique wren I'm in early phases on exploring an idea on making projects uploaded to PyPI temporarily "hidden" for whatever reasons - and was curious to understand how a mirror would behave in that circumstance.
I can imagine a few cases:

  • the mirror has already retrieved the package, no new updates listed, no new fetching, no impact
  • the mirror is aware of a new package, but has yet to retrieve it, and when it tries to, it's no longer there <== what happens here?
  • the mirror saw a package, it went unlisted, and now it's listed again <== rare but possible outcome

Let me know if that makes sense or not - happy to discuss further!

unique wren
#

I feel you make those RPC calls return packages how you want, bandersnatch will do the right thing ...

flint portal
#

Thanks for the pointers, very helpful.

unique wren
#

I feel if you just don't share the new package via the RPC calls until you don't want to hide it anymore, wouldn't bandersnatch just stay working as is today.

It just won't sync packages until they are "visible" ...

#

Am I missing anything here? I feel that would be the simplest approach.

flint portal
#

Right - that's if I don't ever show it, nobody knowns, nobody mirrors it, until we do, which is fine.

#

The case I'm thinking of is if we did show it at one point, and now no longer show it, but it's not a deleted operation

#

so it could resurface

stuck aurora
#

changing visiblity probably has to put an event into the changelog

#

otherwise mirrors are going to end up in an inconsistent state

flint portal
# stuck aurora otherwise mirrors are going to end up in an inconsistent state

Can you help me understand this more? I'm looking to understand what "promises" PyPI has made that we have to adhere to, specifically vis a vis mirroring, and from looking at the little code I have in bandersnatch, it seems like if there was a package at one point, and now it's no longer found, it's no biggie

stuck aurora
#

they'll be in an inconssitent state wrt PyPI itself. The mirror will have files exist on them that don't appear to exist on PyPI anymore

#

or if the file gets restored, PyPI will have files that don't appear on the mirror

#

the system is designed to be somewhat eventually consistent, mirrors look at /simple/ to determine what files should be made available, but they can't reasonable sync all of PyPI every time, so they use the change log to determine what /simple/$FOO/ pages to sync.

If a file goes missing, without an entry in the change log, mirrors won't fetch /simple/$foo/ for that page, and will continue to serve that file (until they happen to sync that file for some unrelated change).

If a file gets added, without an entry in the change log, mirrors won't fetch /simple/$foo/ for that page, and won't be able to serve that file (until they happen to sync that project for some unrelated change).

flint portal
#

Following this logic, it's similar to how after PyPI removes a project, it increments the changelog, the mirror sees a new entry in changelog_since_serial() and decides what to do next?

#

FWIW, it looks like bandersnatch will remove the files on PyPI 404 if running in delete mode, which means that if the file visibility returns, they would re-sync it?

#

(again, likely a rare case)

stuck aurora
#

they would resync it next time they syn'c that project

#

which they wouldn't sync that project until it showed up in the changelog again

#

basically the rough algorith is:

changes = changelog_since_serial()
projects_to_sync = {change["whatever index project name is"] for change in changes}
for project in projects_to_sync:
    make_local_state_match_pypi(project)
#

if the available files change without a change log entry, mirrors won't "see" that the list of files has changed

flint portal
#

cool, thanks for clarifying that. I will follow up with you and other pypi admins with a document I'm working on soon

unique wren
#

bandersnatch also doesnโ€™t delete things very well. Would love some form of event based delete / cleanup too.

If that exists Iโ€™d love help knowing how to tune bandersnatch to do that cause we donโ€™t clean up well today except via โ€œverifyโ€ which takes a very very long time โ€ฆ (it effectively crawls the data store and compares to latest JSON API package entries โ€ฆ)

#

No idea if it works at all for non file system mirrors too โ€ฆ

flint portal
#

Unrelated, I noticed that there's some hard-coded checks in place for https:// URLs in mirrors - would you be open to either allowing a config/cli arg to override that for local mirror testing against a localhost warehouse?

unique wren
#

No, would totally be open.

Just never supported it cause no one runs the xmlrpc locally โ€ฆ

#

Iโ€™ve wanted to kill the xmlrpc usage for years

flint portal
#

Us too

unique wren
#

Will diff bandersnatch the moment itโ€™s live

narrow grailBOT
narrow grailBOT
narrow grailBOT
#

Certain packages never get mirrored when using the latest_release plugin do to an unhandled exception raised by the "parse()" function from packaging.version.

nltk package is an example of a package that is never mirrored when the latest_release plugin is used to filter the last "n" versions of each package. In that specific case, the nltk package has a release version "2.0.1rc2-git" that returns the following when packaging.version.parse() is called:

Traceback (most recent...
narrow grailBOT
#

Hi there,

Thank you very much for offering a way to mirror the PyPI repository!

I am mirroring PyPI using Bandersnatch version 6.5.0. Initially, I mirrored all the packages with latest_release but without an allowlist. However, I noticed that some packages were missing, and some packages only downloaded a few .tar.gz files without the actual .whl files.

Therefore, I tried some quick test mirroring with an allowlist. This is the bandersnatch.conf file I am testing with:

I observed ...

unique wren
#

Anyone seen error with types-pkg_resources and the face it's latest version is yanked with pre-commit?

#
cooper@cooper-fedora-MJ0J8MTZ:~/repos/bandersnatch$ /tmp/tb/bin/pre-commit run -a
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/cooper/.cache/pre-commit/repovugpwdl0/py_env-python3.12/bin/python', '-mpip', 'install', '.', 'types-filelock', 'types-freezegun', 'types-pkg_resources')
return code: 1
stdout:
    Processing /home/cooper/.cache/pre-commit/repovugpwdl0
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Collecting types-filelock
      Using cached types_filelock-3.2.7-py3-none-any.whl.metadata (1.4 kB)
    Collecting types-freezegun
      Using cached types_freezegun-1.1.10-py3-none-any.whl.metadata (1.4 kB)
stderr:
    ERROR: Ignored the following yanked versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3
    ERROR: Could not find a version that satisfies the requirement types-pkg_resources (from versions: none)
    ERROR: No matching distribution found for types-pkg_resources
Check the log at /home/cooper/.cache/pre-commit/pre-commit.log

PR that introduces this: https://github.com/pypa/bandersnatch/pull/1788

#

Let's see if the mypy mirror has an issue

#

Ahh, repo has no issues :\

weak sage
unique wren
#

Now your wanting of a config param to include non PEP440 compliant version packages, I would accept that. Bonus points to use that linked library that can handle them (that seems warehouse uses?)

I on purpose took the stance to break non compliant versions once upon a time but can accept thatโ€™s too harsh.

Just need to log were including evil non standard packages on the run log I feel and naturally add tests

royal trellis
#

Hi Guys, Im kind of at a loss, I have tried to use banderswitch several times, but after the complete sync, it never gets the idna package which is a dependency of "pip install requests", so Im not sure why this is happening (after >800GB download of pypi for my off-site dev lab environment)

Here is my bandersnatch, what am I doing wrong?

; Enable all of the plugins, with their default settings
[plugins]
enabled = all

; Allow all of the below platforms
[allowlist]
platforms =
py2.7
py3.6
py3.7
py3.8
py3.9
py3.10
py3.11
py3.12
py3.6.8
py3.8.6
py3.8.7
py3.10.6

; Dont bother downloading python versions we dont even use any more (i.e. <CentOS7.1)
[blocklist]
platforms =
py2.4
py2.5
py2.6
py3.1
py3.2
py3.3
py3.4
py3.5

; Dont bother downloading really big packages (Some are >100GB)
[size_project_metadata]
max_package_size = 2G

[mirror]
release-files = true

[latest_release]
keep = 5

unique wren
#

Have you set the config to exit on error and see if it fails on idna?

#

What errors are in your run output / logs?

#

I would dare say itโ€™s filter plugin bugs. They are all far from perfect sadly. Especially if you use multiple together โ€ฆ

#

โ€œโ€”debugโ€ output might help us work it out too

royal trellis
#

Hi cooperless, thanks - let me check

royal trellis
#

Hello sorry about the delay are you here? I am very sorry

#

Basically. I need to make a pypi mirror offline but just for my Rocky9 amd64 VMs. Been struggling with this since Nov2023, and definitely need help - was hoping someone on discord could help.

Ideally: Can you provide me with a simple bandersnatch.conf that will will download pypi (and not miss the idna package, which is a requirement for pip install requests).

My final goal is for my Rocky 9 VMs on my offline homelab, so I want toL 1. keep everything python3 any OS, use the latest 5 versions, and no package size limits), can you give me your bandesnatch.conf for this?

unique wren
#

Sorry, I never got tagged here. Do you have a config you tried? It sounds like doable, but we donโ€™t test every permutation of plugins working together so there might be bugs โ€ฆ

wanton steeple
#

@unique wren re: pytest 8.x https://github.com/pypa/bandersnatch/pull/1656#issuecomment-2510192557

This error with delete_path is weird. I poked at it some and made some notes, but I'm not sure what a real fix would be like. I may play around with pytest-asyncio's loop scopes, since it seems something to do with the event loop attached to a cached storage plugin being closed.

unique wren
#

Yeah, there are fixes needed for pytest asyncio update too that might hint at the root cause from memory

#

Thanks for taking a look. Happy to dig if ya get stuck to see if fresh eyes help.

wanton steeple
#

@unique wren After taking a break and coming back to it, I think I have a PR for you: https://github.com/pypa/bandersnatch/pull/1829

I updated both pytest and pytest-asyncio at once, since the changes in the two versions seem closely related enough. The change to delete_path looks redundant but is simple and works (on my machine, lulz).

I didn't add a changelog entry, but am happy to do so if needed.

GitHub

This performs the same version changes as #1656 and #1797 in a single merge request, since the associated issues and fixes appear to be related:

pytest => 8.3.4
pytest-asyncio => 0.2...

#

...maybe spoke to soon - looks like its failing CI for macOS and Linux. Time to spin up a VM! ๐Ÿ˜ฌ

unique wren
#

Different event loop for windows thab POSIX โ€ฆ

wanton steeple
#

Solid point.

The test failure trace for the failed CI jobs look kinda strange to me - is it supposed to be invoking the swift storage backend? I peeked at the logs from a previous successful PR but couldnโ€™t tell.

#

reproducing the tests in an Ubuntu container is probably a thing for tomorrow-me. Will be nice to have that around for tests.

#

Shouldโ€™ve known better than to jinx myself ๐Ÿ˜‚

unique wren
#

Iโ€™ll see if I can take a peak tonight and if I can finish your PR Iโ€™ll merge it โ€ฆ

#

I havenโ€™t given any love to bandersnatch in a long time

wanton steeple
#

I got the tests to run in a Python 3.11 container yesterday, but had some weird file system problems - some storage backend tests that wrote to /tmp failed with hash mismatches ๐Ÿ™ƒ

So might be back to the full VM idea. Itโ€™s not like it was writing to a bind mount or something. ๐Ÿค”

But still - progress! Haha

unique wren
#

I moved backed to using the storage backend loop ... but I can not workout what is closing the loop

#

@wanton steeple
This simplification of the test works: https://pastebin.com/5AuLgDF7
Passes, and tests enough for me, but I'd love to workout the loop closing issue as I feel it will bite us somewhere

If we call / await delete_path s econd time I get event loop closed which I don't get ...

#

I could remove the blob exists check as the delete_file (for filesystem anyways) also does a check ... so we were wasting a stat sys call ...

#

But I wonder if S3/swift do? So my patch could introduce a bug

#

But would love any asyncio savvy people to help us try workout how we're causing the event loop to close here in this test

#

Also, weird it works with 3.12 but not 3.11 on MacOSX

#

Highly doubt it, but wonder if there is a bug / what difference we are hitting with 3.11 only with event loops ...

#

I can't get integration tests to fail on my mac with your PR on my mac tho:

2024-12-03 22:00:48,127 DEBUG: Closing Master's aiohttp ClientSession and waiting 0.1 seconds (master.py:102)
Bandersnatch PyPI CI finished successfully!
#

So yeah, I'm thinking it's all test env bug / feature ...

narrow grailBOT
#

s3path and s3 storage plugin are back for fun with my first attempt of python 3.13.

Will take a PR making CI pass with 3.13.

Integreation test on works on 3.13 (only tested on my latest MacOS X M1 laptop):

2024-12-03 22:09:02,962 DEBUG: Closing Master's aiohttp ClientSession and waiting 0.1 seconds (master.py:102)
Bandersnatch PyPI CI finished successfully!
turbid crater
#

It uses asyncio.Runner to manage the loop, so it should never be closed unexpectedly

wanton steeple
#

At a previous job a few years ago there was a project where we ended up swapping to the anyio pluginโ€ฆ very different project, but it was helpful there, so Iโ€™m open to trying it.

I also meant to fiddle with pytest-asyncioโ€™s event loop fixture scope. For example, if we set it to session scope, it should be reusing a single event loop for all the tests, and if we still encounter a closed loop then it must be something โ€œourโ€ test code is causing vs the test framework.

Though, Iโ€™m not sure what the downsides are to reusing an event loop across the whole suite like that as a long term thing.

Iโ€™m still meaning to get the tests running in Linux containers on my PC if possible, to avoid having to wait on CI. (And avoid me prematurely announcing that Iโ€™ve fixed it ๐Ÿ˜œ)

wanton steeple
# unique wren Also, weird it works with 3.12 but not 3.11 on MacOSX

At least in CI, the stack trace for the test failure on macOS + 3.11 looks weird to me. It looked like it was showing that the delete_path test ends up using the Swift storage plugin which doesnโ€™t seem right to me. I still think I must be reading it wrong ๐Ÿ˜†

turbid crater
unique wren
#

I'd love to know why 3.12 works and 3.11 does not tho

#

But I might try move us to this anyio plugin and if we work, move on

#

I don't think we have a bug per say, and it's test fun ...

#

I bet we could move to running loop and manage a single loop better tho

#

I async'd this non arync code base long long ago

wanton steeple
#

I agree itโ€™s a test environment thing. When the actual tool runs thereโ€™s only one event loop for the duration of the program (right?) and no way it can be invalidated (I think?) so whatever this case is seems like it should never be possible.

wanton steeple
wanton steeple
#

I finally got the tests on main running in a Linux container locally yesterday! I made an Ubuntu image with 3.11 and 3.12 installed and run Tox inside. Thatโ€™s all green, so now Iโ€™ve got a baseline.

unique wren
#

Nice.

But do you mean 3.11 fails and 3.12 passes?

wanton steeple
#

On main they both pass, I havenโ€™t had time to try it after upgrading pytest etc

unique wren
#

O right

wanton steeple
#

I made good progress this afternoon and feel SO CLOSE to fixing all the event loop issues.

I used the โ€˜pytest-randomlyโ€™ plugin to shuffle the test execution order and found many cases where the tests were implicitly order dependent because we have many tests that indirectly use an event loop while not being marked as async. Similarly if an earlier test initializes the storage plugins and and another later uses the cached instances, the loop saved on the plugin will be closed since the loop was only scoped to the previous test.

#

Iโ€™m adding marks to test modules that need an event loop to be available even though the tests arenโ€™t async, and a fixture for resetting the storage plugins between test modules, and that strategy seems to be working well.

turbid crater
#

It's removed in 3.14a2 or 3.14a3

wanton steeple
#

Thank you for the heads up! For the tests Iโ€™m marking modules or classes with pytest-asyncio so it an appropriately scoped loop exists, but the test bodies themselves donโ€™t usually need it, rather the code under test.

I do think the code under test is using get_event_loop (places like the storage plugin initializer) and with the tests shuffled around one of the ways I was finding things was the warnings. Weโ€™ll need to change anywhere get_event_loop was used to get_running_loop, right?

turbid crater
#

Usually you want to defer binding the loop as well as switching from the gel to the grl

#

Before:

class Foo:
    def __init__(self, ...):
        self.loop = asyncio.get_event_loop()
#

After:

class Foo:
    def __init__(self, ...):
        self._loop = None

    @property
    def loop(self):
        if self._loop is not None:
            return self._loop
        self._loop = loop = asyncio.get_running_loop()
        return loop
#

(feel free to ping me, I almost missed this message)

turbid crater
#

It should catch all these issues

unique wren
#

Yeah we get warnings and I've always tried to cut them down

#

We've jsut been stuck getting the test suiete to run with latest pytest-asyncio

#

I think once @wanton steeple get's that working or moves us we can make sure all the warnings are sweet again

#

I also need to release a 3.12 release and then test on 3.13 ... lol

#

I just don't personally use bandersnatch myself anymore so it's hard to dedicate time to it

#

I really appreciate @wanton steeple here โค๏ธ

turbid crater
#

You can also do a trick with self.dict.setdefault

narrow grailBOT
#

With this config file:

[mirror]
; The directory where the mirror data will be stored.
directory = /srv/pypi
; Save JSON metadata into the web tree:
; URL/pypi/PKG_NAME/json (Symlink) -> URL/json/PKG_NAME
json = true

; Save package release files
release-files = true

; Cleanup legacy non PEP 503 normalized named simple directories
cleanup = false

; The PyPI server which will be mirrored.
; master = https://test.python.org
; scheme for PyPI server MUST be https
master ...
wanton steeple
wanton steeple
#

@unique wren CI is now passing for #1829 (excepting the changelog check)

wanton steeple
unique wren
unique wren
#

Back to 2 PRs open now

#

I'll try fix the type checking tonight / this week

#

Unless someone beats me

#

And might see if I can workout how to test that other PR that was contributed ...

wanton steeple
#

Thanks for tackling all those PRs! I'm happy I was able to get the pytest stuff working without having to rewrite lots of tests. ๐Ÿ˜† (So now I can rewrite lots of tests... but one module at a time. ๐Ÿ˜ฌ )

Happy preferred winter holiday!

narrow grailBOT
unique wren
#

Finally the 3.12 release thatโ€™s long overdue.

I think most of our users are docker these days and use latest โ€ฆ

unique wren
#

Wow. Tests pass with 3.13 โ€ฆ just needed a s3path dep upgraded.

#

Nice work by then supporting 3.13 nice and early this time

narrow grailBOT
narrow grailBOT
#

Hello,

Using Python 3.13.1 on WSL2 (Ubuntu 24.04.1) .

My bandersnatch.conf has the following configuration:

[mirror]
; The directory where the mirror data will be stored.
directory = /mnt/d/bandersnatch

; Save JSON metadata into the web tree:
; URL/pypi/PKG_NAME/json (Symlink) -> URL/json/PKG_NAME
json = true

; Save package release files
release-files = true

; Cleanup legacy non PEP 503 normalized named simple directories
cleanup = false

; The PyPI server which will be mirrored.
; ...
glad fox
#

hi bandersnatch maintainers! your thoughts/opinions on exposing status markers (e.g. "this project has been archived") via the index APIs would be greatly appreciated on this thread: https://discuss.python.org/t/pre-pep-discussion-project-status-markers-in-the-index-apis/79356

shadow trellis
#

Hey, all. I'm generating a local mirror with bandersnatch, and my organization's requirements involve either an extremely long allowlist or an extremely long denylist. The way I read it, the only way to implement this is to add 60k lines to the config file under [allowlist].

#

Does the config file processing allow include parameters for pulling in external files?

#

Alternately, is there a better way to go about this?

#

Presume that the lists are entirely arbitrary.

unique wren
unique wren
shadow trellis
#

Yea, configparser doesn't include that. The best you can do is search through the config app-side and layer described configs.

#

But it has to be intentional on the app's side.

unique wren
#

bandersnatch does not

#

No idea is configparser can handle configs of that size too

shadow trellis
#

Makes sense. Maybe I'll add a filter plugin, then. doesn't look too hard.

#

Actually, it looks like the requirement_path allowlist will do what I'm looking for.

unique wren
#

Bug fixes / tweaks welcome

#

all the plugins are exactly this tho, someone had a niche need and they filled it.

we don't have good ci testing the interoperability, ordering etc. etc.

shadow trellis
#

I get that. I've forked, and will submit patches.

narrow grailBOT
#

The change to BandersnatchConfig in https://github.com/pypa/bandersnatch/commit/f405f4878e5d90efd113fbfbe5b7a87b08bd5491, released in 6.6, breaks code written for previous versions.

The commit notes "As (mostly) an implementation detail, BandersnatchConfig is changed to be a subclass of ConfigParser. The BandersnatchConfig singleton can be used anywhere a ConfigParser
instance is expected without having to use '.config' to access a nested ConfigParser." (emphasis mine)

It's not "without...

narrow grailBOT
#

See https://mail.python.org/archives/list/pypi-announce@python.org/thread/5VOX33ARFQUYKIMKM5NS7PM7Z6ZNCSJY/ and:

The following PyPI XMLRPC methods are being permanently deprecated:

list_packages
package_releases
release_urls
release_data

Technically https://warehouse.pypa.io/api-reference/xml-rpc.html#mirroring-support did not deprecated the list_packages_with_serial RPC, but in practice it times out and should ...

wanton steeple
# narrow grail

This change was me - I was not aware that any projects consumed Bandersnatch as a library. It looks like Pulp is also using the Mirror etc. classes.

unique wren
#

Yeah โ€ฆ itโ€™s a big user

narrow grailBOT
narrow grailBOT
#

bandersnatch.conf
`
[mirror]
directory = /opt/pypi-mirror
master = https://pypi.org
download-mirror = https://pypi.tuna.tsinghua.edu.cn
download-mirror-no-fallback = false

json = true
timeout = 300
workers = 10
hash-index = false
stop-on-error = false
delete-packages = true
compare-method = stat

[plugins]
enabled =
blocklist_project
allowlist_project
latest_release

[latest_releases]
keep = 3

[blocklist]
platforms =
macos
freebsd
`

I was able to synchronize 800G o...

narrow grailBOT
#

/etc/bandersnatch.conf

[mirror]
directory = /mirror/xtimes-repo/pypi
json = true
release-files = true
cleanup = false
master = https://pypi.org
timeout = 60
global-timeout = 1800
workers = 3
hash-index = false
stop-on-error = false
storage-backend = filesystem
verifiers = 3

I have synchronized everything to the local PYPI repository, but I found that there are no indexes and packages for tensorflow and pytorch. What should I do?

cmd๏ผš
bandersnatch mirror

narrow grailBOT
#

On my Python package mirror I have bandersnatch 6.5.0, I noticed a few packages are missing.
For ex:

2025-09-22T11:21:42,494 pip._internal.exceptions.InstallationError: Could not install requirement setuptools from https://pip.mymirrors.com/pypi-repo/latest/web/packages/bb/e1/ed2dd0850446b8697ad28d118df885ad04140c64ace06c4bd559f7c8a94f/setuptools-69.0.2-py3-none-any.whl#sha256=1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2 because of HTTP error 404 Client Error: Not Foun...
narrow grailBOT
#

Summary

Currently, when filtering configuration is changed to exclude certain files (e.g., using exclude_platform to filter out old Python versions), bandersnatch does not automatically delete previously mirrored files that are now excluded by the active filters. This results in wasted storage space and creates a mismatch between user expectations and actual mirror contents.

Problem

When users update their filtering configuration to be more restrictive (for example, excluding packa...

narrow grailBOT
#

Hi,

I have been running bandersnatch mirror on my mirror instance, but I consistently get only a limited number of entries in the todo file (about 102), and the total number of packages mirrored is way below the expected count (should be thousands, but is much lower).

My setup:

  • Bandersnatch version: 6.6.0
  • Python version: 3.13.3
  • OS: c6gn.4xlarge
  • Storage backend: S3

Config (/etc/bandersnatch.conf):

Show config

[mirror]
master = https://pypi.org
workers = 10
verifiers =...
unique wren
#

/kick @teal python /ban

narrow grailBOT
grizzled matrix
#

uh... that looks potentially malicious?

narrow grailBOT
narrow grailBOT
unique wren
#

Been awhile

unique wren
narrow grailBOT
unique wren
#

Ok - 7.0.0 time. Going to:

  • Remove swift support - https://github.com/pypa/bandersnatch/pull/2081 (no one help maintain it)
  • default us to PEP691 JSONv1 output for pacakges to sync (>=6.7.0 allows config enableding this)
    • removing the need for xmlrpc - cc: @stuck aurora + @umbral cradle
      • So we can prob make a deprecation plan for PyPI ... I'll open an issue when I ship the feture to 7.0.0.dev0
  • remote py3.11 support
GitHub

Was added years ago but maintainer has go awol
Happy to rediscuss this at any time, but as a sole maintainer I don&#39;t see large usership / worth the overhead for us (me) to maintian

Small b...

teal moss
# narrow grail

@unique wren this is still live but I'm pretty sure you can delete the issue if you have permissions to

unique wren
#

I don't think I can

narrow grailBOT
narrow grailBOT
narrow grailBOT
#

Please forgive me if this is an inappropriate way to open a support request; I am happy to move this to the correct forum if redirected.

I have created a bandersnatch mirror (1) with the banderx server (with an SSL certificate added) in a Rocky Linux 9 VM, and it works great. I am able to change my pip.conf to point to this mirror and install packages as normal. But what I would really like to do is bandersnatch mirror (2) this bandersnatch mirror (1).

In the /srv/pypi/web folder, I'v...

narrow grailBOT
narrow grailBOT
#

Hello,

Q1

Trying to use "webfs" on WSL running Ubuntu 24.04.3 to serve my mirrored pip-packages downloaded through Bandersnatch.
I currently have webfs setup already which serves a local repo of Ubuntu packages and it works fine.
However when I configured "pip.ini" on another machine (Windows, running Python 3.12.7) as following:

[global]
index-url=http://myhost:8080/bandersnatch/web/simple
trusted-host=myhost

and then proceeded to try and download "simple-repository-browser" I ...

unique wren
#

Fun fun webserving side issues here I feel

unique wren
#

Wow - no upgrade PRs open for the first time in a long time

#

Thanks to a new docs myst-parsers released finally!

narrow grailBOT
#

Hi.

I am using Bandersnatch 7.0.1 on Debian 13 to mirror packages to a filesystem with POSIX ACLs. It syncs packages fine, but when it is trying to build an index page - it fails with the following error:

2026-01-27 19:07:29,101 INFO: No metadata filters are enabled. Skipping metadata filtering (mirror.py:76)
2026-01-27 19:07:29,101 INFO: Generating global index page. (simple.py:258)
Traceback (most recent call last):
  File "/mnt/storage/home/mirrorer/scripts/pypi/bin/bandersnatch"...
narrow grailBOT
unique wren
#

Sweet.

thick dagger
#

Lol, I never heard of bandersnatch, but I know all maintainers, except @unique wren ๐Ÿคฃ Oh, Theuni created it ๐Ÿ™‚

unique wren
#

None of them but me have touch it in years ...

#

Has Christian returned to any open source work?

#

He basically handed me the keys and ran

#

FWIW - I hate the name

thick dagger
#

Which Christian? There are so many ... Zagy, Theuni, Kauhaus, Schmidt.. ๐Ÿ™‚ I think you won't get employed at their company unless you are named Christian ๐Ÿ™‚ But I think you talk of Theuni? Yes, he does a couple of open source projects, basically they now have a hosting company, and everything is open source they do.

unique wren
#

Yeah, talking about Theune

thick dagger
unique wren
#

He would probably hate that bandersnatch is all strictly typed python now. he seemed to hate it when I showed up with typed PRs

#

Wonder if he has come around

#

Nope - All of batou is untyped. Yuck.

#

Backy too

thick dagger
unique wren
#

๐Ÿ˜ฎ

#

Mandate shared password safe now surely ?

quaint schooner
#

๐Ÿคฃ

#

That's a fun day.

unique wren
#

Yeah, sounds it. I know my alcohol would get a beating ๐Ÿ˜„

vale swan
#

@unique wren clicked "accept"

#

now technically I'm a PyPA Member, huh.

unique wren
#

Welcome ๐Ÿ˜„

#

Thankyou for your service

vale swan
#

๐Ÿ˜„

unique wren
#

I've been asking for a second active bandersnatch member for Y E A R S

#

So thankyou ๐Ÿ™‚

vale swan
#

I mean, I have a long way before I'll be writing any code for bandersnatch. At least running bandersnatch once would be a good start lol

unique wren
#

You can just run the CI locally. That's how I test it these days.

#

I really need to update the PyPI instance version to 5.0.0

#

I just can't get a test instance from Ee

#

I have access to the prod one. LoL

vale swan
#

wow.

pallid barn
#

hey ๐Ÿ™‚

#

@unique wren sorry that you feel like "i ran" ๐Ÿ˜‰

unique wren
#

haha ๐Ÿ˜„ You gave good reason. All good

pallid barn
#

and yeah, not a fan of full type annotations, still

#

ยฏ_(ใƒ„)_/ยฏ

unique wren
#

You're an evil man

#

But, each to their own.

#

Bandersnatch is very strictly typed these days. It found subtle bugs.

pallid barn
#

cool

unique wren
#

I got it all asyncio, windows suppot and it's >= 3.8 these days.

pallid barn
#

Nice ๐Ÿ™‚

unique wren
#

Do you also hate black formatting?

pallid barn
#

I just cleaned up one of my early asyncio-based projects a few weeks ago and similar to my initial experience with twisted a long time ago: one has to get it quite wrong initially to understand.

#

Yes, of course! ๐Ÿ™‚

unique wren
#

LoL - It's all black formatted too

pallid barn
#

sure thing

#

the idea was that others than me can take over, so you do what you do

unique wren
#

I contribute to black. It was invented at the desk next to me @ #dayJob

pallid barn
#

I guess that makes it more palatable.

unique wren
#

I helped chose most of it's early syntax choices. So it does great for me.

#

Well glad you're all good and stuff

pallid barn
#

I'm absolutely for automatic formatting and I'm using yapf both personally and in my team. But we really really did not like some of the style choices.

unique wren
#

Ee couldn't believe we've never met (Ernest @ PSF/Warehouse)

#

Fair enough

pallid barn
#

Yeah.

unique wren
#

Yapf is slow

pallid barn
#

I used to come to PyConUS regulary

#

oh it definitely is slow ๐Ÿ™‚

#

but it's faster than me formatting it ๐Ÿ˜‰

unique wren
#

Agree a formatter is better the no formatter

pallid barn
#

I had to stop coming as I had to focus more on building my company and got married and had kids, and build a house, and so on.

unique wren
#

Nice nice. Maybe one day we can grab a beer in Germany

#

*bier

pallid barn
#

I'm also happy to use black when a project uses it. It's just really interesting that for some reason a good number of tools / styles / ... over the last years went into exactly the opposite directions from what I grew up with / used to. And many times when I try to force myself to adapting those styles they keep triggering me in such heavy ways that I just can't.

#

Took a while to switch from HG to Git and I still get tripped up about the horrible usability from time to time.

#

So, as jugmac poked me about the discord here - you guys don't really need anything from me, right?

unique wren
#

haha - I gave in at a PyCon and moved bandersnatch to github for the fact contributors just know it

unique wren
#

nice to hear from you tho

pallid barn
#

sure

#

what made git work for me was spending the money on the sublime merge client.

unique wren
#

I can live with both.

hg with all the Facebook plugins is superior tho.

pallid barn
#

it's really weird that even after a few years the git "UI" does not want to fit my brain

#

but i do enjoy some of the features that were not as direct in hg, like rebase+force push still feels dirty but works quite nicely.

#

we jumped hg as the proper hosting facilities all went belly up

unique wren
#

Yeah, that all died sadly.

pallid barn
#

once bitbucket dropped the ball and gitlab never picked it up we basically just bowed to the majority. and that's something i've become a bit disenfranchised with some open source communities.

#

I personally enjoy open source a lot for the variety.

#

But maybe 5-6 years ago i started feeling a "winner takes it all" vibe in some communities (black communicating in a similar fashion) and that just does not resonate with me.

unique wren
#

We never expect black to go the way it did. It was made for FB / IG + Lukasz and I just wanted it for our projects. We just wanted a Python gofmt

#

*expected

#

Got sick of people formatting differently everywhere across projects and our company

pallid barn
#

Yeah, that's where I'm all aboard. And I understand that communicating strongly/boldy is a good marketing move.

#

It just makes it a complete non-starter for me to even want to get involved.

#

And I get that you didn't intend that - unexpected consequences and such. ๐Ÿ™‚

#

Oh and yeah, if you're around in Germany I'm more than happy to have you over for a beer!

#

Alright. It's 6:30 over here and I have to get the kids some breakfast.

#

I'll keep the discord server in my rotation, so I'll be happy to talk.

unique wren
#

@pallid barn Sweet mate. All the best.

winter mauve
#

๐Ÿ™‚

vale swan
unique wren
#

Itโ€™s a simple thing. It gets simple docs.

#

I feel in the main page / QuickStart section was my thought

vale swan
#

I don't think the RTD docs have a quickstart

#

the index / main page would also work well

#

I'll go with that first

unique wren
#

Better reactions here than IRC

vale swan
#

๐Ÿ˜…

split jungle
unique wren
#

@vale swan is dynamically generating the help output

split jungle
#

ah cool ๐Ÿ™‚ nm then

vale swan
split jungle
#

oh yeah that's what I thought

#

but IMHO sphinx-argparse-cli is better than showing the output of -h ๐Ÿ™‚

#

to get an impression what you'd get

vale swan
#

I'll look into, it looks pretty slick (/me wonders if there's anything for click based CLIs)

split jungle
#

click under the hood just uses argparse ๐Ÿ™‚ so should work for it

vale swan
#

But it appears sphinx-argparse-cli needs a function that returns an instance of argparse.ArgumentParser so I'm not sure how I would get click to provide that ...

vale swan
#

I totally did not forget to add a changelog entry ๐Ÿ™ƒ ... will fix

#

it's really useful the changelog entry check, just still gotta extract it into its own repo

split jungle
vale swan
#

ah ok, so you know less about using click with that than I had expected ๐Ÿ˜„

#

I may or may not look into it for black, probably will get delayed into "abandoned" territory though

split jungle
#

never mind me then ๐Ÿ™‚ I was assuming it's using argparser under the hood ๐Ÿ™‚