Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Overview

pyramid_localize

Latest PyPI version Documentation Status Wheel Status Supported Python Versions License

pyramid_localize is a pyramid extension providing ready-to-use, translation functionality for your pyramid based projects. All you need is to add Babel, and add some configuration. localize provides also a web interface that allows you to reload translations live, without reloading application.

Package resources

Instalation:

pip install pyramid_localize

or add pyramid_localize to your project requirements.

Comments
  • Set Language name and native_name from pycountry during creation

    Set Language name and native_name from pycountry during creation

    As specified in #8, this adds an event listener that should automatically set the name and native_name attributes of a Language object during its creation using databases from pycountry.

    In addition, if the language code is not valid/recognized, these values default to UNKNOWN.

    opened by rmed 6
  • Bump zope-sqlalchemy from 1.1.0 to 1.2

    Bump zope-sqlalchemy from 1.1.0 to 1.2

    Bumps zope-sqlalchemy from 1.1.0 to 1.2.

    Changelog

    Sourced from zope-sqlalchemy's changelog.

    1.2 (2019-10-17)

    • Drop support for Python 3.4.

    • Add support for Python 3.7 and 3.8.

    • Fix deprecation warnings for the event system. We already used it in general but still leveraged the old extension mechanism in some places. (#31)

      To make things clearer we renamed the ZopeTransactionExtension class to ZopeTransactionEvents. Existing code using the 'register' version stays compatible.

    1.1 (2019-01-03)

    • Add support to MySQL using pymysql.

    1.0 (2018-01-31)

    • Add support for Python 3.4 up to 3.6.
    • Support SQLAlchemy 1.2.
    • Drop support for Python 2.6, 3.2 and 3.3.
    • Drop support for transaction < 1.6.0.
    • Fix hazard that could cause SQLAlchemy session not to be committed when transaction is committed in rare situations. (#23)

    0.7.7 (2016-06-23)

    • Support SQLAlchemy 1.1. (#15)

    0.7.6 (2015-03-20)

    • Make version check in register compatible with prereleases.

    0.7.5 (2014-06-17)

    • Ensure mapped objects are expired following a transaction.commit() when no database commit was required. (#8)

    0.7.4 (2014-01-06)

    • Allow session.commit() on nested transactions to facilitate integration of existing code that might not use transaction.savepoint(). (#1)
    • Add a new function zope.sqlalchemy.register(), which replaces the direct use of ZopeTransactionExtension to make use of the newer SQLAlchemy event system to establish instrumentation on the given Session instance/class/factory. Requires at least SQLAlchemy 0.7. (#4)
    • Fix keep_session=True doesn't work when a transaction is joined by flush and other manngers bug. (#5)

    0.7.3 (2013-09-25)

    • Prevent the Session object from getting into a "wedged" state if joining a transaction fails. With thread scoped sessions that are reused this can cause persistent errors requiring a server restart. (#2)
    ... (truncated)
    Commits
    • 1c2a56f Preparing release 1.2
    • c54db13 Garden change log.
    • 829c415 Drop support for Python 3.4, add support for Python 3.8. (#35)
    • 1a62988 Fix link.
    • 57162d5 Garden change log.
    • 0ebebea Merge pull request #34 from zopefoundation/ctheune-fix-event-registration
    • fd191b4 Require SQLAlchemy > 0.7 and remove compatibility assertion for register()
    • 6cbf0eb Fix #31: stop using the deprecated "extension" way of registering events.
    • 59f18f0 Fix homepage URL.
    • 3119260 Add Python 3.7 to Travis (#33)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 5
  • Integrate pycountry

    Integrate pycountry

    Integrate pycountry into the locale model, we should be able to return data from pycountry, throu Language model (specific data based on the Language instance - language_code dependant)

    hacktoberfest 
    opened by fizyk 5
  • Bump pytest from 5.4.3 to 6.0.0

    Bump pytest from 5.4.3 to 6.0.0

    Bumps pytest from 5.4.3 to 6.0.0.

    Release notes

    Sourced from pytest's releases.

    6.0.0

    pytest 6.0.0 (2020-07-28)

    (Please see the full set of changes for this release also in the 6.0.0rc1 notes below)

    Breaking Changes

    • #5584: PytestDeprecationWarning are now errors by default.

      Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestDeprecationWarning now generate errors instead of warning messages.

      The affected features will be effectively removed in pytest 6.1, so please consult the Deprecations and Removals section in the docs for directions on how to update existing code.

      In the pytest 6.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

      [pytest]
      filterwarnings =
          ignore::pytest.PytestDeprecationWarning
      

      But this will stop working when pytest 6.1 is released.

      If you have concerns about the removal of a specific feature, please add a comment to #5584.

    • #7472: The exec_() and is_true() methods of _pytest._code.Frame have been removed.

    Features

    • #7464: Added support for NO_COLOR and FORCE_COLOR environment variables to control colored output.

    Improvements

    • #7467: --log-file CLI option and log_file ini marker now create subdirectories if needed.
    • #7489: The pytest.raises function has a clearer error message when match equals the obtained string but is not a regex match. In this case it is suggested to escape the regex.

    Bug Fixes

    • #7392: Fix the reported location of tests skipped with @pytest.mark.skip when --runxfail is used.
    Changelog

    Sourced from pytest's changelog.

    Commits
    • 41a4539 Add link to 6.0.0rc1 changelog
    • 45ced1d Update doc/en/announce/release-6.0.0.rst
    • 1e4b8d4 Prepare release version 6.0.0
    • 3802982 Support generating major releases using issue comments (#7548)
    • c2c0b7a Merge pull request #7545 from asottile/pylib_in_docs
    • 9818899 remove usage of pylib in docs
    • 3a060b7 Revert change to traceback repr (#7535)
    • 7ec6401 Change pytest deprecation warnings into errors for 6.0 release (#7362)
    • a9799f0 Merge pull request #7531 from bluetech/changelog-mypy-version
    • 102360b Merge pull request #7519 from hroncok/pytest_warning_captured_deprecated
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 4
  • Bump ridedott/merge-me-action from 2.9.82 to 2.9.84

    Bump ridedott/merge-me-action from 2.9.82 to 2.9.84

    Bumps ridedott/merge-me-action from 2.9.82 to 2.9.84.

    Release notes

    Sourced from ridedott/merge-me-action's releases.

    v2.9.84

    2.9.84 (2021-12-20)

    Chores

    • deps-dev: bump @​vercel/ncc from 0.33.0 to 0.33.1 (94c39f8)

    v2.9.83

    2.9.83 (2021-12-20)

    Chores

    • deps-dev: bump cspell from 5.13.3 to 5.13.4 (164515d)
    Changelog

    Sourced from ridedott/merge-me-action's changelog.

    2.9.84 (2021-12-20)

    Chores

    • deps-dev: bump @​vercel/ncc from 0.33.0 to 0.33.1 (94c39f8)

    2.9.83 (2021-12-20)

    Chores

    • deps-dev: bump cspell from 5.13.3 to 5.13.4 (164515d)
    Commits
    • e9fa630 chore(release): v2.9.84
    • 94c39f8 chore(deps-dev): bump @​vercel/ncc from 0.33.0 to 0.33.1
    • 1d622a2 chore(release): v2.9.83
    • 164515d chore(deps-dev): bump cspell from 5.13.3 to 5.13.4
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 3
  • Bump zope-sqlalchemy from 1.2 to 1.3

    Bump zope-sqlalchemy from 1.2 to 1.3

    Bumps zope-sqlalchemy from 1.2 to 1.3.

    Changelog

    Sourced from zope-sqlalchemy's changelog.

    1.3 (2020-02-17)

    • .datamanager.register() now returns the ZopeTransactionEvents instance which was used to register the events. This allows to change its parameters afterwards. (#40)
    • Add preliminary support for Python 3.9a3.
    Commits
    • eb37fba Preparing release 1.3
    • cd9b7db Document SQLAlchemy sessions wrapping
    • 522aca3 Add preliminary support for Python 3.9a3. (#42)
    • ca3a094 Restore possibility to change keep_session param. (#40)
    • b2227a3 Merge pull request #41 from martinstein/patch-1
    • 51209a9 Fix string comparison (use != instead of is not)
    • 47efbba Add upgrade instructions in changelog
    • 61673a4 Add so some more classifiers.
    • f863c8e Back to development: 1.3
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump coverage from 5.0.4 to 5.1

    Bump coverage from 5.0.4 to 5.1

    Bumps coverage from 5.0.4 to 5.1.

    Changelog

    Sourced from coverage's changelog.

    Version 5.1 --- 2020-04-12

    • The JSON report now includes counts of covered and missing branches. Thanks, Salvatore Zagaria.
    • On Python 3.8, try-finally-return reported wrong branch coverage with decorated async functions (issue 964). This is now fixed. Thanks, Kjell Braden.
    • The ~coverage.Coverage.get_option and ~coverage.Coverage.set_option methods can now manipulate the [paths] configuration setting. Thanks to Bernát Gábor for the fix for issue 967.
    Commits
    • b854e61 Remove a no-longer needed wheel pin
    • dd11976 Prep for v5.1
    • b79005b New JSON info should be reported on individual files also.
    • b1194fb Merge pull request #966 from SZVector/json_dump_all_attributes
    • 42344f3 Beef up the test for get_option(paths)
    • fd43e35 Finish up #967. Thanks, Bernát Gábor
    • 97997d2 Merge pull request #969 from gaborbernat/967
    • f5eb5f2 Extending jsonreport.py to also include all branch attributes
    • 1720459 One clarification
    • b890a3d Make the questions heading so they can be linked to
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump pytest from 5.3.5 to 5.4.0

    Bump pytest from 5.3.5 to 5.4.0

    Bumps pytest from 5.3.5 to 5.4.0.

    Release notes

    Sourced from pytest's releases.

    pytest 5.4.0 (2020-03-12)

    Breaking Changes

    • #6316: Matching of -k EXPRESSION to test names is now case-insensitive.

    • #6443: Plugins specified with -p are now loaded after internal plugins, which results in their hooks being called before the internal ones.

      This makes the -p behavior consistent with PYTEST_PLUGINS.

    • #6637: Removed the long-deprecated pytest_itemstart hook.

      This hook has been marked as deprecated and not been even called by pytest for over 10 years now.

    • #6673: Reversed / fix meaning of "+/-" in error diffs. "-" means that sth. expected is missing in the result and "+" means that there are unexpected extras in the result.

    • #6737: The cached_result attribute of FixtureDef is now set to None when the result is unavailable, instead of being deleted.

      If your plugin performs checks like hasattr(fixturedef, 'cached_result'), for example in a pytest_fixture_post_finalizer hook implementation, replace it with fixturedef.cached_result is not None. If you del the attribute, set it to None instead.

    Deprecations

    • #3238: Option --no-print-logs is deprecated and meant to be removed in a future release. If you use --no-print-logs, please try out --show-capture and provide feedback.

      --show-capture command-line option was added in pytest 3.5.0 and allows to specify how to display captured output when tests fail: no, stdout, stderr, log or all (the default).

    • #571: Deprecate the unused/broken [pytest_collect_directory]{.title-ref} hook. It was misaligned since the removal of the Directory collector in 2010 and incorrect/unusable as soon as collection was split from test execution.

    • #5975: Deprecate using direct constructors for Nodes.

      Instead they are new constructed via Node.from_parent.

      This transitional mechanism enables us to detangle the very intensely entangled Node relationships by enforcing more controlled creation/configruation patterns.

      As part of that session/config are already disallowed parameters and as we work on the details we might need disallow a few more as well.

      Subclasses are expected to use [super().from_parent]{.title-ref} if they intend to expand the creation of [Nodes]{.title-ref}.

    • #6779: The TerminalReporter.writer attribute has been deprecated and should no longer be used. This was inadvertently exposed as part of the public API of that plugin and ties it too much

    ... (truncated)
    Changelog

    Sourced from pytest's changelog.

    Commits
    • c9fd1bd Preparing release version 5.4.0
    • 93aa988 Merge pull request #6901 from RonnyPfannschmidt/regendoc-fix-simple
    • 7996724 Merge pull request #6902 from RoyalTS/filterwarnings-docfix
    • 90ee8a7 docfix
    • 378a75d run and fix tox -e regen to prepare 5.4
    • e1b3a68 Merge pull request #6896 from nicoddemus/release-trigger
    • fb7dbc9 Merge pull request #6893 from RonnyPfannschmidt/url-fixes
    • a0ea300 Fix bot trigger event
    • 09b289e fix mozilla qa project link
    • 694dbe5 fix pydanny.com url to the one with ssl set up
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump mock from 3.0.5 to 4.0.0

    Bump mock from 3.0.5 to 4.0.0

    Bumps mock from 3.0.5 to 4.0.0.

    Changelog

    Sourced from mock's changelog.

    4.0.0

    • No Changes from 4.0.0b1.

    4.0.0b1

    • The release is a fresh cut of cpython's 4a686504__. All changes to mock from that commit and before are included in this release along with the subsequent changes listed below.

      __ https://github.com/python/cpython/commit/4a686504eb2bbf69adf78077458508a7ba131667

    • Issue #37972: Subscripts to the unittest.mock.call objects now receive the same chaining mechanism as any other custom attributes, so that the following usage no longer raises a `TypeError`:

      call().foo().__getitem__('bar')

      Patch by blhsing

    • Issue #38839: Fix some unused functions in tests. Patch by Adam Johnson.

    • Issue #39485: Fix a bug in unittest.mock.create_autospec that would complain about the wrong number of arguments for custom descriptors defined in an extension module returning functions.

    • Issue #39082: Allow AsyncMock to correctly patch static/class methods

    • Issue #38093: Fixes AsyncMock so it doesn't crash when used with AsyncContextManagers or AsyncIterators.

    • Issue #38859: AsyncMock now returns StopAsyncIteration on the exaustion of a side_effects iterable. Since PEP-479 its Impossible to raise a StopIteration exception from a coroutine.

    • Issue #38163: Child mocks will now detect their type as either synchronous or asynchronous, asynchronous child mocks will be AsyncMocks and synchronous child mocks will be either MagicMock or Mock (depending on their parent type).

    • Issue #38473: Use signature from inner mock for autospecced methods attached with unittest.mock.attach_mock. Patch by Karthikeyan Singaravelan.

    • Issue #38136: Changes AsyncMock call count and await count to be two different counters. Now await count only counts when a coroutine has been awaited, not when it has been called, and vice-versa. Update the documentation around this.

    • Issue #37555: Fix NonCallableMock._call_matcher returning tuple instead of _Call object when self._spec_signature exists. Patch by Elizabeth Uselton

    • Issue #37251: Remove __code__ check in AsyncMock that incorrectly evaluated function specs as async objects but failed to evaluate classes with __await__ but no __code__ attribute defined as async objects.

    • Issue #38669: Raise TypeError when passing target as a string with unittest.mock.patch.object.

    • Issue #25597: Ensure, if wraps is supplied to unittest.mock.MagicMock, it is used to calculate return values for the magic methods instead of using the default return values. Patch by Karthikeyan Singaravelan.

    • Issue #38108: Any synchronous magic methods on an AsyncMock now return a MagicMock. Any asynchronous magic methods on a MagicMock now return an AsyncMock.

    • Issue #21478: Record calls to parent when autospecced object is attached to a mock using unittest.mock.attach_mock. Patch by Karthikeyan Singaravelan.

    • Issue #38857: AsyncMock fix for return values that are awaitable types. This also covers side_effect iterable values that happend to be awaitable, and wraps callables that return an awaitable type. Before these awaitables were being awaited instead of being returned as is.

    • Issue #38932: Mock fully resets child objects on reset_mock(). Patch by Vegard Stikbakke

    • Issue #37685: Fixed __eq__, __lt__ etc implementations in some classes. They now return NotImplemented for unsupported type of the other operand. This allows the other operand to play role (for example the equality comparison with ~unittest.mock.ANY will return True).

    • Issue #37212: unittest.mock.call now preserves the order of keyword arguments in repr output. Patch by Karthikeyan Singaravelan.

    • Issue #37828: Fix default mock name in unittest.mock.Mock.assert_called exceptions. Patch by Abraham Toriz Cruz.

    • Issue #36871: Improve error handling for the assert_has_calls and assert_has_awaits methods of mocks. Fixed a bug where any errors encountered while binding the expected calls to the mock's spec were silently swallowed, leading to misleading error output.

    • Issue #21600: Fix mock.patch.stopall to stop active patches that were created with mock.patch.dict.

    • Issue #38161: Removes _AwaitEvent from AsyncMock.

    • Issue #36871: Ensure method signature is used instead of constructor signature of a class while asserting mock object against method calls. Patch by Karthikeyan Singaravelan.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump codecov/codecov-action from 2.0.3 to 2.1.0

    Bump codecov/codecov-action from 2.0.3 to 2.1.0

    Bumps codecov/codecov-action from 2.0.3 to 2.1.0.

    Release notes

    Sourced from codecov/codecov-action's releases.

    v2.1.0

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0
    Changelog

    Sourced from codecov/codecov-action's changelog.

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0
    Commits
    • f32b3a3 Merge pull request #515 from codecov/specify-version
    • 72dfd47 Allow specifying version of Codecov uploader
    • 46edaed Merge pull request #499 from codecov/dependabot/npm_and_yarn/vercel/ncc-0.30.0
    • b6fd8cc Merge pull request #508 from codecov/dependabot/npm_and_yarn/openpgp-5.0.0
    • 07a4e97 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • c071c70 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • f6d4366 Merge pull request #514 from codecov/dependabot/npm_and_yarn/types/node-16.9.0
    • 2bbefc9 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Bump ridedott/merge-me-action from 2.9.12 to 2.9.13

    Bump ridedott/merge-me-action from 2.9.12 to 2.9.13

    Bumps ridedott/merge-me-action from 2.9.12 to 2.9.13.

    Release notes

    Sourced from ridedott/merge-me-action's releases.

    v2.9.13

    2.9.13 (2021-08-11)

    Chores

    • deps-dev: bump @​types/jest from 26.0.24 to 27.0.0 (bfe44a5)
    Changelog

    Sourced from ridedott/merge-me-action's changelog.

    2.9.13 (2021-08-11)

    Chores

    • deps-dev: bump @​types/jest from 26.0.24 to 27.0.0 (bfe44a5)
    Commits
    • 666606b chore(release): v2.9.13
    • bfe44a5 chore(deps-dev): bump @​types/jest from 26.0.24 to 27.0.0
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Path-aware language negotiator

    Path-aware language negotiator

    It is common pattern to carry the content language in URL as /en/foobar style path. This strategy is recommended by search engines. This might make sense to be included in pyramid_localize, so I am opening the discussion here.

    Here is a preliminary gist if one wants to try out this: https://gist.github.com/miohtama/b93fd1ab11353f86e2da2b484d761358

    enhancement 
    opened by miohtama 3
Releases(v0.0.4)
  • v0.0.4(Sep 13, 2013)

  • v0.1a1(Sep 13, 2013)

    • license information
    • requires at least pyramid 1.5a1 (rely on default localizer reify method)
    • py3 compatibility (require at least babel 1.0)
    • locale negotiator looks first for request attribute LOCALE

    backward incompatible +++++++++++++++++++++

    • required cookie name changed to LOCALE to be consistent with other places
    Source code(tar.gz)
    Source code(zip)
Owner
Grzegorz Śliwiński
Grzegorz Śliwiński
Python library for converting Python calculations into rendered latex.

Covert art by Joshua Hoiberg handcalcs: Python calculations in Jupyter, as though you wrote them by hand. handcalcs is a library to render Python calc

Connor Ferster 5.1k Jan 07, 2023
Utility/Raiding selfbot made by Shell and Roover.

Utility/Raiding selfbot made by Shell and Roover. We are open to suggestions and ideas.

Shell 2 Dec 08, 2021
A simple Programming Language

R.S.O.C. A custom built programming language About The Project R.S.O.C. is a custom built programming language very similar to a low-level 8085 progra

Ravi Maurya 17 Sep 13, 2022
WordlistPasswordGenerator - Shuhfab Basheer

WordlistPasswordGenerator - Shuhfab Basheer Python wordlist generator MAINTAINER

1 Dec 31, 2021
Python library to interact with Move Hub / PoweredUp Hubs

Python library to interact with Move Hub / PoweredUp Hubs Move Hub is central controller block of LEGO® Boost Robotics Set. In fact, Move Hub is just

Andrey Pokhilko 499 Jan 04, 2023
Sudoku solver using backtracking

Sudoku solver Sudoku solver using backtracking Basically in sudoku, we want to be able to solve a sudoku puzzle given an input like this, which repres

Kylie 99 Jan 07, 2023
A simple program which gets a file(CSV/Excel) with tasks and creates different variants

TestMakerProject A simple program which gets a file(CSV/Excel) with tasks and creates different variants The main program is QTengine.py You only have

George 3 Nov 18, 2021
A bot to use in a pump & dump event

A bot to use in a pump & dump event on Binance.com. Please note the bot is in heavy devleopment currently so be aware of errors. If you experience err

Freddie Jonas 189 Dec 24, 2022
Clear merged pull requests ref (branch) on GitHub

GitHub PR Cleansing This tool is used to clear merged pull requests ref (branch) on GitHub. GitHub has no feature to auto delete branches on pull requ

Andi N. Dirgantara 12 Apr 19, 2022
Automatically skip sponsor segments in YouTube videos playing on Apple TV.

iSponsorBlockTV Skip sponsor segments in YouTube videos playing on an Apple TV. This project is written in asycronous python and should be pretty quic

David 64 Dec 17, 2022
CircuitPython Driver for Adafruit 24LC32 I2C EEPROM Breakout 32Kbit / 4 KB

Introduction CircuitPython driver for Adafruit 24LC32 I2C EEPROM Breakout Dependencies This driver depends on: Adafruit CircuitPython Bus Device Regis

Adafruit Industries 4 Oct 03, 2022
Black-Scholes library implemented as a Cairo smart contract

Cairo Black-Scholes Library Black-Scholes library implemented as a Cairo smart contract. All inputs, outputs, and internal calculations use 27-digit f

Aditya Raghavan 47 Dec 19, 2022
A performant state estimator for power system

A state estimator for power system. Turbocharged with sparse matrix support, JIT, SIMD and improved ordering.

9 Dec 12, 2022
Online HackerRank problem solving challenges

LinkedListHackerRank Online HackerRank problem solving challenges This challenge is part of a tutorial track by MyCodeSchool You are given the pointer

Sefineh Tesfa 1 Nov 21, 2021
Improving Representations via Similarities

embetter warning I like to build in public, but please don't expect anything yet. This is alpha stuff! notes Improving Representations via Similaritie

vincent d warmerdam 229 Jan 08, 2023
Transparently load variables from environment or JSON/YAML file.

A thin wrapper over Pydantic's settings management. Allows you to define configuration variables and load them from environment or JSON/YAML file. Also generates initial configuration files and docum

Lincoln Loop 90 Dec 14, 2022
Multiperiod Reports by Month/Quarter/Year in Beancount.

Multiperiod Reports by Month/Quarter/Year in Beancount. Plotting income and expenses over time. Treemap plot of expenses.

Altynbek Isabekov 16 Aug 13, 2022
Simple plug-and-play installer for users who want to LineageOS from stock firmware, or from another custom ROM.

LineageOS for the Teracube 2e Simple plug-and-play installer for users who want to LineageOS from stock firmware, or from another custom ROM. Dependen

Gagan Malvi 5 Mar 31, 2022
Este script añade la config de s4vitar a bspwm automaticamente!

Se ha testeado este script en ParrotOS, Kali y Ubuntu. Funciona para todos los sistemas operativos basados en Debian. Instalación git clone https://gi

yorkox 201 Dec 30, 2022
Packaging tools for shanty services.

parcel Packaging tools for shanty services. What? Services are docker containers deployed by shanty on a hosting appliance. Each service consists of t

0 Jan 20, 2022