Skip to content

AsyncVkExecuteRequestPool wall.get method messing up 'groups' array #55

Description

@Shmookoff

AsyncVkExecuteRequestPool wall.get method with extended=1 adds 'groups' elements from previous call to the next.

Code:

import aiovk
from aiovk.pools import AsyncVkExecuteRequestPool

async def f():
    pool = AsyncVkExecuteRequestPool()
    resp = pool.add_call('wall.get', token, {'owner_id': -29534144, 'count': 1, 'extended': 1, 'v': '5.130'})
    resp1 = pool.add_call('wall.get', token, {'owner_id': -125004421, 'count': 1, 'extended': 1, 'v': '5.130'})
    await pool.execute()
    print(resp.result['groups'])
    print(resp1.result['groups'])

if __name__ == '__main__':
    asyncio.run(f())

Output: https://pastebin.com/RP9A4d42
The output from https://vk.com/dev/wall.get for the second owner_id:
image

Whereas if I switch calls' places:

import asyncio
import aiovk
from aiovk.pools import AsyncVkExecuteRequestPool

async def f():
    pool = AsyncVkExecuteRequestPool()
    resp1 = pool.add_call('wall.get', token, {'owner_id': -125004421, 'count': 1, 'extended': 1, 'v': '5.130'})
    resp = pool.add_call('wall.get', token, {'owner_id': -29534144, 'count': 1, 'extended': 1, 'v': '5.130'})
    await pool.execute()
    print(resp1.result['groups'])
    print(resp.result['groups'])

if __name__ == '__main__':
    asyncio.run(f())

the output would be https://pastebin.com/772TRsUX
But using the https://vk.com/dev/wall.get
image

or is it supposed to work that way..?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions