prompt stringlengths 42 39.4k | label stringlengths 15 28 | metadata dict |
|---|---|---|
Add support for EC2 state 'OutOfService' in moto ELB 'describe_instance_health'
Add support for instance state 'OutOfService' in moto ELB 'describe_instance_health'
https://github.com/spulec/moto/blob/master/moto/elb/responses.py#L260
mocking doesn't have support for 'OutOfService', once an instance is registered t... | getmoto__moto-5154 | {
"instance_id": "getmoto__moto-5154",
"problem_statement": "Add support for EC2 state 'OutOfService' in moto ELB 'describe_instance_health'\nAdd support for instance state 'OutOfService' in moto ELB 'describe_instance_health'\r\nhttps://github.com/spulec/moto/blob/master/moto/elb/responses.py#L260\r\n\r\nmocking d... |
Inconsistent `us-west-1` availability zones
`us-west-1` only has [2 availability zones accessible to customers](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/). The [mapping of availability zone name to availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) ... | getmoto__moto-5513 | {
"instance_id": "getmoto__moto-5513",
"problem_statement": "Inconsistent `us-west-1` availability zones\n`us-west-1` only has [2 availability zones accessible to customers](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/). The [mapping of availability zone name to availability zone ID](https://d... |
Apigateway REST getExport as Swagger
Currently the operation `get_export` is not covered in moto, this issue is just to formalize the request to cover this functionality.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-export-api.html
| getmoto__moto-5844 | {
"instance_id": "getmoto__moto-5844",
"problem_statement": "Apigateway REST getExport as Swagger\nCurrently the operation `get_export` is not covered in moto, this issue is just to formalize the request to cover this functionality.\r\n\r\nhttps://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-exp... |
Scheduler not raising ConflictException when duplicate schedules created
Boto3 will raise a `ConflictException` when an Eventbridge schedule is created with the same name as an existing schedule. While mocking with moto, this exception is not raised. The response returns a success status and the second schedule is simp... | getmoto__moto-6641 | {
"instance_id": "getmoto__moto-6641",
"problem_statement": "Scheduler not raising ConflictException when duplicate schedules created\nBoto3 will raise a `ConflictException` when an Eventbridge schedule is created with the same name as an existing schedule. While mocking with moto, this exception is not raised. The... |
SNS publish_batch issue with RawMessageDelivery
To reproduce: https://github.com/spulec/moto/pull/4818
The behavior between `sns.publish` and `sns.publish_batch` seems to be slightly different, in `sns.publish` the message attributes are handled with `SNSResponse._parse_message_attributes`.
This leads to an excep... | getmoto__moto-4881 | {
"instance_id": "getmoto__moto-4881",
"problem_statement": "SNS publish_batch issue with RawMessageDelivery\nTo reproduce: https://github.com/spulec/moto/pull/4818\r\n\r\nThe behavior between `sns.publish` and `sns.publish_batch` seems to be slightly different, in `sns.publish` the message attributes are handled w... |
Organizations close_account doesn't match public API
The Organizations close_account API was added in #5040.
It doesn't match the spec of the public [CloseAccount](https://docs.aws.amazon.com/organizations/latest/APIReference/API_CloseAccount.html) API.
> If the action is successful, the service sends back an HTT... | getmoto__moto-5072 | {
"instance_id": "getmoto__moto-5072",
"problem_statement": "Organizations close_account doesn't match public API\nThe Organizations close_account API was added in #5040.\r\n\r\nIt doesn't match the spec of the public [CloseAccount](https://docs.aws.amazon.com/organizations/latest/APIReference/API_CloseAccount.html... |
DynamoDB UpdateExpression Syntax with Special Characters Rejected with ValidationException
Looks like this might relate to #4580
### Problem Statement
I am working with some internal tables where we use attributes prefixed by the underscore character to indicate metadata fields on DynamoDB records. For example, the... | getmoto__moto-6082 | {
"instance_id": "getmoto__moto-6082",
"problem_statement": "DynamoDB UpdateExpression Syntax with Special Characters Rejected with ValidationException\nLooks like this might relate to #4580\r\n\r\n### Problem Statement\r\nI am working with some internal tables where we use attributes prefixed by the underscore cha... |
get_list_from_ddb_typed_value crashes on missing value
Given update expression `SET #0 = list_append (#0, :0)`, if `#0` refers to a non-existent list, then `get_list_from_ddb_typed_value` crashes on
```python
assert isinstance(node, DDBTypedValue)
```
(since `node` is a `NoneExistingPath` at that point)
| getmoto__moto-6011 | {
"instance_id": "getmoto__moto-6011",
"problem_statement": "get_list_from_ddb_typed_value crashes on missing value\nGiven update expression `SET #0 = list_append (#0, :0)`, if `#0` refers to a non-existent list, then `get_list_from_ddb_typed_value` crashes on\r\n```python\r\nassert isinstance(node, DDBTypedValue)\... |
Bug: can't call SetIdentityMailFromDomain with Email address
Stack:
localstack 2.2.0 docker image
go 1.21.0
aws-sdk-go-v2
Code:
```
_, err = client.SetIdentityMailFromDomain(ctx, &ses.SetIdentityMailFromDomainInput{
Identity: aws.String("test@foo.com"),
BehaviorOnMXFailure: types.BehaviorOnMX... | getmoto__moto-6755 | {
"instance_id": "getmoto__moto-6755",
"problem_statement": "Bug: can't call SetIdentityMailFromDomain with Email address\nStack:\r\n\r\nlocalstack 2.2.0 docker image\r\ngo 1.21.0\r\naws-sdk-go-v2\r\n\r\nCode:\r\n\r\n```\r\n_, err = client.SetIdentityMailFromDomain(ctx, &ses.SetIdentityMailFromDomainInput{\r\n\tIde... |
ACM certificate with domain validation options not idempotent
# Problem
This is a follow up to https://github.com/getmoto/moto/issues/7138, but is technically a different issue, so I have opened a new one.
I noticed when doing some checks for idempotency that the acm cert was being destroyed and recreated each tim... | getmoto__moto-7233 | {
"instance_id": "getmoto__moto-7233",
"problem_statement": "ACM certificate with domain validation options not idempotent\n# Problem\r\nThis is a follow up to https://github.com/getmoto/moto/issues/7138, but is technically a different issue, so I have opened a new one. \r\n\r\nI noticed when doing some checks for ... |
How to paginate Organizations:ListAccountsForParent?
Moto3 doesn't yet paginate the response from Organizations list_accounts_for_parent.
I need to paginate this API in my application and I'd like to test it with moto.
I tried to implement it myself by adapting the changes for the list_accounts API made recently ... | getmoto__moto-5137 | {
"instance_id": "getmoto__moto-5137",
"problem_statement": "How to paginate Organizations:ListAccountsForParent?\nMoto3 doesn't yet paginate the response from Organizations list_accounts_for_parent.\r\n\r\nI need to paginate this API in my application and I'd like to test it with moto.\r\n\r\nI tried to implement ... |
EC2: Add support for hibernation APIs in `describe_instances`
This is feature request expands on https://github.com/getmoto/moto/issues/5336. While `HibernationOptions` are supported in many AWS APIs, the other one where it would be valuable to add support is [describe_instances](https://boto3.amazonaws.com/v1/document... | getmoto__moto-6906 | {
"instance_id": "getmoto__moto-6906",
"problem_statement": "EC2: Add support for hibernation APIs in `describe_instances`\nThis is feature request expands on https://github.com/getmoto/moto/issues/5336. While `HibernationOptions` are supported in many AWS APIs, the other one where it would be valuable to add suppo... |
Supporting tags operations on ssm MaintenanceWindow resources
## Issue description
Add/List/Remove tags operations are not supported on MaintenanceWindow resources. (They fail with 'InvalidResourceId' errors)
## Reproduction (with awslocal, which uses moto's SSM backend under the hood)
`awslocal ssm add-tags-t... | getmoto__moto-6350 | {
"instance_id": "getmoto__moto-6350",
"problem_statement": "Supporting tags operations on ssm MaintenanceWindow resources\n## Issue description\r\n\r\nAdd/List/Remove tags operations are not supported on MaintenanceWindow resources. (They fail with 'InvalidResourceId' errors)\r\n\r\n## Reproduction (with awslocal,... |
BUG: mock_dynamodb not handling query key conditions correctly
When making a dynamo query that compares a substituted ExpressionAttributeName against a literal value, moto accepts this comparison with no issue, but real AWS resources reject it as invalid. This allowed a bug in our query logic to get past our test suite... | getmoto__moto-6784 | {
"instance_id": "getmoto__moto-6784",
"problem_statement": "BUG: mock_dynamodb not handling query key conditions correctly\nWhen making a dynamo query that compares a substituted ExpressionAttributeName against a literal value, moto accepts this comparison with no issue, but real AWS resources reject it as invalid... |
Cloudfront - CustomHeaders in origin missing
I'm trying to test an update of a custom header on an origin, but when I create the distribution, the customHeaders field is always empty (`{'Quantity': 0, 'Items': []}`). If I update the distribution still having same issue.
```python
import unittest
from moto import m... | getmoto__moto-7371 | {
"instance_id": "getmoto__moto-7371",
"problem_statement": "Cloudfront - CustomHeaders in origin missing\nI'm trying to test an update of a custom header on an origin, but when I create the distribution, the customHeaders field is always empty (`{'Quantity': 0, 'Items': []}`). If I update the distribution still ha... |
Aurora Postgres Does Not Support Mock ServerlessV2
From what I can tell, Aurora Postgres does not support ServerlessV2ScalingConfiguration like Neptune does. Support for this would be great!
| getmoto__moto-6736 | {
"instance_id": "getmoto__moto-6736",
"problem_statement": "Aurora Postgres Does Not Support Mock ServerlessV2\nFrom what I can tell, Aurora Postgres does not support ServerlessV2ScalingConfiguration like Neptune does. Support for this would be great!\n",
"remote_env_info": {
"instance_id": "getmoto__moto-67... |
Cognito client describe_user_pool does not return with associated domain
Hi,
I would like to test our programmatically created user pool's domain but it seems that the user pool's domain property is not implemented in the `describe_user_pool()` response in moto.
I'm using boto version `1.24.20` and moto version `3.... | getmoto__moto-5286 | {
"instance_id": "getmoto__moto-5286",
"problem_statement": "Cognito client describe_user_pool does not return with associated domain\nHi,\r\n\r\nI would like to test our programmatically created user pool's domain but it seems that the user pool's domain property is not implemented in the `describe_user_pool()` re... |
Scheduler should raise ResourceNotFoundException for delete_schedule if not exists
Calling delete_schedule for unknown schedule name raises KeyError instead of ResourceNotFoundException.
```
File "/Source/SH-service/.venv/lib/python3.8/site-packages/moto/scheduler/responses.py", line 60, in delete_schedule
sel... | getmoto__moto-7168 | {
"instance_id": "getmoto__moto-7168",
"problem_statement": "Scheduler should raise ResourceNotFoundException for delete_schedule if not exists\nCalling delete_schedule for unknown schedule name raises KeyError instead of ResourceNotFoundException.\r\n```\r\n File \"/Source/SH-service/.venv/lib/python3.8/site-pack... |
AllocationTime is not presented in result of describe_hosts
## Issue
In latest version of moto (and probably older ones too) `describe_hosts` function does not return AllocationTime.
From moto perspective it can be something like `date.now` when dedicated hoist being created so it can be returned when describe host b... | getmoto__moto-7012 | {
"instance_id": "getmoto__moto-7012",
"problem_statement": "AllocationTime is not presented in result of describe_hosts\n## Issue\r\nIn latest version of moto (and probably older ones too) `describe_hosts` function does not return AllocationTime.\r\nFrom moto perspective it can be something like `date.now` when de... |
EventBridge API Destinations
A few weeks ago AWS announced the new [API Destinations](https://aws.amazon.com/blogs/compute/using-api-destinations-with-amazon-eventbridge/) functionality for EventBridge and I'm eager to try it out and implement it into `moto` directly, but I need some guidance on triggering the API endp... | getmoto__moto-6777 | {
"instance_id": "getmoto__moto-6777",
"problem_statement": "EventBridge API Destinations\nA few weeks ago AWS announced the new [API Destinations](https://aws.amazon.com/blogs/compute/using-api-destinations-with-amazon-eventbridge/) functionality for EventBridge and I'm eager to try it out and implement it into `m... |
IoT - thingId not present after create_thing()
```
import boto3
from moto import mock_iot
@mock_iot
def test_create_thing():
client = boto3.client("iot", region_name="ap-northeast-1")
thing = client.create_thing(
thingName="IDontHaveAThingId"
)
assert thing["thingName"] == "IDontH... | getmoto__moto-7081 | {
"instance_id": "getmoto__moto-7081",
"problem_statement": "IoT - thingId not present after create_thing()\n```\r\nimport boto3\r\nfrom moto import mock_iot\r\n\r\n@mock_iot\r\ndef test_create_thing():\r\n client = boto3.client(\"iot\", region_name=\"ap-northeast-1\")\r\n\r\n thing = client.create_thing(\r\n... |
CognitoIDP: The global_sign_out action has not been implemented
self = <moto.cognitoidp.responses.CognitoIdpResponse object at 0x000002058799AA60>
def call_action(self):
headers = self.response_headers
try:
self._authenticate_and_authorize_normal_action()
except HTTPExce... | getmoto__moto-5086 | {
"instance_id": "getmoto__moto-5086",
"problem_statement": "CognitoIDP: The global_sign_out action has not been implemented\nself = <moto.cognitoidp.responses.CognitoIdpResponse object at 0x000002058799AA60>\r\n\r\n def call_action(self):\r\n headers = self.response_headers\r\n\r\n try:\r\n ... |
Request AWS::EMR::Cluster resource to be added to cloudformation
Request for AWS::EMR::Cluster to be added to cloudformation. This is used for our testing and we would like to request this resource to be added.
| getmoto__moto-7446 | {
"instance_id": "getmoto__moto-7446",
"problem_statement": "Request AWS::EMR::Cluster resource to be added to cloudformation\nRequest for AWS::EMR::Cluster to be added to cloudformation. This is used for our testing and we would like to request this resource to be added. \r\n\n",
"remote_env_info": {
"instan... |
Type Error when using revoke_security_group_egress
Hello I am currently getting a type error for the following boto3 method:
- revoke_security_group_egress
This is due to the following lines of code:
https://github.com/getmoto/moto/blob/2c9c7a7a63e7ca0526e433f76902c40801ab02cc/moto/ec2/models/security_groups.py#... | getmoto__moto-6057 | {
"instance_id": "getmoto__moto-6057",
"problem_statement": "Type Error when using revoke_security_group_egress\nHello I am currently getting a type error for the following boto3 method:\r\n\r\n- revoke_security_group_egress\r\n\r\nThis is due to the following lines of code:\r\nhttps://github.com/getmoto/moto/blob/... |
DynamoDb2.client.transact_write_items transactions on same item
transact_write_items does not allow several transactions on the same item
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.transact_write_items
> TransactWriteItems is a synchronous write operatio... | getmoto__moto-4787 | {
"instance_id": "getmoto__moto-4787",
"problem_statement": "DynamoDb2.client.transact_write_items transactions on same item\ntransact_write_items does not allow several transactions on the same item\r\n\r\nhttps://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.tran... |
CloudTrail NotImplementedError: The put_event_selectors action has not been implemented
## reproduce the issue using below code piece
* The Class file
```
import logging
import boto3
import json
from botocore.exceptions import ClientError
class accessLogger:
logger = logging.getLogger()
def __i... | getmoto__moto-4875 | {
"instance_id": "getmoto__moto-4875",
"problem_statement": "CloudTrail NotImplementedError: The put_event_selectors action has not been implemented\n## reproduce the issue using below code piece\r\n\r\n* The Class file\r\n```\r\nimport logging\r\nimport boto3\r\nimport json\r\n\r\nfrom botocore.exceptions import C... |
CloudFront: list_invalidations includes empty element if no invalidations
## How to reproduce the issue
```python
@mock_cloudfront
def test_list_invalidations__no_entries():
client = boto3.client("cloudfront", region_name="us-west-1")
resp = client.list_invalidations(
DistributionId="SPAM",
... | getmoto__moto-5699 | {
"instance_id": "getmoto__moto-5699",
"problem_statement": "CloudFront: list_invalidations includes empty element if no invalidations\n## How to reproduce the issue\r\n\r\n```python\r\n@mock_cloudfront\r\ndef test_list_invalidations__no_entries():\r\n client = boto3.client(\"cloudfront\", region_name=\"us-west-... |
Support volumes for LaunchTemplates
```python
import boto3
from moto import mock_ec2
from moto.ec2.models import AMIS
mock = mock_ec2()
mock.start()
ami_id = AMIS[0]["ami_id"]
ec2_client = boto3.client("ec2", region_name="ap-southeast-2")
ec2_client.create_launch_template(
LaunchTemplateName="launchi... | getmoto__moto-5044 | {
"instance_id": "getmoto__moto-5044",
"problem_statement": "Support volumes for LaunchTemplates\n```python\r\nimport boto3\r\nfrom moto import mock_ec2\r\nfrom moto.ec2.models import AMIS\r\n\r\nmock = mock_ec2()\r\nmock.start()\r\n\r\nami_id = AMIS[0][\"ami_id\"]\r\n\r\nec2_client = boto3.client(\"ec2\", region_n... |
ACM certificate does not work with subject alternative names
# Problem
I am unable to successfully run the following Terraform code when the `subject_alternative_names` param is passed to the `aws_acm_certificate` resource. Terraform also shows that there are changes every run due to switching values from the default ... | getmoto__moto-7144 | {
"instance_id": "getmoto__moto-7144",
"problem_statement": "ACM certificate does not work with subject alternative names\n# Problem\r\nI am unable to successfully run the following Terraform code when the `subject_alternative_names` param is passed to the `aws_acm_certificate` resource. Terraform also shows that t... |
ec2 created without keypair has KeyName = 'None'
When creating an instance without a keypair, moto describes the instance as having a keypair called`None`:
```python
import boto3
from moto import mock_ec2
mock = mock_ec2()
mock.start()
ec2_client = boto3.client("ec2", region_name="us-east-1")
ec2_client.ru... | getmoto__moto-5347 | {
"instance_id": "getmoto__moto-5347",
"problem_statement": "ec2 created without keypair has KeyName = 'None'\nWhen creating an instance without a keypair, moto describes the instance as having a keypair called`None`:\r\n\r\n```python\r\nimport boto3\r\nfrom moto import mock_ec2\r\n\r\nmock = mock_ec2()\r\nmock.sta... |
EKS DescribeNodegroup not returning id or name launch template attribute in response
The boto3 EKS DescribeNodegroup response returns the following for LaunchTemplate:
`'launchTemplate': {
'name': 'string',
'version': 'string',
'id': 'string'
},`
However, the moto res... | getmoto__moto-5885 | {
"instance_id": "getmoto__moto-5885",
"problem_statement": "EKS DescribeNodegroup not returning id or name launch template attribute in response\nThe boto3 EKS DescribeNodegroup response returns the following for LaunchTemplate:\r\n`'launchTemplate': {\r\n 'name': 'string',\r\n 'version': 'st... |
Missing vpc security group name from rds.create_db_cluster response
## Reporting Bugs
When we provide a vpc security group id for rds.create_db_cluster, the response of this create returns an empty list for `'VpcSecurityGroups': []`. I am using boto3 & mocking this call using moto library's mock_rds method.
The r... | getmoto__moto-6567 | {
"instance_id": "getmoto__moto-6567",
"problem_statement": "Missing vpc security group name from rds.create_db_cluster response\n## Reporting Bugs\r\nWhen we provide a vpc security group id for rds.create_db_cluster, the response of this create returns an empty list for `'VpcSecurityGroups': []`. I am using boto3... |
Scheduler get_schedule Incomplete Response
The response of Eventbridge Scheduler get_schedule is missing CreationDate and LastModificationDate. These are both part of the response syntax in the boto3 documentation and are missing.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/scheduler/... | getmoto__moto-6510 | {
"instance_id": "getmoto__moto-6510",
"problem_statement": "Scheduler get_schedule Incomplete Response\nThe response of Eventbridge Scheduler get_schedule is missing CreationDate and LastModificationDate. These are both part of the response syntax in the boto3 documentation and are missing. \r\n\r\nhttps://boto3.a... |
Missing accept-ranges from mocked S3 service API response
moto version 4.1.5 - botocore 1.29.96 - boto3 1.26.87 - s3resumable 0.0.3
Am using S3Resumable to handle my file downloads even when interrupted.
Long story short, I am able to mock s3 but it seems the output it generates when getting an object from the ... | getmoto__moto-6157 | {
"instance_id": "getmoto__moto-6157",
"problem_statement": "Missing accept-ranges from mocked S3 service API response\nmoto version 4.1.5 - botocore 1.29.96 - boto3 1.26.87 - s3resumable 0.0.3\r\n\r\n\r\nAm using S3Resumable to handle my file downloads even when interrupted.\r\n\r\nLong story short, I am able to m... |
When modifying EC2 image attribute to add organization ARN to launch permissions, moto silently ignores it.
**How to reproduce**
```
image = boto3.resource("ec2").Image(ami_id)
arn = "someOrganizationArn"
image.modify_attribute(
Attribute="launchPermission",
OperationType="add",
OrganizationArns=[a... | getmoto__moto-7324 | {
"instance_id": "getmoto__moto-7324",
"problem_statement": "When modifying EC2 image attribute to add organization ARN to launch permissions, moto silently ignores it.\n**How to reproduce**\r\n\r\n```\r\nimage = boto3.resource(\"ec2\").Image(ami_id)\r\narn = \"someOrganizationArn\"\r\nimage.modify_attribute(\r\n ... |
AssertionError with SES Templates containing {
Reproduction of Issue
run moto_server
Test Template (testTemplate.json):
`{
"Template": {
"TemplateName": "Test",
"SubjectPart": "Test",
"HtmlPart": "This is a { Test } {{test}}",
"TextPart": "This is a { Test } {{test}}"
}
}`
aws ...... | getmoto__moto-6208 | {
"instance_id": "getmoto__moto-6208",
"problem_statement": "AssertionError with SES Templates containing {\nReproduction of Issue \r\n\r\nrun moto_server\r\n\r\nTest Template (testTemplate.json): \r\n`{\r\n \"Template\": {\r\n \"TemplateName\": \"Test\",\r\n \"SubjectPart\": \"Test\",\r\n \"HtmlPart\": \... |
Stepfunction describe executions returns a double encoded string
## Issue
When running describe_execution as follows, the result is a string not the expected dictionary
``` python
@mock_aws
def test_a(self):
client = boto3.client("stepfunctions")
sf = client.create_state_machine(
name="name",... | getmoto__moto-7567 | {
"instance_id": "getmoto__moto-7567",
"problem_statement": "Stepfunction describe executions returns a double encoded string\n## Issue\r\n\r\nWhen running describe_execution as follows, the result is a string not the expected dictionary\r\n\r\n``` python\r\n@mock_aws\r\ndef test_a(self):\r\n client = boto3.clie... |
s3 get_object to return TagCount
# Summary
The `get_object()` function in boto with the real S3 returns `TagCount` if there are any tags on the object.
With moto, `TagCount` is never returned, but should be.
# Steps to reproduce
Try this with `if True` to use moto, and `if False` to not use moto.
```
impo... | getmoto__moto-4793 | {
"instance_id": "getmoto__moto-4793",
"problem_statement": "s3 get_object to return TagCount\n# Summary\r\n\r\nThe `get_object()` function in boto with the real S3 returns `TagCount` if there are any tags on the object.\r\nWith moto, `TagCount` is never returned, but should be.\r\n\r\n# Steps to reproduce\r\n\r\nT... |
[Enhancement] Add support for `invoke_endpoint_async` in `sagemaker-runtime`
Hi Moto team,
Thanks so much for this great library! I saw recently that you all shipped support for `sagemaker-runtime`'s `invoke_endpoint` method (https://github.com/getmoto/moto/issues/4180 and https://github.com/getmoto/moto/pull/6747).... | getmoto__moto-7211 | {
"instance_id": "getmoto__moto-7211",
"problem_statement": "[Enhancement] Add support for `invoke_endpoint_async` in `sagemaker-runtime`\nHi Moto team,\r\n\r\nThanks so much for this great library! I saw recently that you all shipped support for `sagemaker-runtime`'s `invoke_endpoint` method (https://github.com/ge... |
Full ECR coverage
Is full coverage of ECR planned?
As of now mocking any workflow that involves docker push to an ECR private repository is not supported.
| getmoto__moto-6924 | {
"instance_id": "getmoto__moto-6924",
"problem_statement": "Full ECR coverage\nIs full coverage of ECR planned?\r\n\r\nAs of now mocking any workflow that involves docker push to an ECR private repository is not supported.\n",
"remote_env_info": {
"instance_id": "getmoto__moto-6924",
"image": "hf://datas... |
"Bucket does not exist" thrown from inherited tearDown method in moto 3.0.1
I have this code:
```python
import unittest
import boto3
from moto import mock_s3
@mock_s3
class BaseTest(unittest.TestCase):
def setUp(self) -> None:
self.s3 = boto3.resource('s3')
self.test_bucket = self.s... | getmoto__moto-4799 | {
"instance_id": "getmoto__moto-4799",
"problem_statement": "\"Bucket does not exist\" thrown from inherited tearDown method in moto 3.0.1\nI have this code:\r\n```python\r\nimport unittest\r\n\r\nimport boto3\r\nfrom moto import mock_s3\r\n\r\n\r\n@mock_s3\r\nclass BaseTest(unittest.TestCase):\r\n\r\n def setUp... |
EC2 run_instances BlockDeviceMapping missing support for NoDevice
In [FireSim](https://fires.im/) we use an AMI that by default has two volumes. We only need one of them and thus make use of the `NoDevice` property of [`BlockDeviceMapping`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.... | getmoto__moto-4853 | {
"instance_id": "getmoto__moto-4853",
"problem_statement": "EC2 run_instances BlockDeviceMapping missing support for NoDevice\nIn [FireSim](https://fires.im/) we use an AMI that by default has two volumes. We only need one of them and thus make use of the `NoDevice` property of [`BlockDeviceMapping`](https://docs... |
KeyError: 'clustername' (instead of `DBClusterNotFoundFault`) thrown when calling `describe_db_clusters` for a non-existent cluster
## Moto version:
`3.1.16`
## Repro steps
```python
import boto3
from moto import mock_rds
@mock_rds
def test_bug():
session = boto3.session.Session()
rds = session.cl... | getmoto__moto-5321 | {
"instance_id": "getmoto__moto-5321",
"problem_statement": "KeyError: 'clustername' (instead of `DBClusterNotFoundFault`) thrown when calling `describe_db_clusters` for a non-existent cluster\n## Moto version:\r\n `3.1.16`\r\n\r\n## Repro steps\r\n```python\r\nimport boto3\r\nfrom moto import mock_rds\r\n\r\n@mock... |
Problem with list_object_versions
I'm having some trouble using the function `list_object_versions` using the mock of S3. I create a versioned bucket, put an object and its created with the version id, what is expected, but when I try to list the versions, the dict returned by the `list_object_versions` does not come w... | getmoto__moto-5562 | {
"instance_id": "getmoto__moto-5562",
"problem_statement": "Problem with list_object_versions\nI'm having some trouble using the function `list_object_versions` using the mock of S3. I create a versioned bucket, put an object and its created with the version id, what is expected, but when I try to list the version... |
elbv2.describe_listeners the results are not the same as those returned by AWS
Python Version: 3.6
Moto Version: 2.2.20dev15
When calling elbv2.describe_listeners the results for returned for DefaultActions and Rules are not the same as those returned by AWS.
example call
```
listener = client.elbv2.describe_l... | getmoto__moto-4956 | {
"instance_id": "getmoto__moto-4956",
"problem_statement": "elbv2.describe_listeners the results are not the same as those returned by AWS\nPython Version: 3.6\r\nMoto Version: 2.2.20dev15\r\n\r\nWhen calling elbv2.describe_listeners the results for returned for DefaultActions and Rules are not the same as those r... |
Cognito IDP/ create-resource-server: TypeError if no scopes are provided
If I try to create a ressource servers without scope Moto is crashing with the following error :
```python
self = <moto.cognitoidp.models.CognitoResourceServer object at 0x1096a4750>
def to_json(self) -> Dict[str, Any]:
res: D... | getmoto__moto-7167 | {
"instance_id": "getmoto__moto-7167",
"problem_statement": "Cognito IDP/ create-resource-server: TypeError if no scopes are provided\nIf I try to create a ressource servers without scope Moto is crashing with the following error : \r\n\r\n```python\r\nself = <moto.cognitoidp.models.CognitoResourceServer object at ... |
Implement SecretsManager integration for Parameter store.
Currently `moto` doesn't implement the SecretsManager to SSM integration while also restricting the `/aws` path prefix for `ssm.put_parameter()`. This means there is no way to mock this behaviour.
Docs for the integration: https://docs.aws.amazon.com/systems-... | getmoto__moto-5117 | {
"instance_id": "getmoto__moto-5117",
"problem_statement": "Implement SecretsManager integration for Parameter store.\nCurrently `moto` doesn't implement the SecretsManager to SSM integration while also restricting the `/aws` path prefix for `ssm.put_parameter()`. This means there is no way to mock this behaviour.... |
Add ResourceGroupsTaggingAPI Support for Aurora clusters
Currently moto seems to not support rds:cluster and only supports rds:db . This issues is to ask to add support to fetch the rds aurora clusters using ResourceGroupsTaggingAPI
| getmoto__moto-5999 | {
"instance_id": "getmoto__moto-5999",
"problem_statement": "Add ResourceGroupsTaggingAPI Support for Aurora clusters\nCurrently moto seems to not support rds:cluster and only supports rds:db . This issues is to ask to add support to fetch the rds aurora clusters using ResourceGroupsTaggingAPI \n",
"remote_env_in... |
ec2.describe_security_group_rules does not use filter
## how to reproduce the issue
```
import boto3
from botocore.config import Config
from moto import mock_ec2
with mock_ec2():
config = Config(
region_name="eu-west-1"
)
client = boto3.client("ec2", config=config)
# Cr... | getmoto__moto-6041 | {
"instance_id": "getmoto__moto-6041",
"problem_statement": "ec2.describe_security_group_rules does not use filter\n## how to reproduce the issue\r\n```\r\nimport boto3\r\nfrom botocore.config import Config\r\nfrom moto import mock_ec2\r\n\r\nwith mock_ec2():\r\n config = Config(\r\n region_name=\"eu-... |
CloudFront Update Distribution Expecting Something That Isn't Given Via Boto3
# CloudFront Update Distribution Expecting Something That Isn't Given Via Boto3
# Environment:
```
pip list moto
Package Version
------------------------- ---------
atomicwrites 1.4.1
attrs ... | getmoto__moto-6557 | {
"instance_id": "getmoto__moto-6557",
"problem_statement": "CloudFront Update Distribution Expecting Something That Isn't Given Via Boto3\n# CloudFront Update Distribution Expecting Something That Isn't Given Via Boto3\r\n\r\n# Environment: \r\n\r\n```\r\npip list moto\r\nPackage Version\r\n-----... |
IAM: mock_iam() is keeping the state when working with roles
## Description
I think this is a little bit weird but I'm getting and strange error when executing some tests in a specific order related with IAM policies.
## How to reproduce the issue
It can be tested with the following code, we have two context man... | getmoto__moto-6716 | {
"instance_id": "getmoto__moto-6716",
"problem_statement": "IAM: mock_iam() is keeping the state when working with roles\n## Description\r\n\r\nI think this is a little bit weird but I'm getting and strange error when executing some tests in a specific order related with IAM policies.\r\n\r\n## How to reproduce th... |
cognito-idp can't find users pool by client id
My AWS profile is configured to work with `us-west-2`
~/.aws/config
```
[default]
region = us-west-2
output = json
```
I created new `test-pool` user pool.
```sh
aws --endpoint-url=http://127.0.0.1:5000 \
cognito-idp create-user-pool \
--pool-name... | getmoto__moto-5009 | {
"instance_id": "getmoto__moto-5009",
"problem_statement": "cognito-idp can't find users pool by client id\nMy AWS profile is configured to work with `us-west-2`\r\n\r\n~/.aws/config\r\n```\r\n[default]\r\nregion = us-west-2\r\noutput = json\r\n```\r\n\r\nI created new `test-pool` user pool.\r\n```sh\r\naws --end... |
lambda publish_version() doesn't generate new version
This problem was discovered with moto 4.1.12 but appears to exist with 4.1.14 also.
When calling lambda `publish_version()` on a new function, version "1" is created as expected.
If we then modify the function payload (by calling `update_function_code()` to ch... | getmoto__moto-6586 | {
"instance_id": "getmoto__moto-6586",
"problem_statement": "lambda publish_version() doesn't generate new version\nThis problem was discovered with moto 4.1.12 but appears to exist with 4.1.14 also.\r\n\r\nWhen calling lambda `publish_version()` on a new function, version \"1\" is created as expected.\r\n\r\nIf we... |
No way to apply Configuration Options when using Server Mode
I am using moto in server mode (either by directly running it as a separate docker-compose service, or via `ThreadedMotoServer`), and as far as I can tell there is no way to specify the configuration options documented at https://docs.getmoto.org/en/latest/do... | getmoto__moto-7393 | {
"instance_id": "getmoto__moto-7393",
"problem_statement": "No way to apply Configuration Options when using Server Mode\nI am using moto in server mode (either by directly running it as a separate docker-compose service, or via `ThreadedMotoServer`), and as far as I can tell there is no way to specify the configu... |
DynamoDB `get_item()` should raise `ClientError` for empty key
### What I expect to happen:
When an empty key is provided for a `get_item()` call, AWS's DynamoDB returns an error like this:
> botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the GetItem operation: One or more param... | getmoto__moto-5348 | {
"instance_id": "getmoto__moto-5348",
"problem_statement": "DynamoDB `get_item()` should raise `ClientError` for empty key\n### What I expect to happen:\r\nWhen an empty key is provided for a `get_item()` call, AWS's DynamoDB returns an error like this:\r\n> botocore.exceptions.ClientError: An error occurred (Vali... |
Moto allows syntactically invalid update expressions for DynamoDB
When using the DynamoDB `UpdateItem` API, it is necessary to provide an `UpdateExpression` describing which attributes to update, and the new values. Multiple updates in the same expression are separated by commas. The real DynamoDB does not allow this e... | getmoto__moto-5189 | {
"instance_id": "getmoto__moto-5189",
"problem_statement": "Moto allows syntactically invalid update expressions for DynamoDB\nWhen using the DynamoDB `UpdateItem` API, it is necessary to provide an `UpdateExpression` describing which attributes to update, and the new values. Multiple updates in the same expressio... |
Kinesis get_shard_iterator support does not handle StreamARN parameter
When using the `StreamARN` parameter in the `get_shard_iterator` Kinesis client method (rather than `StreamName`), an UnrecognizedClientException is raised.
[boto3 docs are saying](https://boto3.amazonaws.com/v1/documentation/api/latest/referenc... | getmoto__moto-5893 | {
"instance_id": "getmoto__moto-5893",
"problem_statement": "Kinesis get_shard_iterator support does not handle StreamARN parameter\nWhen using the `StreamARN` parameter in the `get_shard_iterator` Kinesis client method (rather than `StreamName`), an UnrecognizedClientException is raised. \r\n\r\n[boto3 docs are sa... |
Method organizations.list_accounts don't limit accounts by MaxResults
## Reporting Bugs
When calling `organizations.list_accounts(MaxResults=2)` moto doesn't return only 2 AWS Accounts. It returns all accounts present in the organization.
---
Libraries versions below.
```
moto==3.0.7
boto3==1.21.20
boto3-typ... | getmoto__moto-4951 | {
"instance_id": "getmoto__moto-4951",
"problem_statement": "Method organizations.list_accounts don't limit accounts by MaxResults\n## Reporting Bugs\r\n\r\nWhen calling `organizations.list_accounts(MaxResults=2)` moto doesn't return only 2 AWS Accounts. It returns all accounts present in the organization.\r\n---\r... |
rds_client.create_db_snapshot, describe_db_snapshots behavior not right due to the snapshot type attribute
## What went wrong?
Based on this aws document [create_db_snapshot](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds/client/create_db_snapshot.html), the db snapshot created by thi... | getmoto__moto-6444 | {
"instance_id": "getmoto__moto-6444",
"problem_statement": "rds_client.create_db_snapshot, describe_db_snapshots behavior not right due to the snapshot type attribute\n## What went wrong?\r\n\r\nBased on this aws document [create_db_snapshot](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/servic... |
Full Step Functions Execution Support
I didn't see this in the issues, so my apologies if it's already filed.
This is a feature request for full Step Function execution support, such that test code could call sfn.StartExecution and get a production-like execution of a state machine, including retries, error handlin... | getmoto__moto-7418 | {
"instance_id": "getmoto__moto-7418",
"problem_statement": "Full Step Functions Execution Support\nI didn't see this in the issues, so my apologies if it's already filed. \r\n\r\nThis is a feature request for full Step Function execution support, such that test code could call sfn.StartExecution and get a producti... |
ECR batch_delete_image incorrectly adding failures to reponse
https://github.com/spulec/moto/blob/eed32a5f72fbdc0d33c4876d1b5439dfd1efd5d8/moto/ecr/models.py#L634-L651
This block of code appears to be indented one level too far and is running for each iteration of the for loop that begins on line 593 instead of only... | getmoto__moto-4969 | {
"instance_id": "getmoto__moto-4969",
"problem_statement": "ECR batch_delete_image incorrectly adding failures to reponse\nhttps://github.com/spulec/moto/blob/eed32a5f72fbdc0d33c4876d1b5439dfd1efd5d8/moto/ecr/models.py#L634-L651\r\n\r\nThis block of code appears to be indented one level too far and is running for ... |
TimestreamWrite (TimestreamTable.write_records) uses append rather than extend when appropriate.
Near as I can tell this was just an oversight:
https://github.com/spulec/moto/blob/master/moto/timestreamwrite/models.py#L17
Records will never be a single entity per the spec.
https://boto3.amazonaws.com/v1/docume... | getmoto__moto-4860 | {
"instance_id": "getmoto__moto-4860",
"problem_statement": "TimestreamWrite (TimestreamTable.write_records) uses append rather than extend when appropriate.\nNear as I can tell this was just an oversight:\r\n\r\nhttps://github.com/spulec/moto/blob/master/moto/timestreamwrite/models.py#L17\r\n\r\nRecords will never... |
Route53 not truncating long list of records
When there are a lot of Route53 records, `boto3` [`list_resource_record_sets`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53.html#Route53.Client.list_resource_record_sets) returns up to 300 resource records and sets the `Truncate` attribut... | getmoto__moto-4817 | {
"instance_id": "getmoto__moto-4817",
"problem_statement": "Route53 not truncating long list of records\nWhen there are a lot of Route53 records, `boto3` [`list_resource_record_sets`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53.html#Route53.Client.list_resource_record_sets) r... |
Tagging count in S3 response breaks requests
I'm using `requests` to download a file from S3 using a presigned link. Here's example code where I expect it to print `b"abc"` but it throws an exception when calling `requests.get`.
```python
import boto3
import requests
from moto import mock_s3
with mock_s3():
... | getmoto__moto-5258 | {
"instance_id": "getmoto__moto-5258",
"problem_statement": "Tagging count in S3 response breaks requests\nI'm using `requests` to download a file from S3 using a presigned link. Here's example code where I expect it to print `b\"abc\"` but it throws an exception when calling `requests.get`.\r\n\r\n```python\r\nimp... |
DynamoDB: `batch_get_item()` no longer works with `Binary` values
`moto` version `4.2.3` (due to #6816) `batch_get_item()` no longer works with `Binary` values.
We edited [test_dynamodb_batch_get_item.py](https://github.com/getmoto/moto/blob/master/tests/test_dynamodb/test_dynamodb_batch_get_item.py) to create the t... | getmoto__moto-6828 | {
"instance_id": "getmoto__moto-6828",
"problem_statement": "DynamoDB: `batch_get_item()` no longer works with `Binary` values\n`moto` version `4.2.3` (due to #6816) `batch_get_item()` no longer works with `Binary` values.\r\n\r\nWe edited [test_dynamodb_batch_get_item.py](https://github.com/getmoto/moto/blob/maste... |
Cloudfront - get_distribution() does not return same config passed to create_distribution()
When passing in a fully-formed Cloudfront Distribution Configuration, the response back from `create_distribution()` does not contain all of the information passed in. Calling `get_distribution()` with the Id passed back from `... | getmoto__moto-4792 | {
"instance_id": "getmoto__moto-4792",
"problem_statement": "Cloudfront - get_distribution() does not return same config passed to create_distribution()\nWhen passing in a fully-formed Cloudfront Distribution Configuration, the response back from `create_distribution()` does not contain all of the information passe... |
S3 access via spark shows "Path does not exist" after update
I've been using Spark to read data from S3 for a while and it always worked with the following (pyspark) configuration:
```
spark.read. \
.option('pathGlobFilter', f'*.json') \
.option('mode', 'FAILFAST') \
.format('json')
.read('s3://moto-buc... | getmoto__moto-5701 | {
"instance_id": "getmoto__moto-5701",
"problem_statement": "S3 access via spark shows \"Path does not exist\" after update\nI've been using Spark to read data from S3 for a while and it always worked with the following (pyspark) configuration:\r\n\r\n```\r\nspark.read. \\\r\n .option('pathGlobFilter', f'*.json') ... |
elbv2 describe_tags return ResourceArn empty instead of the correct one
## Reporting Bugs
I am using the latest version of moto for elbv2. After create_load_balancer with moto, which return resource 'LoadBalancerArn': 'arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/loadbalancer/50dc6c495c0c9188... | getmoto__moto-4990 | {
"instance_id": "getmoto__moto-4990",
"problem_statement": "elbv2 describe_tags return ResourceArn empty instead of the correct one\n## Reporting Bugs\r\n\r\nI am using the latest version of moto for elbv2. After create_load_balancer with moto, which return resource 'LoadBalancerArn': 'arn:aws:elasticloadbalancing... |
Default RecordDelimiter in select_object_content is a comma while in boto3 it's a newline
I'm using moto 4.1.12, but the following should still be valid for 4.1.14 (newest at time of writing).
The S3 select_object_content is a recent addition which is said to be experimental:
http://docs.getmoto.org/en/latest/do... | getmoto__moto-6618 | {
"instance_id": "getmoto__moto-6618",
"problem_statement": "Default RecordDelimiter in select_object_content is a comma while in boto3 it's a newline\nI'm using moto 4.1.12, but the following should still be valid for 4.1.14 (newest at time of writing).\r\n\r\nThe S3 select_object_content is a recent addition whic... |
Regression when using mock_batch_simple since 4.0.7
Since moto 4.0.7 we noticed some regressions in our unit tests using `mock_batch_simple`. All the jobs container details are empty while they weren't in version 4.0.6.
For instance this code is now failing because there's no 'command' key in the dictionary.
```p... | getmoto__moto-5644 | {
"instance_id": "getmoto__moto-5644",
"problem_statement": "Regression when using mock_batch_simple since 4.0.7\nSince moto 4.0.7 we noticed some regressions in our unit tests using `mock_batch_simple`. All the jobs container details are empty while they weren't in version 4.0.6.\r\n\r\nFor instance this code is n... |
Implement filter 'route.vpc-peering-connection-id' for DescribeRouteTables
Hi, when I try to mock the DescribeRouteTables I got the following error.
`FilterNotImplementedError: The filter 'route.vpc-peering-connection-id' for DescribeRouteTables has not been implemented in Moto yet. Feel free to open an issue at htt... | getmoto__moto-5601 | {
"instance_id": "getmoto__moto-5601",
"problem_statement": "Implement filter 'route.vpc-peering-connection-id' for DescribeRouteTables\nHi, when I try to mock the DescribeRouteTables I got the following error.\r\n\r\n`FilterNotImplementedError: The filter 'route.vpc-peering-connection-id' for DescribeRouteTables h... |
RDS describe_db_clusters is returning cluster not found when passing ClusterArn Filter for DBClusterIdentifier
RDS describe_db_clusters is returning cluster not found when passing ClusterArn Filter for DBClusterIdentifier. Boto3 allow passing either ClusterArn or DBClusterIdentifier passed as filter to look up db clust... | getmoto__moto-6114 | {
"instance_id": "getmoto__moto-6114",
"problem_statement": "RDS describe_db_clusters is returning cluster not found when passing ClusterArn Filter for DBClusterIdentifier\nRDS describe_db_clusters is returning cluster not found when passing ClusterArn Filter for DBClusterIdentifier. Boto3 allow passing either Clus... |
stepfunctions does not respect the flag `SF_EXECUTION_HISTORY_TYPE` across all API's
# Reasoning:
I am trying to use Moto to replicate a failed step function by providing a definition with just a failed state.
# How I found the error:
- Originally as the docs are sparse, I thought that moto might parse the definit... | getmoto__moto-6204 | {
"instance_id": "getmoto__moto-6204",
"problem_statement": "stepfunctions does not respect the flag `SF_EXECUTION_HISTORY_TYPE` across all API's\n# Reasoning:\r\nI am trying to use Moto to replicate a failed step function by providing a definition with just a failed state.\r\n\r\n# How I found the error:\r\n- Orig... |
dataclass does not properly support generics
Please provide more information to help us understand the issue:
* Are you reporting a bug, or opening a feature request?
I believe this is a bug.
* Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would app... | python__mypy-9380 | {
"instance_id": "python__mypy-9380",
"problem_statement": "dataclass does not properly support generics\nPlease provide more information to help us understand the issue:\r\n\r\n* Are you reporting a bug, or opening a feature request?\r\n\r\nI believe this is a bug.\r\n\r\n* Please insert below the code you are che... |
mypyc: `Cls.__dict__` is `mappingproxy`, not `dict`
**Bug Report**
It looks mypy's type inference works fine and it's mypyc (maybe) bug
Maybe it's connected to builtins `vars` signature -- vars by the signature should return `dict`
But it's false, `vars` may return `mappingproxy`:
```
>>> class Foo:
...
>>> F... | python__mypy-14988 | {
"instance_id": "python__mypy-14988",
"problem_statement": "mypyc: `Cls.__dict__` is `mappingproxy`, not `dict`\n**Bug Report**\r\n\r\nIt looks mypy's type inference works fine and it's mypyc (maybe) bug\r\nMaybe it's connected to builtins `vars` signature -- vars by the signature should return `dict`\r\nBut it's ... |
Guard clause prevents `match` from seeing that all paths return
**Bug Report**
In a `match` statement in which all `case`s include a return statement, _mypy_ 0.942 falsely reports "Missing return statement [return]" if at least one `case` includes a guard clause.
**To Reproduce**
```
def func(e) -> int:
... | python__mypy-15882 | {
"instance_id": "python__mypy-15882",
"problem_statement": "Guard clause prevents `match` from seeing that all paths return\n**Bug Report**\r\n\r\nIn a `match` statement in which all `case`s include a return statement, _mypy_ 0.942 falsely reports \"Missing return statement [return]\" if at least one `case` includ... |
Crash when using total_ordering and a Generic class
**Crash Report**
When using a test snippet that uses `functools.total_ordering` and a `Generic` class whose `TypeVar` is bound by some other class, there is an internal crash in mypy. The reproduction cases are below the traceback.
This may be related to #8539, ... | python__mypy-12767 | {
"instance_id": "python__mypy-12767",
"problem_statement": "Crash when using total_ordering and a Generic class\n**Crash Report**\r\n\r\nWhen using a test snippet that uses `functools.total_ordering` and a `Generic` class whose `TypeVar` is bound by some other class, there is an internal crash in mypy. The reprodu... |
Support __path__ in packages
The name `__path__` is defined in packages but mypy doesn't recognize it. It seems that every `__init__.py[i]` file should have an implicit `__path__` attribute with type `List[str]`. (I encountered some code that uses `__path__` -- I didn't know about it until today.)
See also: https://do... | python__mypy-9454 | {
"instance_id": "python__mypy-9454",
"problem_statement": "Support __path__ in packages\nThe name `__path__` is defined in packages but mypy doesn't recognize it. It seems that every `__init__.py[i]` file should have an implicit `__path__` attribute with type `List[str]`. (I encountered some code that uses `__path... |
types-google-cloud-ndb is recommended incorrectly
**Bug Report**
this stub package only provides the `google.cloud.ndb.*` namespace -- however it is suggested for any missing google import
**To Reproduce**
```python
from google.cloud.exceptions import NotFound
```
**Expected Behavior**
it should not ... | python__mypy-15347 | {
"instance_id": "python__mypy-15347",
"problem_statement": "types-google-cloud-ndb is recommended incorrectly\n\r\n**Bug Report**\r\n\r\nthis stub package only provides the `google.cloud.ndb.*` namespace -- however it is suggested for any missing google import\r\n\r\n**To Reproduce**\r\n\r\n```python\r\nfrom googl... |
Crash when using combination of Literal, get_args, subclassing, and variable args (*args)
**Crash Report**
This crash occurs when using a combination of: `typing.Literal` that is a class variable, `typing.get_args`, and subclassing
Please see the below minimum code sample to get an idea of what creates the proble... | python__mypy-13602 | {
"instance_id": "python__mypy-13602",
"problem_statement": "Crash when using combination of Literal, get_args, subclassing, and variable args (*args)\n**Crash Report**\r\n\r\nThis crash occurs when using a combination of: `typing.Literal` that is a class variable, `typing.get_args`, and subclassing\r\n\r\nPlease s... |
regression: typevar with bound and type check causes narrowing to nothing
**To Reproduce**
```py
from typing import TypeVar, Type
class A:
a: int = 1
T = TypeVar("T", bound=A)
def foo(t: Type[T], a: A) -> None:
if type(a) is t:
reveal_type(a) # <nothing>, with 0.8xx it was A
... | python__mypy-10658 | {
"instance_id": "python__mypy-10658",
"problem_statement": "regression: typevar with bound and type check causes narrowing to nothing\n**To Reproduce**\r\n```py\r\nfrom typing import TypeVar, Type\r\n\r\n\r\nclass A:\r\n a: int = 1\r\n\r\n\r\nT = TypeVar(\"T\", bound=A)\r\n\r\n\r\ndef foo(t: Type[T], a: A) -> N... |
1.9 Regression: __hash__ method in attrs class is ignored
<!--
If you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help" form instead.
Please consider:
- checking our common issues page: https://mypy.readthedocs.io/en/stable/common_issues.html
- searching our issue trac... | python__mypy-17016 | {
"instance_id": "python__mypy-17016",
"problem_statement": "1.9 Regression: __hash__ method in attrs class is ignored\n<!--\r\nIf you're not sure whether what you're experiencing is a mypy bug, please see the \"Question and Help\" form instead.\r\nPlease consider:\r\n\r\n- checking our common issues page: https://... |
Better support for default arguments to new-style attrs API
**Bug Report**
attrs.define has `slots=True` by default. Mypy does not use the default value when analysing
**To Reproduce**
```python
# demo.py
import attr
@attr.define
class A:
x: int
def __init__(self, x :int) -> None:
self.x = ... | python__mypy-15642 | {
"instance_id": "python__mypy-15642",
"problem_statement": "Better support for default arguments to new-style attrs API\n**Bug Report**\r\nattrs.define has `slots=True` by default. Mypy does not use the default value when analysing\r\n\r\n**To Reproduce**\r\n```python\r\n# demo.py\r\nimport attr\r\n\r\n@attr.defin... |
Readable and writable binary files cause false positives
This generates an error when using master, even though it doesn't generate error with mypy 0.931:
```py
with open('x', 'rb') as f:
s = f.read()
with open('y', 'wb') as f: # Incompatible types in assignment
# (expression has... | python__mypy-12254 | {
"instance_id": "python__mypy-12254",
"problem_statement": "Readable and writable binary files cause false positives\nThis generates an error when using master, even though it doesn't generate error with mypy 0.931:\r\n\r\n```py\r\nwith open('x', 'rb') as f:\r\n s = f.read()\r\nwith open('y', 'wb') as f: # Inc... |
Docs: confirm that use of None-typed function return value is disallowed
Regarding an example provided by @jdban:
```
from typing import List
def get_first_elem(the_list): # type:(List[int]) -> int
return the_list[0]
myList = [1, 2, 3] # type: List[int]
print get_first_elem(myList.append(0) or myLis... | python__mypy-15876 | {
"instance_id": "python__mypy-15876",
"problem_statement": "Docs: confirm that use of None-typed function return value is disallowed\nRegarding an example provided by @jdban:\r\n\r\n```\r\nfrom typing import List\r\n\r\ndef get_first_elem(the_list): # type:(List[int]) -> int\r\n return the_list[0]\r\n\r\nmyLis... |
Stubgen *.pyi not generated with "setter"
I am having some class like
```python
class MyClass:
_proprty_a: int
def __init__(self, a: int):
self._proprty_a = a
@property
def property_a(self) -> int:
return self._proprty_a
@property_a.setter
def prop... | python__mypy-16303 | {
"instance_id": "python__mypy-16303",
"problem_statement": "Stubgen *.pyi not generated with \"setter\" \n\r\n\r\nI am having some class like \r\n\r\n```python\r\nclass MyClass:\r\n _proprty_a: int\r\n \r\n def __init__(self, a: int):\r\n self._proprty_a = a\r\n \r\n @property\r\n def prop... |
Use `_typeshed.NoneType` for the type of `None`
Currently mypy uses a hardcoded type for `NoneType`, I think it should use the one from typeshed.
```py
reveal_type(None.__bool__()) # note: Revealed type is "builtins.bool"
```
| python__mypy-11290 | {
"instance_id": "python__mypy-11290",
"problem_statement": "Use `_typeshed.NoneType` for the type of `None`\nCurrently mypy uses a hardcoded type for `NoneType`, I think it should use the one from typeshed.\r\n\r\n```py\r\nreveal_type(None.__bool__()) # note: Revealed type is \"builtins.bool\"\r\n```\n",
"remot... |
0.902 crashes on tuple assignment
**Crash Report**
Mypy crashed after upgraded from 0.812 to 0.902
**Traceback**
```
/Users/admin/Library/Caches/pypoetry/virtualenvs/test/lib/python3.8/site-packages/mode/services.py:684: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedoc... | python__mypy-10689 | {
"instance_id": "python__mypy-10689",
"problem_statement": "0.902 crashes on tuple assignment\n**Crash Report**\r\n\r\nMypy crashed after upgraded from 0.812 to 0.902\r\n\r\n**Traceback**\r\n\r\n```\r\n/Users/admin/Library/Caches/pypoetry/virtualenvs/test/lib/python3.8/site-packages/mode/services.py:684: error: IN... |
Starting from version 1.0.0, a union of Generators is (sometimes) treated as if it has no ReturnType
<!--
If you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help" form instead.
Please consider:
- checking our common issues page: https://mypy.readthedocs.io/en/stable/com... | python__mypy-16717 | {
"instance_id": "python__mypy-16717",
"problem_statement": "Starting from version 1.0.0, a union of Generators is (sometimes) treated as if it has no ReturnType\n<!--\r\nIf you're not sure whether what you're experiencing is a mypy bug, please see the \"Question and Help\" form instead.\r\nPlease consider:\r\n\r\n... |
stubgen: use `X | Y` / `X | None` instead of `Union[X, Y]` / `Union[X, None]`
**Feature**
I would like to let stubgen use `X | Y` / `X | None` instead of `Union[X, Y]` / `Union[X, None]`.
**Pitch**
Now:
```shellsession
# Python 3.10.4, mypy 0.960
$ cat test.py
import random
def a() -> int | str:
... | python__mypy-16519 | {
"instance_id": "python__mypy-16519",
"problem_statement": "stubgen: use `X | Y` / `X | None` instead of `Union[X, Y]` / `Union[X, None]`\n**Feature**\r\n\r\nI would like to let stubgen use `X | Y` / `X | None` instead of `Union[X, Y]` / `Union[X, None]`.\r\n\r\n**Pitch**\r\n\r\nNow:\r\n\r\n```shellsession\r\n# Py... |
[Feature request] Recombine complete union of enum literals into original type
This is feature that I think needs to be implemented before I can publish a PR for issue #6113.
```
from enum import Enum
class Color(Enum):
RED = 1
GREEN = 2
BLUE = 3
x: Color
if x is Color.RED:
pass
reveal... | python__mypy-9097 | {
"instance_id": "python__mypy-9097",
"problem_statement": "[Feature request] Recombine complete union of enum literals into original type\nThis is feature that I think needs to be implemented before I can publish a PR for issue #6113.\r\n\r\n```\r\nfrom enum import Enum\r\n\r\nclass Color(Enum):\r\n RED = 1\r\n... |
TypedDict narrowing regression with enum literal
The following example started generating a false positive after #9097:
```py
from typing import TypedDict, Literal, Union
from enum import Enum
class E(Enum):
FOO = "a"
BAR = "b"
class Foo(TypedDict):
tag: Literal[E.FOO]
x: int
class Bar... | python__mypy-10415 | {
"instance_id": "python__mypy-10415",
"problem_statement": "TypedDict narrowing regression with enum literal\nThe following example started generating a false positive after #9097:\r\n\r\n```py\r\nfrom typing import TypedDict, Literal, Union\r\nfrom enum import Enum\r\n\r\nclass E(Enum):\r\n FOO = \"a\"\r\n ... |
Variable can be annotated with Final and ClassVar at the same time
<!--
If you're new to mypy and you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help" form
instead.
-->
**Bug Report**
Variable can be annotated with `Final` and `ClassVar` at the same time.
Bu... | python__mypy-10478 | {
"instance_id": "python__mypy-10478",
"problem_statement": "Variable can be annotated with Final and ClassVar at the same time\n<!--\r\n If you're new to mypy and you're not sure whether what you're experiencing is a mypy bug, please see the \"Question and Help\" form\r\n instead.\r\n-->\r\n\r\n**Bug Report**\r\... |
Type alias for Annotated[some_type, non_type] not supported
The following code:
```py
from typing_extensions import Annotated
class Positive:...
PositiveInt = Annotated[int, Positive()]
```
triggers the following error:
```
test.py:3: error: Invalid type alias: expression is not a valid type
```
Mypy ve... | python__mypy-9625 | {
"instance_id": "python__mypy-9625",
"problem_statement": "Type alias for Annotated[some_type, non_type] not supported\nThe following code:\r\n\r\n```py\r\nfrom typing_extensions import Annotated\r\nclass Positive:...\r\nPositiveInt = Annotated[int, Positive()]\r\n```\r\n\r\ntriggers the following error:\r\n```\r\... |
Multiply Tuple with IntExpr
`(1,)*3` should be of type `Tuple[int,int,int]`, not raise an exception.
I suppose `(1,)*n` may as well wait for proper tuple sequences, though.
| python__mypy-10361 | {
"instance_id": "python__mypy-10361",
"problem_statement": "Multiply Tuple with IntExpr\n`(1,)*3` should be of type `Tuple[int,int,int]`, not raise an exception.\n\nI suppose `(1,)*n` may as well wait for proper tuple sequences, though.\n\n",
"remote_env_info": {
"instance_id": "python__mypy-10361",
"ima... |
Reachability/exhaustiveness checking for match statements
Currently this generates a false positive, since mypy doesn't recognize that all the possible values are processed by the match statement:
```py
# Error: Missing return statement
def f(x: int | str) -> int:
match x:
case str(v):
ret... | python__mypy-12267 | {
"instance_id": "python__mypy-12267",
"problem_statement": "Reachability/exhaustiveness checking for match statements\nCurrently this generates a false positive, since mypy doesn't recognize that all the possible values are processed by the match statement:\r\n```py\r\n# Error: Missing return statement\r\ndef f(x:... |
Mixing attrs.define and typing.Protocol causes INTERNAL ERROR
<!--
Use this form only if mypy reports an "INTERNAL ERROR" and/or gives a traceback.
Please include the traceback and all other messages below (use `mypy --show-traceback`).
-->
**Crash Report**
When mixing both `typing.Protocol` and `attrs.def... | python__mypy-13526 | {
"instance_id": "python__mypy-13526",
"problem_statement": "Mixing attrs.define and typing.Protocol causes INTERNAL ERROR\n<!--\r\n Use this form only if mypy reports an \"INTERNAL ERROR\" and/or gives a traceback.\r\n Please include the traceback and all other messages below (use `mypy --show-traceback`).\r\n--... |
Incomplete and incorrect stub generation of a dataclass.
**Bug Report**
Stubs for a dataclass are incomplete and depending on the use case also incorrect. Consider the following dataclass:
```python
# module.py
import dataclasses
@dataclasses.dataclass
class A:
foo: str
bar: str = "default"
baz... | python__mypy-16906 | {
"instance_id": "python__mypy-16906",
"problem_statement": "Incomplete and incorrect stub generation of a dataclass.\n**Bug Report**\r\nStubs for a dataclass are incomplete and depending on the use case also incorrect. Consider the following dataclass:\r\n```python\r\n# module.py\r\nimport dataclasses\r\n\r\n\r\n@... |
Variable `typing_extensions.OrderedDict` is not valid as a type
```py
from typing_extensions import OrderedDict
a: OrderedDict[str, str] = {} # error: Variable "typing_extensions.OrderedDict" is not valid as a type
class A(OrderedDict[str, str]): # error: Invalid base class "OrderedDict"
...
```
mypy 0... | python__mypy-11533 | {
"instance_id": "python__mypy-11533",
"problem_statement": "Variable `typing_extensions.OrderedDict` is not valid as a type\n```py\r\nfrom typing_extensions import OrderedDict\r\n\r\na: OrderedDict[str, str] = {} # error: Variable \"typing_extensions.OrderedDict\" is not valid as a type\r\n\r\nclass A(OrderedDict... |
Crash when analysing qiskit
**Crash Report**
Running mypy on a library where typing has recently been added causes a crash while analyzing this line:
https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/circuit/library/blueprintcircuit.py#L72
**Traceback**
```
/q/qiskit-terra/qiskit/circuit/library/blue... | python__mypy-12943 | {
"instance_id": "python__mypy-12943",
"problem_statement": "Crash when analysing qiskit\n**Crash Report**\r\n\r\nRunning mypy on a library where typing has recently been added causes a crash while analyzing this line:\r\nhttps://github.com/Qiskit/qiskit-terra/blob/main/qiskit/circuit/library/blueprintcircuit.py#L7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.