-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'collections' has no attribute 'Callable' with python-dateutil<2.7 for Python >= 3.10 #3339
Comments
Hi @pcjedi, as we can see in the stacktrace you linked:
This error is coming from python-dateutil itself not from botocore. The issue you're encountering is because python-dateutil does not support Python 3.10 prior to 2.9 as noted in their metadata. This isn't a detail we intend to manage for upstream libraries. It adds more complexity to dependencies between projects and is likely to have unintended ripple effects. |
Hi @nateprewitt , |
This issue is not limited to testing, but can also occur in production when using python >= 3.10 The specific error:
can be reproduced with the following steps: pip install boto3 "python-dateutil<2.7"
python -c "import boto3; boto3.client('s3').list_buckets()" This demonstrates that adding |
@pcjedi to be clear, everything is incompatible with python-dateutil in Python>=3.10, because the library explicitly does not support Python 3.8 or later. That is not an issue with botocore. As stated above, we won't generally micromanage other libraries version requirements. Especially if the failures are not related to our code. Looking back, python-dateutil should have used |
@nateprewitt on these 3 things i have remarks:
python-dateutil supports python >=2.7, !=3.0.*, !=3.1.*, !=3.2.* via python_requires
Let me summarize for whom this issue is of concern. maintainers of python code/packages, that:
these packages might be private due to corporate interests, like in my case. But i have provided a minimal example |
Hi @pcjedi, thanks for reaching out and raising this issue. For the reasons @nateprewitt mentioned, and because raising the floor of a version pin can be breaking, we've chosen to leave the pins where they are. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
While investigating issue #3338, it was discovered that running the
botocore
test suite withpython-dateutil<2.7
causes multiple test failures, but only when using Python versions >= 3.10. This suggests thatbotocore
relies on behavior or bug fixes inpython-dateutil
that are only present inpython-dateutil>=2.7
, and the issue appears specifically when using newer Python versions.Regression Issue
Expected Behavior
The
botocore
test suite should pass with all supported versions ofpython-dateutil
as per the version constraints specified in its dependencies, and the tests should be compatible with Python >= 3.10.Current Behavior
When testing
botocore
withpython-dateutil<2.7
and Python >= 3.10, multiple test cases fail. For example, running tests withpython-dateutil==2.6.1
results in failures such as:a complete list can be seen at
https://github.com/pcjedi/botocore/actions/runs/12727041761/job/35476098457
This behavior suggests that
botocore
inadvertently depends on features or bug fixes that are only present inpython-dateutil>=2.7
.Reproduction Steps
To reproduce this issue, use the following script:
This will install
botocore
along withpython-dateutil==2.6.1
and run the test suite, which will fail with Python >= 3.10Possible Solution
Update the version constraint for
python-dateutil
inbotocore
to>=2.7
. Testing has shown that allbotocore
tests pass successfully withpython-dateutil>=2.7
.https://github.com/pcjedi/botocore/actions/runs/12726749722
Additional Information/Context
This issue specifically affects testing with Python >= 3.10 and
python-dateutil<2.7
SDK version used
1.36.0
Environment details (OS name and version, etc.)
debian
The text was updated successfully, but these errors were encountered: