Skip to content

fix(BaseBot): remove __del__ method from BaseBot #326

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

Merged
merged 1 commit into from
May 10, 2020

Conversation

uwinx
Copy link
Contributor

@uwinx uwinx commented May 9, 2020

implement "lazy" session property getter and new get_new_session for BaseBot

Fixes #314 #305

Type of change

  • Bug fix
  • New feature
  • ? Breaking change

How Has This Been Tested?

if __name__ == '__main__':
    import asyncio

    async def main():
        from aiogram.bot.bot import Bot

        bot = Bot(">.<")
        await bot.send_message(124191486, "sup!")
        await bot.close()
        await bot.send_message(124191486, "sup! 2")
        await bot.close()

    asyncio.run(main())

Test Configuration:

  • Python version: 3.8

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

implement "lazy" session property getter and new get_new_session for BaseBot
@uwinx uwinx requested a review from JrooTJunior May 9, 2020 21:24
@uwinx uwinx self-assigned this May 9, 2020
@JrooTJunior JrooTJunior merged commit 8b859f6 into dev-2.x May 10, 2020
@uwinx uwinx deleted the dev-2.x-BaseBot-del branch May 29, 2020 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make errors more clear. Mention that you need start_polling.
2 participants