fix error in executable code in readme.rb

There is error in this code example
Clickhouse.connection.insert_rows(events, :names => %w(id year date time event user_id revenue)) do |rows|
...
end

events changed to "events"

Can you merge this PR?)


Web view is broken with RN 0.57

app/react-native/package.json bring babel 6.x dependencies which conflict with babel 7.x required by react-native 0.57. More speifically: babel-preset-react is installed because of storybook while my package.json requires @babel/preset-react: "^7.0.0":
$ yarn why babel-preset-react
yarn why v1.10.1
[1/4] 🤔  Why do we have the module "babel-preset-react"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found<EMAIL_ADDRESS>info Reasons this module exists
   - "@storybook#react-native" depends on it
   - Hoisted from "@storybook#react-native#babel-preset-react"
info Disk size without dependencies: "20MB"
info Disk size with unique dependencies: "140MB"
info Disk size with transitive dependencies: "11.43GB"
info Number of shared dependencies: 15
✨  Done in 1.59s.

Does anyone know how to force babel 7 to be used or any other way to make it work together with rn 0.57?
Describe the bug
Storybook webview and addons are not usable when rn57 is used.
To Reproduce
Steps to reproduce the behavior:

do clean installation of storybook with rn57
add some addons
here's my addons.js for example:

import '@storybook/react-native/addons'
import '@storybook/addon-knobs/register'
import 'storybook-usage/register'
import '@storybook/addon-actions/register'
import '@storybook/addon-notes/register'

start webview with storybook start
observe error in cli:

$ yarn storybook
yarn run v1.10.1
$ storybook start
=> Loading custom addons config.
=> Using default webpack setup based on "Create React App".

React Native Storybook started on => http://localhost:7007/

webpack built 9ae038869fc04e564bc7 in 2744ms
✖ ｢wdm｣: Hash: 9ae038869fc04e564bc7
Version: webpack 4.26.1
Time: 2744ms
Built at: 2018-11-26 10:36:51
                   Asset       Size   Chunks             Chunk Names
              index.html  698 bytes           [emitted]
static/manager.bundle.js   6.81 MiB  manager  [emitted]  manager
Entrypoint manager = static/manager.bundle.js
[0] multi ./storybook/addons.js<EMAIL_ADDRESS>40 bytes {manager} [built]
<EMAIL_ADDRESS>196 bytes {manager} [built]
<EMAIL_ADDRESS>596 bytes {manager} [built]
<EMAIL_ADDRESS>267 bytes {manager} [built]
<EMAIL_ADDRESS>505 bytes {manager} [built]
<EMAIL_ADDRESS>145 bytes {manager} [built]
<EMAIL_ADDRESS>623 bytes {manager} [built]
<EMAIL_ADDRESS>343 bytes {manager} [built]
<EMAIL_ADDRESS>2.55 KiB {manager} [built]
<EMAIL_ADDRESS>493 bytes {manager} [built]
<EMAIL_ADDRESS>457 bytes {manager} [built]
<EMAIL_ADDRESS>3.96 KiB {manager} [built]
<EMAIL_ADDRESS>2.19 KiB {manager} [built]
[./node_modules/global/window.js] 232 bytes {manager} [built]
[./storybook/addons.js] 2.07 KiB {manager} [built] [failed] [1 error]
    + 792 hidden modules

ERROR in ./storybook/addons.js
Module build failed (from ./node_modules/@storybook/react-native/node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/babel-preset-react/lib/index.js
    at createDescriptor (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-descriptors.js:178:11)
    at items.map (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
    at Array.map (<anonymous>)
    at createDescriptors (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
    at createPresetDescriptors (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
    at passPerPreset (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-descriptors.js:58:96)
    at cachedFunction (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/caching.js:33:19)
    at presets.presets (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-descriptors.js:29:84)
    at mergeChainOpts (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-chain.js:315:26)
    at /Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-chain.js:278:7
    at buildRootChain (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/config-chain.js:68:29)
    at loadPrivatePartialConfig (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/partial.js:85:55)
    at Object.loadPartialConfig (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@babel/core/lib/config/partial.js:110:18)
    at Object.<anonymous> (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@storybook/react-native/node_modules/babel-loader/lib/index.js:140:26)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/@storybook/react-native/node_modules/babel-loader/lib/index.js:3:103)
 @ multi ./storybook/addons.js<EMAIL_ADDRESS>manager[0]
Child HtmlWebpackCompiler:
                          Asset      Size               Chunks  Chunk Names
    __child-HtmlWebpackPlugin_0  1.39 MiB  HtmlWebpackPlugin_0  HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
<EMAIL_ADDRESS>1.65 KiB {HtmlWebpackPlugin_0} [built]
    [./node_modules/html-webpack-plugin/node_modules/lodash/lodash.js] 527 KiB {HtmlWebpackPlugin_0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {HtmlWebpackPlugin_0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 519 bytes {HtmlWebpackPlugin_0} [built]
ℹ ｢wdm｣: Failed to compile.
^C

also exception in js console in webview:
Uncaught Error: Module build failed (from ./node_modules/@storybook/react-native/node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/user/dev/amazingproject/amazingprojectreactnative/node_modules/babel-preset-react/lib/index.js

Expected behavior
Webview should work
Screenshots
If applicable, add screenshots to help explain your problem.
System:

OS: os x high sierra
Device: mac book pro
Browser: chrome/any
Framework: react-native
Addons: knobs, actions, notes
Version: 4.0.8

Additional context
Add any other context about the problem here.

relevant issue: #4011

Egads!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.7 containing PR #4942 that references this issue. Upgrade today to try it out!
Because it's a pre-release you can find it on the @next NPM tag.


Error trying to post new thread

Hi I have a fresh install of laravel 5.1 and a fresh install of your forum package. When I try to submit the form to post a new thread i am getting:
ErrorException in /home/vagrant/projects/ForumsExample/vendor/riari/laravel-forum/src/Riari/Forum/Models/Thread.php line 133:
Trying to get property of non-object
Thank you for looking into this.

Hi there, this is also happening when opening a thread, i think is when it sets the view count, after a refresh it comes back normal, but every time you access a thread, this happens.

Hi,
Thanks for reporting. Can one of you try the change I just committed? https://github.com/Riari/laravel-forum/commit/08579c27919046fb3f338c7bfb1fd6b01a41310d

Seems to be fine now for me, Any chance you tag this please? Thanks!

Okay, I'll push a new release now :)


fix: remove max System.Collections.Immutable v

remove max System.Collections.Immutable version
fixes: https://github.com/open-feature/dotnet-sdk/issues/136

Generally speaking this is a little concerning, because MS could change something and cause unpredictable behavior. On the other hand they have given up on the version having much meaning, so maybe this is the only alternative.

Generally speaking this is a little concerning, because MS could change something and cause unpredictable behavior. On the other hand they have given up on the version having much meaning, so maybe this is the only alternative.

I was concerned about this too... but I think if there was a breaking change the impacted us, we would see it relatively quickly in the CI, as long is it was in .NET 6 or 7.. Maybe I'm wrong about that.

Generally speaking this is a little concerning, because MS could change something and cause unpredictable behavior. On the other hand they have given up on the version having much meaning, so maybe this is the only alternative.

I was concerned about this too... but I think if there was a breaking change the impacted us, we would see it relatively quickly in the CI, as long is it was in .NET 6 or 7.. Maybe I'm wrong about that.

I am sure we would detect it fast, but would consumer applications basically be breaking at the same time? Because they nuget install and different packages are fetched?

Generally speaking dotnet tries to install the lowest compatible version (backward from most package systems), at least it used to, so it may not be a problem.

Generally speaking dotnet tries to install the lowest compatible version (backward from most package systems), at least it used to, so it may not be a problem.

I just found this out, yes. Locally this is causing 1.7.1 to be resolved, which doesn't really help in testing.
I just manually forced version 7 and run the unit and e2e test suite and that worked... so I guess the more conservative option would be to allow up to v8.
Any thoughts?

Generally speaking a dotnet application will actually automatically generate binding redirects allowing you to use any version. ASP.Net applications do not, which is generally where this problem comes up.
For instance, for LD, this comes up with Microsoft.Logging.Extensions all the time:
<dependentAssembly>
  <assemblyIdentity name="Microsoft.Extensions.Logging"
    publicKeyToken="adb9793829ddae60"
    culture="en-us" />
  <bindingRedirect oldVersion="6.0.0" newVersion="<IP_ADDRESS>" />
</dependentAssembly>

Updating it to 8.0.0 is safest. But it does mean it needs basically annually updated. Because MS will release the next one.

OK I'll do the conservative thing for now and then think on it more. Maybe we can automate it somehow.

May want to update the PR title, for the release note.


Fix build with latest kvproto

This is a workaround for building client-c with the latest kvproto. This embed abseil-cpp as a submodule to fix the build.
A better solution is to install abseil-cpp in docker, or replace the build docker by github CI like pingcap/kvproto. But we could do it later.

/cc @gengliqi @wshwsh12


Misleading documentation

I am pretty stunned that in such project that involves a lot of math, the documentation calls difference as XOR. Both operations are totally different: XOR is a symmetric difference, resulting in areas not included in the intersection. From the documentation I went and wrote code that created intersection and performed xor on the initial polygon and the intersection to get the difference, and the behaviour was weird. Then I look closely on the example and find out that there is actually no XOR support whatsoever.

Hi @Aiosa! I agree. You can take a look at another project that makes the same type of operation and supports XOR: w8r/martinez

@w8r Actually, I needed only the difference, not XOR (thanks anyway), and spent over an hour by trying to figure out why the code does not work - and then I noticed that actually the documentation is wrong. So it would be nice to fix this :)


Add BSP workspace/reload

Fixes #5783
Give BSP clients the ability to trigger a reload by sending a workspace/reload request.
According to the specifiaction in https://github.com/build-server-protocol/build-server-protocol/pull/135, the reload is ignored in case of failure, ie the state of sbt stays the same as before.

@eed3si9n Can this PR be integrated in sbt-1.4.0?
It should be 100% safe since this implementation lives on its own. No existing code is modified.

It should be 100% safe since this implementation lives on its own. No existing code is modified.

I merged it, but nothing is totally safe. Sure it's unlikely to invalidate existing builds but if there was a major issue in workspace/reload, then we'd likely have to fix it before 1.4.0.


PHOENIX-5104: breaks client backwards compatibility

Fixing by adding a new connection property "phoenix.index.longViewIndex.enabled" which is by default false.
Clients can set this property to true to be able to use longViewIndexes.

+1 @m2je. Thanks.

+1

Merged


Support for more data repositories - with a shared library?

Originally opened 2019-12-20 07:11 EST by @nuest
In the ReproServer-preprint you mention you want to support more data repositories. :100: !
Looking at reproserver's code to download data from Zenodo and the one that repo2docker uses in its "contentprovider", I see a lot of similarities!
suppdata is a "DOI to data" package for R, which so far focused on supplemental data for papers' DOIs, but I'd like to extend it towards data repositories.
A background discussion is also here: https://github.com/ropenscilabs/doidata/issues/1
What do you think about a generic "data download from DOI" package in Python that both ReproServer and repo2docker could use?

Originally posted by @remram44
I'm in favor, though we might want to support more than DOIs?

Originally posted by @nuest
Do you mean other handles?
git URLs (git://) and Git{Hub/Lab} URLs of course.
Maybe also files from Git LFS?
repo2docker also has an open issue for plain URLs (zip files).
--
Thanks for the interest. We could sketch this out a bit further and then reach out to the r2d folks if this is feasible for them. It simply feels like something that should be done once, and right, and put on PyPI for everyone to use.


Add Hospital_Region Filtering to Rnssp Templates

Currently, it appears some of the Rnssp templates only allow geographic filtering by Site="" . Washington recently held our local Community of Practice where we highlighted the "Text Analysis Interactive Dashboard" as potential exploratory data tool for syndrome development/evaluation. Some local health departments noted however that they are not easily able to use Rnssp templates focusing in on their local data as the only filtering available is Site="Washington" in the Knit with Parameters menu.
I have been able to implement a workaround for this issue using a Data Details API Query filtered to the specific Hospital_Region of interest for the "Text Analysis Interactive Dashboard", however it seems unlikely this workaround would be able to be implemented for other Rnssp templates.
Happy to discuss this further, just wanted to elevate expressed local interest and barriers to using these awesome syndromic tools!

Good suggestion and something we will start to investigate adding to templates to make this a little more intuitive.  Some templates will allow you currently to include an API URL from ESSENCE that the user can specify to whatever level of granularity they like (e.g., county, facility, etc), but that requires getting the API from the system.


getMarketInfo returning an object instead of an array

Hi, I'm receiving this error on calling the getMarketInfo() method,
Type error: Return value of Achse\ShapeShiftIo\Client::getMarketInfo() must be of the type array, object returned
I somehow fixed by changing the expected return type from array to stdClass but not sure if it is totally correct

Hi @quarkmarino, thanks a lot for the report.
It's indeed a bug. I've fixed it by splitting method into  getMarketInfo(..): stdClass (with required parameters) and getWholeMarketInfo(): array with no parameters. Tagged updated beta release: https://github.com/Achse/php-shapeshift-io-api/releases/tag/0.0.2


linkpreviews stopped working

hi, just wanted to report that links stopped working.  Thank you for supporting this site!

Thanks, it should be fixed now

Thanks, can confirmed it was fixed!


Code listing for app.py in "look” Tutorial has a bug

In the Serving images section, the code listing for app.py tries to import the images module as import images. I believe this should be from look import images or depending on one's preferences import look.images and refactor references to images as look.images. I prefer the former:
import os

import falcon

from look import images

def create_app(image_store):
    api = falcon.API()
    api.add_route('/images', images.Collection(image_store))
    api.add_route('/images/{name}', images.Item(image_store))
    return api

def get_app():
    storage_path = os.environ.get('LOOK_STORAGE_PATH', '.')
    image_store = images.ImageStore(storage_path)
    return create_app(image_store)

Indeed, well spotted!

(It's probably better to use from .images import ImageStore, Resource etc just to stay consistent with the rest of the WSGI tutorial.)


Style/SafeNavigation does't understand order of operations

Expected behavior
This  should't be flagged as an error
Actual behavior
-      while ref && ref.children.length > 0
+      while ref&.children&.length > 0

Breaks the code with:
undefined method `>' for nil:NilClass

Steps to reproduce the problem
RuboCop version
Include the output of rubocop -V. Here's an example:
$ rubocop -V
0.52.1 (using Parser <IP_ADDRESS>, running on ruby 2.4.1 x86_64-darwin16)

@ptarjan & @bunnymatic this was addressed in #5419. Please test against master and let me know if there is still any issues.
We will no longer register an offense for ref && ref.children.length > 0 since > cannot be elegantly converted to use safe navigation. Technically, we could correct it to ref&.children&.length&.> 0 or ref&.children&.length &.> 0, but I am not sure that we want to advocate for safe navigation with non dot methods.
Style/SafeNavigation will also now handle converting all methods in a chain to use safe navigation so the correction of user && user.thing.blank? will now be user&.thing&.blank?.

Style/SafeNavigation will also now handle converting all methods in a chain to use safe navigation so the correction of user && user.thing.blank? will now be user&.thing&.blank?.

@rrosenblum that's not a safe transformation either. If user is non-nil and thing is nil, that transformation changes the behavior from a NoMethodError to silently returning nil.

@russell-stripe the example that you provided will not produce a NoMethodError because blank? is implemented on nil, however I do see your point. Lint/SafeNavigationChain was already handling converting methods in a chain to use safe navigation. The change to Style/SafeNavigation was to follow the same kind of changes.
This is an odd issue because it borders on the edge of how is the code explicitly written vs the intention of the code. There was something similar mentioned in another issue that user && user.thing.blank? would imply that we know user can be nil, but if user is not nil then thing is guaranteed to be there.
I think you raise a good point, however I think there is a much larger conversation that is needed around this. Should we stop flagging method chains to use safe navigation all together? What would this mean for SafeNavigationChain? By eliminating a potential NoMethodError are we helping the code more than leaving code that code produce a NoMethodError. Should there be a cop that flags user && user.thing.other_thing as code that could produce a NoMethodError?
@bbatsov @jonas054 @pocke @Drenmi care to weigh in on this?

From my perspective, the fix is fine.  At some point, if you need to safe navigate that far down into an object, maybe that in itself is a smell and you should revamp the code.   I appreciate your looking into this.  If nothing else, it forced me to rewrite my code to not be so smelly.  So the cops are keeping me on the straight and narrow.  Job well done.

Should there be a cop that flags user && user.thing.other_thing as code that could produce a NoMethodError?

I foresee a lot of false positives on that one. I think the normal case is that the author knows or have ensured that the thing object responds to other_thing if user is non-nil.  It would have to be disabled by default if we add such a cop.
About user && user.thing.blank?, I think Style/SafeNavigation should borrow some functionality from Lint/SafeNavigationChain and allow such constructs when the method call  is something that nil responds to (such as nil?), or one that's in a white list (such as blank?).

Thanks for the discussion. I’d like to note that any false positives for
this autocorrect make it impossible for us to apply it to our whole
codebase. Is it possible to have two modes? A sound and simple one and a
more aggressive one with the false positives?
On Thu, Feb 22, 2018 at 1:32 AM Jonas Arvidsson<EMAIL_ADDRESS>wrote:

Should there be a cop that flags user && user.thing.other_thing as code
that could produce a NoMethodError?
I foresee a lot of false positives on that one. I think the normal case is
that the author knows or have ensured that the thing object responds to
other_thing if user is non-nil. It would have to be disabled by default
if we add such a cop.
About user && user.thing.blank?, I think Style/SafeNavigation should
borrow some functionality from Lint/SafeNavigationChain and allow such
constructs when the method call is something that nil responds to (such
as nil?), or one that's in a white list (such as blank?).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bbatsov/rubocop/issues/5527#issuecomment-367620631,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACczwaMqRZVrfRLYBmBSXU0sNsJaGgEks5tXTQxgaJpZM4RxU-b
.

@ptarjan I guess we could have two modes, but I don't think it's necessary. Could you take a look at my PR, which changes Style/SafeNavigation to be more cautious?


[Feature]: Allow ExecutablePath to work in .runsettings

🚀 Feature Request
https://playwright.dev/dotnet/docs/test-runners#using-the-runsettings-file-1 shows the supported values but < ExecutablePath > isn't listed nor was I able to get it to work in a net 4.8 Nunit project. The request is to allow ExecutablePath work in the .runsettings file.
Example
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <!-- NUnit adapter -->
  <NUnit>
    <NumberOfTestWorkers>24</NumberOfTestWorkers>
  </NUnit>
  <!-- General run configuration -->
  <RunConfiguration>
    <EnvironmentVariables>
      <!-- For debugging selectors, it's recommend to set the following environment variable -->
      <DEBUG>pw:api</DEBUG>
    </EnvironmentVariables>
  </RunConfiguration>
  <!-- Playwright -->
  <Playwright>
    <ExecutablePath>C:\....chrome.exe</ExecutablePath>
    <ExpectTimeout>5000</ExpectTimeout>
    <LaunchOptions>
      <Headless>false</Headless>
    </LaunchOptions>
  </Playwright>
</RunSettings>

Motivation
Providing the browser path in the .runsettings allows for flexible testing scenarios and bypass any type of install browser script.

ExecutablePath needs to be under LaunchOptions, have you tried that?

ExecutablePath needs to be under LaunchOptions, have you tried that?

I didn't know that was possible, will give it a go!

ExecutablePath needs to be under LaunchOptions, have you tried that?

That didn't work. So far all I did was create a new project, installed playwright package. My environment won't allow me to download the browsers automatically. It's still wanting to find a browser under AppData ms-playwright.
Part of the error says to run a playwright.ps1 script (however such a script doesn't exist under bin/debug/netX/playwright.ps1). Could it be because this project uses packages config and not PackageReference? But don't see why I'd need to run a script if I've already side loaded a browser.

The following works for me:
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <!-- Playwright -->
  <Playwright>
    <BrowserName>chromium</BrowserName>
    <ExpectTimeout>5000</ExpectTimeout>
    <LaunchOptions>
      <Headless>false</Headless>
      <ExecutablePath>/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev</ExecutablePath>
    </LaunchOptions>
  </Playwright>
</RunSettings>

How do your tests look like? Are you launching the browser manually?
AFAIK it should also work with package config - we mostly test with PackageReferences and ne6+ projects.

The following works for me:

chromium
5000

false
/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev

How do your tests look like? Are you launching the browser manually?
AFAIK it should also work with package config - we mostly test with PackageReferences and ne6+ projects.

I am just starting with the example from https://playwright.dev/dotnet/docs/test-runners#customizing-browsercontext-options-1
Would you expect this to work if you created a brand new project, installed playwright nuget packages, and pointed your runsettings file to a browser? In other words, skipping the step that mentions running a playwright install script.

Install is not required if you have your own channel or executable path - so that should not be the problem.
There might be an issue with net48/nunit integration since you mentioned 48.
Probably the same as https://github.com/microsoft/playwright-dotnet/issues/2353.
Maybe the workaround works for you as well there? https://github.com/microsoft/playwright-dotnet/issues/2353#issuecomment-1310170971

Install is not required if you have your own channel or executable path - so that should not be the problem.
There might be an issue with net48/nunit integration since you mentioned 48.
Probably the same as #2353.
Maybe the workaround works for you as well there? #2353 (comment)

Ok so all I had to do was add this and it started working. I don't understand why, but is this something we can rely on going forward?
< DisableAppDomain>True</ DisableAppDomain>

I'll fold it into https://github.com/microsoft/playwright-dotnet/issues/2353#issuecomment-1310170971 - there was a RFC for it: https://github.com/microsoft/vstest-docs/blob/main/RFCs/0019-Disable-Appdomain-While-Running-Tests.md
This seems a setting of VSTest.


HTTP2Frame Payloads as an implicitly @_frozen enum.

Even in Swift 5, enums defined outside of the standard library, C headers, and swift overlays will be considered frozen and immutable, meaning that a modification to one will be a semver-major version-breaking change. Our HTTP2Frame.FramePayload type is (still) an enum, and we literally cannot do anything about it without dropping in a C header enumerating the known frame ID values.
There are already two published RFCs that have added new frame types to HTTP2: the ALTSVC frame defined by RFC 7838 § 4 and the ORIGIN frame defined by RFC 8336 § 2. Those are included already (or are going to be included in my encoder/decoder patch), but more will doubtless arrive at some point.
Is there anything we can do about this? My original implementation used a Frame protocol and subtypes, with a switch over the type (i.e. case is DataFrame: or case let x as DataFrame:) to disambiguate them. Is this a better option, and if so, shouldn't we try to land this before swift-nio-http2 transitions off its nghttp2 dependency altogether?

I think we absolutely can change this, as the removal of nghttp2 will be a semver major anyway.
The question is what the design should be. My inclination is to avoid a Frame protocol with subtypes, as it necessarily involves a lot of type casting with the runtime performance overhead that entails.
I’m somewhat more interested in the possibility of using an enumeration with an escape hatch for future custom frame types. This would be a .custom case that holds both the frame ID and an Any, allowing a hook for extensions in the future.
That said I’m definitely open to other designs.

Not sure if it matters but we use unkown in netty for custom frame types.


Use sad_plane to avoid falling back to slow Rust SAD code

This gives approximately a 2% speed improvement at speed 2
on 1080p content. Currently only benefits 8-bit.

Codecov Report
Base: 86.54% // Head: 86.51% // Decreases project coverage by -0.03% :warning:

Coverage data is based on head (a15bf56) compared to base (5bf43ab).
Patch coverage: 84.21% of modified lines in pull request are covered.

:exclamation: Current head a15bf56 differs from pull request most recent head 3ba8f34. Consider uploading reports for the commit 3ba8f34 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3010      +/-   ##
==========================================
- Coverage   86.54%   86.51%   -0.04%
==========================================
  Files          89       89
  Lines       34072    34080       +8
==========================================
- Hits        29488    29484       -4
- Misses       4584     4596      +12

Impacted Files
Coverage Δ

src/sad_plane.rs
17.85% <25.00%> (ø)

src/asm/x86/dist/mod.rs
98.73% <100.00%> (+0.02%)
:arrow_up:

src/asm/x86/sad_plane.rs
73.33% <100.00%> (ø)

src/scenechange/fast.rs
46.15% <100.00%> (+2.15%)
:arrow_up:

src/header.rs
68.93% <0.00%> (-1.39%)
:arrow_down:

src/tiling/tile_state.rs
88.40% <0.00%> (-0.73%)
:arrow_down:

src/encoder.rs
87.06% <0.00%> (-0.17%)
:arrow_down:

v_frame/src/plane.rs
88.78% <0.00%> (-0.12%)
:arrow_down:

src/deblock.rs
95.50% <0.00%> (+0.07%)
:arrow_up:

src/me.rs
95.59% <0.00%> (+0.48%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Hmm, the tests pass for me locally. I wonder if the segfault is somehow due to the fact that sad_plane uses aligned loads for everything? But then again I wonder why it would only segfault on macos if that is the case.

It needs a rebase.

The macos failing test makes me wonder if there isn't a valgrind.

Well, the segfault does seem deterministic. It is indeed weird that it's only on Mac. I don't particularly have a Mac to run gdb on...


About text

Should be "droidcon Italy app" instead of "Droidcon Italy"

No. That is the same label we use in the launcher. I am definitely not adding "app" to the launcher icon, nor changing the existing code without a reason. I can make it lowercase.

Closing this as it's not relevant to Squanchy itself


hystrix-javanica-ctw artifact

Hi!
How can I get the hystrix-javanica-ctw?
I am trying this, but it didn't work...
<dependency>
    <groupId>com.netflix.hystrix</groupId>
    <artifactId>hystrix-javanica-ctw</artifactId>
    <version>1.5.10</version>
</dependency>

Not a question for Spring Cloud, try https://github.com/Netflix/Hystrix


The clock widget has disappeared

The clock widget has disappeared. And option "hide_tab_close": true,  doesn't hide close button.
version 3.1.1 (BUILD 3176)

@poucotm thank you, the last commit fixed it.


Could not parse expression with acorn: Unexpected content after expression

Initial checklist

[X] I read the support docs
[X] I read the contributing guide
[X] I agree to follow the code of conduct
[X] I searched issues and couldn’t find anything (or linked relevant results below)

Affected packages and versions
Latest
Link to runnable example
No response
Steps to reproduce
npm 9.6.6
node 18.15.0
bundler N/A (running script in node locally)
I read the link about this error, but it doesn't seem to apply. I think it's getting confused thinking it's Javascript curly braces and not just curly braces used in regular text.
https://mdxjs.com/docs/troubleshooting-mdx/#could-not-parse-expression-with-acorn-unexpected-content-after-expression
I have isolated the issue to the following text inside of an MDX file (this is from a documentation file I have no control over).
- The issue is assigned to {no one/a team/a member}.

I have tried replacing with a comma delimiter, same error:
- The issue is assigned to {no one, a team, a member}.

Any idea why this might be happening?
Expected behavior
Shouldn't crash on this string
Actual behavior
Crashes
Runtime
Other (please specify in steps to reproduce)
Package manager
Other (please specify in steps to reproduce)
OS
macOS
Build and bundle tools
Other (please specify in steps to reproduce)

Hi! This is expected, as the docs you link point out. What to do, is also explained in those docs: https://mdxjs.com/docs/troubleshooting-mdx/#could-not-parse-expression-with-acorn-unexpected-content-after-expression

I think it's getting confused thinking it's Javascript curly braces and not just curly braces used in regular text.

It’s not confused, it’s sure. All curly braces are expressions. Escape them if you mean text

@wooorm Thanks for your quick response.
To be specific, I am trying to process the Sentry documentation mdx files. Around 30 (out of 300ish) files throw errors.
https://github.com/getsentry/sentry-docs/tree/master/src/docs/product
Here are 3 of the errors:
Page 'docs/product/accounts/getting-started/index' or one/multiple of its page sections failed to store properly. Page has been marked with null checksum to indicate that it needs to be re-generated.
[42:26: Could not parse expression with acorn: Unexpected character '#'] {
  reason: "Could not parse expression with acorn: Unexpected character '#'",
  line: 42,
  column: 26,
  position: {
    start: { line: 42, column: 26, offset: 3138 },
    end: { line: null, column: null }
  },
  source: 'micromark-extension-mdx-expression',
  ruleId: 'acorn'
}
Page 'docs/product/accounts/pricing' or one/multiple of its page sections failed to store properly. Page has been marked with null checksum to indicate that it needs to be re-generated.
[36:2: Unexpected character `!` (U+0021) before name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a comment in MDX, use `{/* text */}`)] {
  reason: 'Unexpected character `!` (U+0021) before name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a comment in MDX, use `{/* text */}`)',
  line: 36,
  column: 2,
  position: {
    start: { line: 36, column: 2, offset: 2473, _index: 15, _bufferIndex: 1 },
    end: { line: null, column: null }
  },
  source: 'micromark-extension-mdx-jsx',
  ruleId: 'unexpected-character'
}
Page 'docs/product/accounts/quotas/index' or one/multiple of its page sections failed to store properly. Page has been marked with null checksum to indicate that it needs to be re-generated.
[26:2: Unexpected character `!` (U+0021) before name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a comment in MDX, use `{/* text */}`)] {
  reason: 'Unexpected character `!` (U+0021) before name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a comment in MDX, use `{/* text */}`)',
  line: 26,
  column: 2,
  position: {
    start: { line: 26, column: 2, offset: 2276, _index: 12, _bufferIndex: 1 },
    end: { line: null, column: null }
  },
  source: 'micromark-extension-mdx-jsx',
  ruleId: 'unexpected-character'
}
Page 'docs/product/accounts/quotas/manage-attachments-quota' or one/multiple of its page sections failed to store properly. Page has been marked with null checksum to indicate that it needs to be re-generated.
[19:36: Could not parse expression with acorn: Unexpected character '#'] {
  reason: "Could not parse expression with acorn: Unexpected character '#'",
  line: 19,
  column: 36,
  position: {
    start: { line: 19, column: 36, offset: 1770 },
    end: { line: null, column: null }
  },
  source: 'micromark-extension-mdx-expression',
  ruleId: 'acorn'
}

Am I doing something wrong by passing the content of these mdx files directly in like this?
// fromMarkdown is where the errors occur

const mdxTree = fromMarkdown(content, {
    extensions: [mdxjs()],
    mdastExtensions: [mdxFromMarkdown()],
});

Sentry's documentation is written using valid MDX.
As an example, here's the line of the error of the first file listed:
### Alert Notifications {#31-alert-notifications}

By default, Sentry will notify you about errors in your apps...

It's that first line. The header with the braces in it. This is valid markdown, but fromMarkdown doesn't like it.
Am I missing a step it the conversion process? Should I be using more/different extensions/mdastExtensions?
Thank you!

Sentry's documentation is written using valid MDX.

Presumably MDX 1.
See the announcement and migration docs for MDX 2 here: https://mdxjs.com/blog/v2/

This is valid markdown, but fromMarkdown doesn't like it.

It’s markdown. It’s not MDX. Because #31 is not valid JavaScript.
You can use an escape: \{#31-alert-notifications}.
You can also use valid JavaScript:  {/* 31-alert-notifications */}.

Nice you found something that works for you!

Is there a script that can convert mdx1 to mdx2?

No. If that was possible, MDX 2 would not be needed: the entire point of the grammar changes in MDX 2 is to allow tools to parse the entirety of MDX and understand what everything is, which wasn’t possible before, but do allow such scripts in the future.


[ESP32S3] Incomprehensible offset if "CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE" is used

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
Hi,
if the KConfig option "CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE" is used later in the memory.ld file the following lines can be found:
https://github.com/espressif/esp-idf/blob/439a709c4298b0f613d09b47fc0b7b9728fc5733/components/esp_system/ld/esp32s3/memory.ld.in#L120-L125
The used offset 0x3FCA0000 is incomprehensible. This not the beginning of any memory region of the ESP32S3. Could you please explain the used address? If not this seems to be a bug.
This may also related to the issue #10270. At least it can be analyzed of fixed together.
Greetings
Sebastian

Thanks for reporting.


[EBPF] Fix complexity data dir permissions

What does this PR do?
Fix permissions for the complexity data dir when calculating eBPF stats.
Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


Best response time is coming 0 ms in the Report

Best response time is coming 0 ms in the Report.
Requests Without Tests missing the icon ( ).

Oh, it's my fault, thanks @BhanuDash007 for report this, i will fix coming soon

Hey @BhanuDash007, i can't reproduce this behavior, can you send a collection with one example or show a image?


Zita waring on code thats not really processing.

Zita gives the following warning on programs that are not really processing warning:
IllegalStateException: field.getFirstDescendant?nterfaceType::class.java) must not be null
and
PMDException: Error while parsing Processing.pde
That not really graceful.

Two error messages were fixed, however the PMDException was already being handled by us, just with the weird message. I changed the message however not sure if the new one is good enough. Should be more informative.


error in name-resolving when using the library in async mode on python 3.10

Not really sure things can be fixed inside this library, but by mentioning it here I hope it can warn / help people about this, or even better gather some work-around ?
I am trying to use the announce feature in asynchronous mode through:
def play_sound(api_uri, sound_uri):
    async def play_and_close():
        try :
            log.info(f"Now playing {sound_uri} on {api_uri}")
            sndsrv = AmpliPi(api_uri, timeout=30)
            sound: Announcement  = Announcement(media=sound_uri, vol_f=0.6, source_id=3)
            await sndsrv.announce(sound)
            await sndsrv.close()
        except Exception as e:
            log.error("playing sound failed.")
            log.exception(e)
    asyncio.run(play_and_close())

Note: I am using the asyncio.run() trick because the play_sound() will be called from some event-handling system that is not applying any await --> so the asyncio.run() is there to avoid  method X never been awaited for
This works if I just use the local IP address in the  api_uri to amplipi like say http://<IP_ADDRESS>/
It fails however if I use the local name http://amplipi.myhome.local/ with this elaborate stack-trace:
2022-08-20 10:32:12 @__main__                [ERROR   ] playing sound failed.
2022-08-20 10:32:12 @__main__                [ERROR   ] can't register atexit after shutdown
Traceback (most recent call last):
  File "/mnt/extra/projects/mpo/home-autom/docker-k79-nhc2/./doorbell-srv.py", line 34, in play_and_close
    await sndsrv.announce(sound)
  File "/home/mpo/.local/lib/python3.10/site-packages/pyamplipi/amplipi.py", line 122, in announce
    response = await self._client.post('announce', announcement.json())
  File "/home/mpo/.local/lib/python3.10/site-packages/pyamplipi/client.py", line 148, in post
    async with self._http_session.post(
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 880, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/home/mpo/.local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 860, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 813, in run_in_executor
    executor = concurrent.futures.ThreadPoolExecutor(
  File "/usr/lib/python3.10/concurrent/futures/__init__.py", line 49, in __getattr__
    from .thread import ThreadPoolExecutor as te
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 37, in <module>
    threading._register_atexit(_python_exit)
  File "/usr/lib/python3.10/threading.py", line 1497, in _register_atexit
    raise RuntimeError("can't register atexit after shutdown")
RuntimeError: can't register atexit after shutdown

References on the web I could find all seem to indicate some internal python change since 3.9

https://github.com/python/cpython/issues/86813
https://github.com/boto/boto3/issues/3221
https://stackoverflow.com/questions/65467329/server-in-a-thread-python3-9-0aiohttp-runtimeerror-cant-register-atexit-a

in some weird way it doesn't seem to play well with (at least) the getaddrinfo inside aiohttp

For now the workaround is likely just to resolve the address ahead of time, refeshing the cached resolution on failure.
Another way to handle this would be to listen to amplipi's mdns broadcasts. Check out the contents of _amplipi._tcp.local. . Thats what the HA integration uses.

in fact, I just gave this 'fault-generating' code another spin with updated versions of all packages involved -- and happy to report the problem does no longer persist.
So probably somebody down somewhere has given this the proper attention?
For me it is ok to close this.


WebP support

Does anyone knows if there's a way to enable WebP encoding somehow?

Answer looks like YES - https://bitbucket.org/luciad/webp-imageio
imgscalr only operates on raw, unencoded image data (in the form of a
BufferedImage instance) -- image format support is handled at the ImageIO
encoder/decoder layer - that link above registers new encoders/decoders
that handle the format to the ImageIO library so when you do read/write
operations it will give you back a BufferedImage that you can use imgscalr
on.
Hope that helps!

Riyad
http://thebuzzmedia.com
On Tue, Jul 14, 2015 at 9:32 PM, Rafael Sanches<EMAIL_ADDRESS>wrote:

Does anyone knows if there's a way to enable WebP encoding somehow?
—
Reply to this email directly or view it on GitHub
https://github.com/thebuzzmedia/imgscalr/issues/114.

I recommend to look at https://bitbucket.org/luciad/webp-imageio

The repository webp-imageio is not available, and the forks don't work either... Seems like we need a differekt solution :-)


Confusion with camera models

I was hoping someone would help me clarify some stuff.  We are planning on using a couple D415 cameras with our setup and wanted to be sure that this package will support it?  Can someone confirm this?
Also, I am confused with R410 vs D410 vs D415.  The only URDF I see in this packages is called R410, is this the same as the D410 module used in the D415 camera?
If yes, can someone confirm how the camera_link in the URDF relates to the tripod screw hole on the D415 camera case.
Thanks in advance.

[Please Ignore - RealSense system comment]

Hi
In general, the difference between D410 vs D15, or D430 vs D435 is the RGB Color camera. The D410/D430 is "without RGB camera", where D415/D435 is "with RGB camera".
Thanks


On Android, this video plays with optimized visuals but no sound, while on iOS, it cannot be played

Bug
Platform
Which player are you experiencing the problem on:

iOS
Android

Environment info

Library version: 6.0.0-beta.3
Device: iPhone 11, 14 Pro Max, google pixel 6a
Reproducible sample code
<Video
source={{
uri: 'http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001029/index.m3u8',
}}
/>
Video sample
http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001029/index.m3u8
On Android, this video plays with optimized visuals but no sound, while on iOS, it cannot be played：
{"error": {"code":<PHONE_NUMBER>, "domain": "CoreMediaErrorDomain", "localizedDescription": "The operation couldn’t be completed. (CoreMediaErrorDomain error<PHONE_NUMBER>.)", "localizedFailureReason": "", "localizedRecoverySuggestion": ""}, "target": 2619}

Hey @john-dududu, link that you provide don't work for me

Hey @john-dududu, link that you provide don't work for me

This is an IPv6 link. Does your network support IPv6?

Not sure... @freeboub cloud you look here ?


Ignore weights and just do 49 49 2

The AMMFactory needs to just always set pool weights to 49 49 2 so weight trolling isn't possible.
Do not change the abi. Instead just ignore the weights parameter.

Should we remove this contract change from dev? It's not usable until the add liq code also swaps for the correct initial balances.

reevaluating


add AMD support

Would be nice if there where AMD support

I'm currently using ES6 modules internally, which are backend-agnostic. If you need AMD support, please feel free to PR :)


this there a porblem?

Describe your problem here.
source/FunkinLua.hx:613: lines 613-617 : Int should be Bool
source/FunkinLua.hx:613: lines 613-617 : ... For function argument 'f'
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No response

it's on the readme
haxelib git linc_luajit https://github.com/nebulazorua/linc_luajit

Nah


WebView - Field focusing beneath (merchant page) after opening PayPal page in iframe

Description
The focus of the cursor is still on the parent page ( Merchant website) than switching the focus to PayPal page along once the iframe loaded, which is causing little confusion for the user and experience.
Sample screen:

Steps to reproduce
Checkout using PayPal on any webview ( e.g Facebook, Messanger ..)
Affected browsers

[ ] Chrome
[ ] Safari
[ ] Firefox
[ ] Edge
[ ] IE
[ ] Chrome Mobile/Tablet
[ ] Safari Mobile/Tablet
[x] Web View / Safari ViewController
[ ] Other

@mcntsh assigning this to you since it looks like a similar problem to https://github.com/paypal/paypal-checkout/issues/788 -- but with some nuances since we need to keep the focus inside the iframe. Maybe the same solve, maybe not. Or @vishakha94 if you fancy an interesting problem please feel free to take a look. :)

PR #896 will have addressed this UX concern and the fix will be out in the next release. Thanks for reporting!


Change terraform to ECS

Context:
As per this discussion group thread it would be helpful to change the terraform to ECS since there are containers available .
A/C's:

[ ]

Candidate template for doing this: https://github.com/finleap/tf-ecs-fargate-tmpl


Text can move out of border

This issue has been closed due to recent upgrades in the CSS script that i have merged with the main branch.
It is fixed now!


Automated Package Upgrade

:tada: This PR is included in version 25.3.102 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Run Command

Is possible something like run npm command.?
NpmCli.InDirectory("some/dir")
    .Run("dev", args) // OR
    .RunAsync("dev", args) // OR
    .RunAsync("run dev", args) // OR

and possibility async, because it may be long process

There are universal Execute and ExecuteAsync methods of NpmCli that you can use to perform any command:
NpmCli.InDirectory("some/dir")
    .Execute("run args");

NpmCli.InDirectory("some/dir")
    .ExecuteAsync("run args");

@azhe403, did that help?

@azhe403, did that help?


feat: use aichat's sessions for messages

Right now I'm keeping track of the conversation by just converting all previous non-command messages into a string and giving the LLM instructions. This leads to some issues in responses, especially in the less advanced models.
The actual APIs take in this information natively, but using aichat's CLI doesn't allow access to that functionality in the same way.
The easiest fix is to save the history of each room in an aichat session. This will need to wait on https://github.com/sigoden/aichat/pull/370 or similar improvements to be made, or I'll need to switch to using a real API.

This has been largely fixed by improving the prompting. I'm closing for now though I may pick this back up later.


two different errors

Hi sr, thanks for your library.
im getting two different erros, first error was

and then i thought maybe i needed to add the Lumen part of your readme, then after following those steps i got:

i must be doing something wrong, im new to laravel and this api so im a little confuse.
i have set your code as a function inside a controller, like this:
http://pastebin.com/HDXkkZs7
but maybe im doing it wrong, i saw you have a class Service with this code but i actually don't understand what to do with that class, this is why i set a controller and then call it from a route (domain.com/controllerfunction) with your code.

Hello @fonko,
The SoapFault exception is not related to this libarary. You'll need to ask in in the official google-ads-php library instead (https://github.com/googleads/googleads-php-lib).
Regarding your second question I'm not quite sure on how you've implemented this. If you're using Laravel, then it doesn't make sense, that you're including the Lumen service provider?

thanks for your answer nikolaj, actually im brand new to laravel so im not sure about lumen. If i should include, or not, the Lumen part described in your steps. But without this lumen part i was getting a nice looking json

and the issue was regarding the mutate() function.
anyhow, i will try to find out whats going on with this googleads-php-lib
if you have any suggestinos i will be very thankful ! :)

@fonko You'll have to ask in the Google ads repository.


Ability to edit Input Jobs

Everything is in place for the ability to drop / add Input Jobs for a Job.  For example, assume:
A ---> B
C

If we wanted to include C as an input job for B, we would have to either remove B and recreate with same settings, but including C, or merge to a new Job D.  But even then, we might want the actions performed with B on records from C, which would not be the case with D.
Best case, we can add C as an input Job for B:
A ---> B
       ^
       |
       C

Methods are in place, add_input_job and remove_input_job, but holding off on anything further at this point.
By including as input, a Job that was run after -- specifically, with a higher Job id -- it throws off the simplistic lineage re-run order that was id based.  This relates to issue https://github.com/WSULib/combine/issues/322.  Keeping open for now, until this is resolved.

Methods in place, more nuanced downstream lineage through topographic sorting. Closing.


Navigator change backup

Sending route changes via popRoute and pushRoute methods in SystemChannels.navigation. These messages will be used in only in the web. Adding a new class route_notification_messages which only notify web.
Description
In order to upstream WebOnlyNavigatorObserver in flutter web we would like to it's functionality with SystemChannel messages. There will also be another change which will alter: https://github.com/flutter/flutter_web/blob/master/packages/flutter_web_ui/lib/src/engine/window.dart#L101 to parse the new route and also deletes:
https://github.com/flutter/flutter_web/blob/master/packages/flutter_web/lib/src/widgets/web_navigator.dart altogether.
Related Issues
#34272
Tests
I added the following tests:
unit tests for route_notification_messages_test.dart
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
[x] No, this is not a breaking change.

The analyzer is now unhappy that you have trailing whitespace somewhere. I would recommend configuring your VSCode and/or IntelliJ to automatically strip whitespace when saving the file.


No attribute 'read_retry'

Problem:
Traceback (most recent call last):
  File "test_read.py", line 4, in <module>
    print(Adafruit_Python_DHT.read_retry(Adafruit_Python_DHT.DHT22, 27))
AttributeError: 'module' object has no attribute 'read_retry'

Python version Python 3.4.2

Steps to reproduce:
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd  Adafruit_Python_DHT

I require it to work on python3, so we will install to python 2 and 3:
sudo python setup.py install
sudo python3 setup.py install # <---- note I'm installing to python 2  and 3

Verifying we can read the sensor:
cd ./Adafruit_Python_DHT/examples
sudo ./AdafruitDHT.py 22 27
Temp=20.0*  Humidity=63.1%

Ok, so far so good.
Now, lets run it with python 3:
Temp=19.8*  Humidity=63.6%

Now lets verify we're actually using python 3 inside the file we're running:
nano ./AdafruitDHT.py

Add:
import sys
print (sys.version)

Now lets run it again to make sure we're actually using python 3:
sysop@kivypie:~/Adafruit_Python_DHT/examples$ python3 AdafruitDHT.py 22 27
3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1]
Temp=19.8*  Humidity=63.7%

Perfect. So reading the sensor works on python3.
Now lets try it again, but now in a test file:
import Adafruit_Python_DHT
print(Adafruit_Python_DHT.read_retry(Adafruit_Python_DHT.DHT22, 27))

thats in test_read.py in the home folder, and the Adafruit_Python_DHT folder is also in the home folder.
sysop@kivypie:~$ python3 test_read.py
Traceback (most recent call last):
  File "test_read.py", line 4, in <module>
    print(Adafruit_Python_DHT.read_retry(Adafruit_Python_DHT.DHT22, 27))
AttributeError: 'module' object has no attribute 'read_retry'

So the question is, why does it work on python3 in the example folder but not in my own file? I previously had this working great on python3 till I needed to reinstall the rpi OS and Adafruit_Python_DHT

SOLVED: I had to use:
import Adafruit_DHT
print(Adafruit_DHT.read_retry(Adafruit_DHT.DHT22, 27))

So for people wanting to use it on python 3, instructions are above, and use as in the snippet ^

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

RESTART: C:\Users\Walter\AppData\Local\Programs\Python\Python36-32\MUS CONTROL with adafruit.py
Traceback (most recent call last):
File "C:\Users\Walter\AppData\Local\Programs\Python\Python36-32\MUS CONTROL with adafruit.py", line 21, in
humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.AM2302, 4)
AttributeError: module 'Adafruit_DHT' has no attribute 'read_retry'


Aggregate function is missing typing for where

In the new aggregate function the types are not generate properly and where is missing

I can confirm this:

This bug invalidates the examples that is shown in the release notes. We will need to fix this.
Reproduction:
generator client {
  provider             = "prisma-client-js"
  experimentalFeatures = ["aggregateApi"]
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id   Int    @id
  age  Int
  name String
}

Generate client from this model and investigate the types.

Thanks a lot for reporting 🙏
This issue is fixed in the latest version of @prisma/client: 2.2.1


How to use SharpDX in main project

Hi,
ATF is great. However for my current project I need access to the SharpDX libraries. When I add a reference to SharpDX in an ATF project I receive the error "System.TypeInitializationException". If I'm not mistaken I believe this issue is the result of SharpDX already being used in the ATF framework.
I was wondering if anyone knew how to resolve this issue or other method to get access to the SharpDX libraries within the main project.
Full Error:
An exception of type 'System.TypeInitializationException' occurred in Atf.Gui.WinForms.dll but was     not handled in user code
Additional information: The type initializer for 'Sce.Atf.Resources' threw an exception.
Thanks

Hello,
I added every SharpDX library that is included with ATF to the Circuit Editor sample app, and I'm not getting that exception. It's legal and normal to reference the same dll from multiple projects.
Do you have the setting "break when an exception is thrown" set for all exceptions? This is in Debug -> Exceptions. I'm wondering if you have accidentally defined a method named ResourceUtil.Register(Type). That static Resources class uses reflection to search for that method, but it will throw an exception if it finds two of them. You would see an InvalidOperationException being raised in this case, but if you don't have break-on-exceptions turned on, you might just see the TypeInitializationException thrown afterwards, whose InnerException property is the original InvalidOperationException.
If that's not it, maybe you could set a breakpoint in Sce.Atf.Resources, in the static constructor, and see how far execution gets (if at all).
Please let me know how it goes and if you can report more info.
--Ron

I am also getting the same error, by including the SharpDX 3.1.1 library without any references to it.

System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Sce.Atf.Applications.StandardEditCommands' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

No exports were found that match the constraint:
ContractName	Sce.Atf.Applications.IContextRegistry
RequiredTypeIdentity	Sce.Atf.Applications.IContextRegistry

Resulting in: Cannot set import 'Sce.Atf.Applications.StandardEditCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry")' on part 'Sce.Atf.Applications.StandardEditCommands'.
Element: Sce.Atf.Applications.StandardEditCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry") -->  Sce.Atf.Applications.StandardEditCommands -->  TypeCatalog (Types='Sce.Atf.Applications.SettingsService, Sce.Atf.Applications.StatusService, ...').
System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Sce.Atf.Applications.StandardEditHistoryCommands' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

No exports were found that match the constraint:
ContractName	Sce.Atf.Applications.IContextRegistry
RequiredTypeIdentity	Sce.Atf.Applications.IContextRegistry

Resulting in: Cannot set import 'Sce.Atf.Applications.StandardEditHistoryCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry")' on part 'Sce.Atf.Applications.StandardEditHistoryCommands'.
Element: Sce.Atf.Applications.StandardEditHistoryCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry") -->  Sce.Atf.Applications.StandardEditHistoryCommands -->  TypeCatalog (Types='Sce.Atf.Applications.SettingsService, Sce.Atf.Applications.StatusService, ...').
System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Sce.Atf.Applications.StandardSelectionCommands' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

No exports were found that match the constraint:
ContractName	Sce.Atf.Applications.IContextRegistry
RequiredTypeIdentity	Sce.Atf.Applications.IContextRegistry

Resulting in: Cannot set import 'Sce.Atf.Applications.StandardSelectionCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry")' on part 'Sce.Atf.Applications.StandardSelectionCommands'.
Element: Sce.Atf.Applications.StandardSelectionCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry") -->  Sce.Atf.Applications.StandardSelectionCommands -->  TypeCatalog (Types='Sce.Atf.Applications.SettingsService, Sce.Atf.Applications.StatusService, ...').

I was wondering if there was any resolution to this? Throws on Atf.Core.vs2010/ATF/Framework/ATF.Core/MefUtil.cs line 60.

Hi,
Currently ATF is in maintenance mode, no more work will be done expect major bug fixes.
Thanks
Alan


levy: Add --with-marked flag

Add --with-marked flag in levy tool that exports HTML files with already
marked or checked answers. This is another useful debug output while
creating Evy course materials. Add all necessary wiring to the
question.Model and new golden tests.
In the run-up to the actual change we fixed a couple of minor issues in the
HTML output (value instead of id for checkbox and radio button) and added a
difficulty class to the question form, so we can style questions according to
difficulty at least in debug output.
Also restructure golden files into sub-directories as they were getting a
little busy.

I've pushed camh/learn-with-marked which has a commit on top of your branch showing what I meant above. Feel free to ignore or to fold into your commit if you want.
Also, not sure if you fixed it locally and have not pushed, but the second commit still says "lean" not "learn" as the title prefix.


TypeError: Cannot read properties of undefined (reading 'number')

While trying to debug sudden crashes of faucet, caught this in a minimal repro example. It actually took more that a day of running:
/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70
            onNext(value);
            ^
TypeError: Cannot read properties of undefined (reading 'number')
    at /Users/cornholio/work/parity/papi-repro/node_modules/@polkadot-api/observable-client/src/chainHead/streams/pinned-blocks.ts:200:34
    at /Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/operators/scanInternals.ts:43:15
    at OperatorSubscriber._this._next (/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
    at OperatorSubscriber.Subscriber.next (/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
    at /Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24
    at OperatorSubscriber._this._next (/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
    at OperatorSubscriber.Subscriber.next (/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
    at Object.next (/Users/cornholio/work/parity/papi-repro/node_modules/@polkadot-api/observable-client/src/chainHead/streams/follow.ts:54:33)
    at ConsumerObserver.next (/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/Subscriber.ts:161:25)
    at SafeSubscriber.Subscriber._next (/Users/cornholio/work/parity/papi-repro/node_modules/rxjs/src/internal/Subscriber.ts:119:22)
error Command failed with exit code 1.

But we do see crashes with this error in faucet.
Can we do some kind of error recovery on papi side, so this would show a warning, but wouldn't crash an app?
papi-debug-relay.log
papi-repro.tar.gz

Thanks for opening this issue @mutantcornholio.
This is in fact a dup of #671, meaning that this is an issue with the polkadot-sdk node. We released an enhancer to prevent this from happening on version 1.2.0. So, using the withPolkadotSdkCompat enhancer should prevent this problem from happening.
You can see it clearly in the logs:
1-2024-09-11T21:13:54.228Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"VNVkc68FrHBYlRKo","result":{"event":"bestBlockChanged","bestBlockHash":"0xf368631c19f7d6a91cfbbb856ab4516224febc4f65609284ce0b45a77f8d4cd3"}}}
1-2024-09-11T21:14:00.336Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"VNVkc68FrHBYlRKo","result":{"event":"bestBlockChanged","bestBlockHash":"0x198235944e5242497afec1c5a63d2c844c0f4cca11e4bd4029c2892affa1f4a5"}}}
1-2024-09-11T21:14:00.380Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"VNVkc68FrHBYlRKo","result":{"event":"finalized","finalizedBlockHashes":["0x48d1f8783d8718678ca98a81c2d6d909d217a676f387733342aceaa20848a21b"],"prunedBlockHashes":[]}}}
1-2024-09-11T21:14:00.380Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"VNVkc68FrHBYlRKo","result":{"event":"newBlock","blockHash":"0x198235944e5242497afec1c5a63d2c844c0f4cca11e4bd4029c2892affa1f4a5","parentBlockHash":"0xf368631c19f7d6a91cfbbb856ab4516224febc4f65609284ce0b45a77f8d4cd3","newRuntime":null}}}

the bestBlockChanged for block 0x198235944e5242497afec1c5a63d2c844c0f4cca11e4bd4029c2892affa1f4a5 is emitted before the block has been announced.

Can we do some kind of error recovery on papi side, so this would show a warning, but wouldn't crash an app?

it's pretty difficult, but I will put some thought into this.


Tab completion not working

EmPyre Version
OS Information (Linux flavor, Python version)
Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.
Screenshot of error, embedded text output, or Pastebin link to the error
Any additional information

Empire Version
2.0_beta
OS Information (Linux flavor, Python version)
OSX
Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.
Pretty straightforward: tab completion doesn't work when using empire on OSX. It's not a showstopper but it does prevent being as nimble as one could be when using the tool on OSX.

Tab completion also not working for me.

I think tab completion not working on Mac is a known issue at this point, its been that way since I started using Empire last year.

What's odd is that there is a youtube video of a mac user using Empyre and
tab completion works fine for him.
Is there a list of the commands (mostly the modules) so we know what we can
use?
On Wed, Apr 26, 2017 at 12:57 AM, Jeremy<EMAIL_ADDRESS>wrote:

I think tab completion not working on Mac is a known issue at this point,
its been that way since I started using Empire last year.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/EmpireProject/EmPyre/issues/46#issuecomment-297238089,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMjnae1WB0TVt8uMm2Ge02MTarPGr6lGks5rzs6zgaJpZM4MwX-W
.

--
Thanks,
Chris Barretto

Yes, this is particularly frustrating, as there is no fix for this after quite a while

I think most of the dev work is going on in 2.0_beta branch on the main EmpireProject/Empire git. I've thought about looking into this myself, but don't really use OS X as an attack platform. My C2 servers are Debian/Ubuntu and my on-site platform is Kali (Debian). I think this is probably similar for a lot of people which is why tab-completion isn't getting much love interest on Mac ¯_(ツ)_/¯

Woe is us :/
On Wed, Apr 26, 2017 at 12:45 PM, Jeremy<EMAIL_ADDRESS>wrote:

I think most of the dev work is going on in 2.0_beta branch on the main
EmpireProject/Empire git. I've thought about looking into this myself, but
don't really use OS X as an attack platform. My C2 servers are
Debian/Ubuntu and my on-site platform is Kali (Debian). I think this is
probably similar for a lot of people which is why tab-completion isn't
getting much love interest on Mac ¯_(ツ)_/¯
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/EmpireProject/EmPyre/issues/46#issuecomment-297471582,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMjnabTgp_bXLyeUFir5o9tr0wfla3u2ks5rz3SsgaJpZM4MwX-W
.

--
Thanks,
Chris Barretto

But i've tried this on kali, and i don't think it works either? Though im not so sure. Yes, I don't see much updates on empyre lately. Sad.


Git file remove sections instead of unset

--unset http.proxy and --unset https.proxy  leaves blanks http and https sections , next time will create again this sections.
by --remove-section http or --remove-section https will completely remove seccions leaving .gitconfig file clean for next "proxyman load"

Thanks @miguelruizquantion
On my machine (git 2.21), current --unset-proxy removes the section if it is left blank after removing proxy. This should propagate soon in other distros with the appropriate version of git.
Also, checking out at git documentation, I found lot more options for http/https other than proxy. I am not sure if people actually use them, but still --remove-section would remove values one may not want to be removed.
Thoughts?

You make a really good point , and as stated in https://stackoverflow.com/questions/15935624/how-do-i-avoid-empty-sections-when-removing-a-setting-from-git-config  the bug is fixed and your option is correct.
Thanks for the good job.


Add .satisfies(predicate, *args), and tests

Oops, I didn't test make test3

Looks good so far, but why do you take/pass through *args but no **kwargs?

That case didn't seem as useful, but I guess there's no harm in adding it.

Thanks, this looks good so far.


Added .vs folder to list of ignored entities.

Added the .vs folder (new in 2015) to the list of ignored entities.

Looks good. Thanks!

Thank You guys! I'm using this


type-at-pos of utility types ($Keys, e.t.c) always is (unknown)

// @flow
const obj /* : $Shape<{a: number, b: number}> */ = {a: 1};

flow type-at-pos example.js 2 7
(unknown)

Hard to debug types, when using utility types

Small update: as of Flow v0.53.1, this now gives the output "object type", which is slightly better and consistent with what type errors related to this show.

This issue has been fixed a while ago.


With email in outbox: Failed to send some messages. Negative SMTP reply 501 5.1.3 Bad recipient address syntax

Failed to send some messages with K9 - Thunderbird/Outlook works fine.
Negative SMTP reply 501 5.1.3 Bad recipient address syntax
k9-Mail version: 5.008
Device make: samsung
Device model: SM-T520
Android version: 5.1.1
com.fsck.k9.mail.MessagingException: Unable to send message
at com.fsck.k9.mail.transport.SmtpTransport.sendMessageTo(SmtpTransport.java:539)
at com.fsck.k9.mail.transport.SmtpTransport.sendMessage(SmtpTransport.java:495)
at com.fsck.k9.controller.MessagingController.sendPendingMessagesSynchronous(MessagingController.java:3563)
at com.fsck.k9.controller.MessagingController$20.run(MessagingController.java:3314)
at com.fsck.k9.controller.MessagingController.run(MessagingController.java:435)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.fsck.k9.mail.transport.SmtpTransport$NegativeSmtpReplyException: Negative SMTP reply: 501 5.1.3 Bad recipient address syntax
at com.fsck.k9.mail.transport.SmtpTransport.checkLine(SmtpTransport.java:649)
at com.fsck.k9.mail.transport.SmtpTransport.executeSimpleCommand(SmtpTransport.java:690)
at com.fsck.k9.mail.transport.SmtpTransport.executeSimpleCommand(SmtpTransport.java:654)
at com.fsck.k9.mail.transport.SmtpTransport.sendMessageTo(SmtpTransport.java:524)
... 5 more
I think there's is a problem with german mutated vowel (äöü..) in Email-adress.
Other recipient without mutated vowel work fine.
Also ISP reply that:
"Guten Tag Herr xxx,
leider liegt die Ursache hier doch an K-9. Die eigentliche Ursache ist der Umlaut in der Domain. E-Mailprogramme haben hier Schwierigkeiten, diesen richtig zu interpretieren."
"Good day Mr. xxx,
Unfortunately, the cause lies here but at K. 9 The root cause is the umlaut in the domain. Email programs have difficulty interpreting this right here. "

We probably need to implement RFC 6530, RFC 6531, RFC 6532, RFC 6533 possibly including RFC 2047:
From RFC 6530:

If the extension is not supported by the first-hop system
(i.e., the SMTP server accessed by the submission server acting as an
SMTP client), message-originating systems SHOULD be prepared to
either send conventional envelopes and message headers or to return
the message to the originating user so the message may be manually
downgraded to the traditional form, possibly using encoded words
[RFC2047] in the message headers.

A smaller piece of work we we want to do is to make it because the server isn't advertising the SMTPUTF8 extension rather than trying to send it and then seeing it fail. That doesn't fix the root problem of being unable to send it - but does handle the scenario better.

Related: #1362

Related #1363

(This is not actually fixed yet, the PR just improved error handling)

Expected behavior
Email should be sent.
Actual behavior
Email is not sent and not saved in Outbox, it disappears. Error message pops up: Negative SMTP reply: 555 5.5.2 Syntax error. This happens with one particular recipient address repeatedly.
Steps to reproduce

Compose new email
Enter recipient name, select from contact list
Enter subject and body text
Send . Email is not sent and not saved in Outbox.

Environment

K9-Mail version: 5.207
Device make: Huawei
Device model: Nexus 6P
Android version: 7.1.2, Coppehead OS
Account type: Google Apps for Business, both sender and recipient
Protocol: IMAP
Recipient address in<EMAIL_ADDRESS>
Error
com.fsck.k9.mail.transport.SmtpTransport$NegativeSmtpReplyException: Negative SMTP reply: 555 5.5.2
Syntax error. h21sm1818588pgn.18 - gsmtp
at com.fsck.k9.mail.transport.SmtpTransport.checkLine(SmtpTransport.java:639)
at com.fsck.k9.mail.transport.SmtpTransport.executeSimpleCommand(SmtpTransport.java:680)
at com.fsck.k9.mail.transport.SmtpTransport.executeSimpleCommand(SmtpTransport.java:644)
at com.fsck.k9.mail.transport.SmtpTransport.sendMessageTo(SmtpTransport.java:523)
at com.fsck.k9.mail.transport.SmtpTransport.sendMessage(SmtpTransport.java:496)
at com.fsck.k9.controller.MessagingController.sendPendingMessagesSynchronous(MessagingController.java:3014)
at com.fsck.k9.controller.MessagingController.access$1700(MessagingController.java:115)
at com.fsck.k9.controller.MessagingController$21.run(MessagingController.java:2895)
at com.fsck.k9.controller.MessagingController.runInBackground(MessagingController.java:204)
at com.fsck.k9.controller.MessagingController.access$000(MessagingController.java:115)
at com.fsck.k9.controller.MessagingController$1.run(MessagingController.java:173)
at java.lang.Thread.run(Thread.java:761)
I wonder whether the error has anything to do with the recipient address syntax<EMAIL_ADDRESS>

5.5.2 is a different error code - "Undelivered: SMTP sequence error" ( #2339 makes this more obvious by adding support for decoding the error codes). I don't think this is the same issue.

Also getting 5.5.2 error for 1 address in my contacts.  Format of address is<EMAIL_ADDRESS>Using K-9 V5.206 on a Samung, Android 6, tablet.  Address causes no problems if sent using browser webmail from same device or if sent from Windows / Thunderbird.
Screenshot of error is attached as .jpg

Duplicate of #2633


terraform: set ldflags

Motivation for this change
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Do we not strip debug symbols anyway or are those flags doing something else?

They aren't quite the same as the nix strip but I don't remember the details.
❯ du -h result/bin/terraform
63M	result/bin/terraform

❯ du -h result/bin/terraform
57M	result/bin/terraform

From the doc itself:
-s
	Omit the symbol table and debug information.

-w
	Omit the DWARF symbol table.

So I guess it's ok


Include missing deps in venv

Should fix pool build, which is currently failing

No they're not managed by anything -- it's manual. I would like to refactor the deployment actions and move them out of this repo, so we don't have a mixed python and R codebase.


Bump to Python 3.10

It's been out for a while and 3.11 is on the horizon. I suspect most packages are now available on conda-forge
https://peps.python.org/pep-0602/

Correct, beam does not yet support python 3.10

This is the first github repository i've seen with 'issues' disabled !

That's how most apache-incubated projects do it. Their issue trackers are in Jira: https://issues.apache.org/jira/projects/BEAM

looks like github is now being used and we're waiting on https://github.com/apache/beam/pull/17700
would be nice to update as 3.11 is right around the corner (https://peps.python.org/pep-0664/)


Generic geo restriction bypass mechanism based on faking X-Forwarded-For

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

[x] New feature

tl;dr
This PR introduces a generic geo restriction bypass mechanism based on faking X-Forwarded-For HTTP header. For example, see youtube-dl http://www.ondemandkorea.com/lets-eat-dinner-together-e16.html.
Abstract
Some sites trust X-Forwarded-For HTTP header in order to figure out the origin of the client behind proxy. In such cases they may not impose geo restriction on you if IP passed in X-Forwarded-For is not  geo restricted even though your original IP is geo restricted. This allows bypassing geo restriction by faking this header's value to IP that belongs to some unrestricted country.
Changes

This PR adopts changes made in #10945 that introduce a base YoutubeDLError class for all the youtube-dl exceptions.
GeoRestrictedError is introduced to be able to distinguish when video is geo restricted.
New --bypass-geo option (or bypass_geo_restriction for python API) (on by default) that enables geo restriction bypassing mechanism. Symmetrically, there is a --no-bypass-geo for disabling the mechanism.
New --bypass-geo-as-country option (or bypass_geo_restriction_as_country for python API) that forces geo restriction bypass on behalf of some particular country.
Some extractors are fixed to throw GeoRestrictedError (dramafever, go, itv, nrk, ondemandkorea, pbs, svt, vbox7, srgssr, vgtv, viki). Some of them (dramafever, go, itv, nrk, ondemandkorea, pbs, svt, vbox7) now support bypassing geo restriction with this mechanism.

Description
This PR is PoC implementation of geo restriction bypass mechanism based on faking X-Forwarded-For HTTP header. You may have already seen an ad-hoc implementation for NRK that is now generalized.
The principle is fairly straightforward. When GeoRestrictedError is thrown by extractor and this exception has a list of countries known to be geo unrestricted and some other conditions met, extraction tries to fake IP for a random unrestricted country and retries extraction one more time.
Fake IP is generated based on a map of major IPv4 address blocks per country (that contains the biggest block in terms of IP address count per country) and it's simply takes a random IP from the block.
It's also possible to force bypass mechanism to pretend to explicit country. In this case HTTP requests are made with faked X-Forwarded-For right away without waiting for GeoRestrictedError. This may be helpful in case of extractors not yet throwing GeoRestrictedError or generic extractor.
Example
Before this PR:
> youtube-dl http://www.ondemandkorea.com/lets-eat-dinner-together-e16.html
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading webpage
ERROR: This content is not available in your region. You might want to use --proxy to workaround.

After this PR:
> youtube-dl http://www.ondemandkorea.com/lets-eat-dinner-together-e16.html
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading webpage
WARNING: [OnDemandKorea] Video is geo restricted. Retrying extraction with fake <IP_ADDRESS> IP as X-Forwarded-For.
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading webpage
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 603
[download] Destination: Let's Eat Dinner Together  - E16-lets-eat-dinner-together-e16.mp4
[download]   0.4% of ~2.82GiB at 1011.90KiB/s ETA 03:23
ERROR: Interrupted by user

Or using explicit bypass with --bypass-geo-as-country right away:
> youtube-dl --bypass-geo-as-country CA http://www.ondemandkorea.com/lets-eat-dinner-together-e16.html
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading webpage
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 603
[download] Destination: Let's Eat Dinner Together  - E16-lets-eat-dinner-together-e16.mp4
[download]   0.5% of ~2.82GiB at 10.99MiB/s ETA 01:15
ERROR: Interrupted by user

--no-bypass-geo results in the old behavior:
> youtube-dl --no-bypass-geo http://www.ondemandkorea.com/lets-eat-dinner-together-e16.html
[OnDemandKorea] lets-eat-dinner-together-e16: Downloading webpage
ERROR: This content is not available in your region
This video is available in United States, Canada.
You might want to use a VPN or a proxy server (with --proxy) to workaround.

Example URLs
Here are some example URLs that may be geo bypassed using this mechanism. That's not a complete list but only extractors I've encountered with lately. I didn't look through all the extractors thus I expected more such extractors:

http://www.ondemandkorea.com/lets-eat-dinner-together-e16.html
http://freeform.go.com/shows/shadowhunters/episodes/season-2/1-this-guilty-blood
http://www.itv.com/hub/mr-bean-animated-series/2a2936a0069
https://www.dramafever.com/zh-cn/drama/4972/15/Doctor_Romantic/
http://vbox7.com/play:249bb972c2
https://www.oppetarkiv.se/video/1196142/natten-ar-dagens-mor
http://www.pbs.org/video/2365946487/
https://tv.nrk.no/serie/tour-de-ski/MSPO40010515/06-01-2015

Conclusion
I've not test it much yet, it's still a PoC yet. What I'd like to hear are the overall opinions on topic and in particular on these points:

Whether this should be enabled by default?
X-Forwarded-For is a header that is usually sent by a proxy so there may be some unlikely hypothetical consequences due to treating you as a proxy by a site.
There may be introduced a mechanism to fake IP right away for extractors that are known to be completely geo resticted (same way --bypass-geo-as-country works). So this saves one extraction round. Does it worth it?
Does it worth to have _BYPASS_GEO flag (currently allows to disable geo bypass mechanism when some extractor is known not to trust to X-Forwarded-For)?

i think that an option to specify a country that should not be handled by this mechanism will be helpful(if someone from USA, than there is no need to try to fake ip for USA web sites).

There may be introduced a mechanism to fake IP right away for extractors that are known to be completely geo resticted (same way --bypass-geo-as-country works). So this saves one extraction round. Does it worth it?

this can be done simply by combining this mechanism and geo verification header(if the user didn't specify a proxy than try to fake the ip).
in general this PR will make the process of bypassing georestriction a lot easier(i have to maintain a list of proxies and keep choosing the right proxy for every site that i'm using).

i think that an option to specify a country that should not be handled by this mechanism will be helpful(if someone from USA, than there is no need to try to fake ip for USA web sites).

Not quite get it. If one is from USA he won't get any GeoRestrictedError, so there will be no need to fake IP and use this mechanism at all. Or are you suggesting this regarding to [2]?

There may be introduced a mechanism to fake IP right away for extractors that are known to be completely geo resticted (same way --bypass-geo-as-country works). So this saves one extraction round. Does it worth it?

this can be done simply by combining this mechanism and geo verification header(if the user didn't specify a proxy than try to fake the ip).

Not quite get it again. The point is if you know that extractor A is completely (any video) geo restricted to US you can send faked US IP in X-Forwarded-For header right away without waiting for the first round of extraction (without faked header) to fail with GeoRestrictedError. Not sure how geo_verification_headers is related here. These two mechanisms are little bit different. Faking HTTP header is much cheaper than connecting via proxy, does not require any knowledge (proxy address) and will always work (of course if X-Forwarded-For is respected by a site).

Not quite get it. If one is from USA he won't get any GeoRestrictedError, so there will be no need to fake IP and use this mechanism at all. Or are you suggesting this regarding to [2]?

it's about the case the mecanism will be applied for known geo-restricted requests.

The point is if you know that extractor A is completely (any video) geo restricted to US you can send faked US IP in X-Forwarded-For header right away without waiting for the first round of extraction (without faked header) to fail with GeoRestrictedError.

i think that the number of sites that apply geo-restriction on all requests is less than the number of sites that apply it at some of the requests, so to make it general we can mark the requests that require to be bypassed directly without waiting to fail instead of the marking the extractor.

Not sure how geo_verification_headers is related here.

they are both a way to bypass geo-restriction and the places that we are using geo_verification_headers are possibly a places that X-Forwarded-For might work as well.
in the example of ondemandkorea the first request is the place where the geo-restricted applied and it can be bypassed either by using a geo_verification_proxy(when it's added) or by X-Forwarded-For header, in these request we can set it to bypassed it will try a geo_verification_proxy if provided or fallback to X-Forwarded-For.

to make what i said before more clear this a patch to apply a single pass for itv(it's the minimal and it does not make checks for the new options).
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index b0aa781fa..b5a5f43d1 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -2217,11 +2217,14 @@ class InfoExtractor(object):
     def _mark_watched(self, *args, **kwargs):
         raise NotImplementedError('This method must be implemented by subclasses')

-    def geo_verification_headers(self):
+    def geo_verification_headers(self, countries=None):
         headers = {}
         geo_verification_proxy = self._downloader.params.get('geo_verification_proxy')
         if geo_verification_proxy:
             headers['Ytdl-request-proxy'] = geo_verification_proxy
+        elif countries:
+            if not self._x_forwarded_for_ip:
+                self._x_forwarded_for_ip = GeoUtils.random_ipv4(random.choice(countries))
         return headers

     def _generic_id(self, url):
diff --git a/youtube_dl/extractor/itv.py b/youtube_dl/extractor/itv.py
index aabde15f3..70fbc7a90 100644
--- a/youtube_dl/extractor/itv.py
+++ b/youtube_dl/extractor/itv.py
@@ -88,7 +88,7 @@ class ITVIE(InfoExtractor):
         player_info = _add_sub_element(get_playlist, 'tem:playerInfo')
         _add_sub_element(player_info, 'itv:Version').text = '2'

-        headers = self.geo_verification_headers()
+        headers = self.geo_verification_headers(['GB'])
         headers.update({
             'Content-Type': 'text/xml; charset=utf-8',
             'SOAPAction': 'http://tempuri.org/PlaylistService/GetPlaylist',
@@ -125,7 +125,7 @@ class ITVIE(InfoExtractor):
         ios_playlist_url = params.get('data-video-playlist')
         hmac = params.get('data-video-hmac')
         if ios_playlist_url and hmac:
-            headers = self.geo_verification_headers()
+            headers = self.geo_verification_headers(['GB'])
             headers.update({
                 'Accept': 'application/vnd.itv.vod.playlist.v2+json',
                 'Content-Type': 'application/json',

without any change(repeat the first two requests twice):
python __main__.py -F http://www.itv.com/hub/emmerdale/1a8694a7740
[ITV] 1a8694a7740: Downloading webpage
[ITV] 1a8694a7740: Downloading XML
WARNING: [ITV] Video is geo restricted. Retrying extraction with fake <IP_ADDRESS> IP as X-Forwarded-For.
[ITV] 1a8694a7740: Downloading webpage
[ITV] 1a8694a7740: Downloading XML
[ITV] 1a8694a7740: Downloading JSON metadata
[ITV] 1a8694a7740: Downloading m3u8 information
WARNING: ar subtitles not available for 1a8694a7740
[info] Available formats for 1a8694a7740:
format code  extension  resolution note
hls-meta     mp4        multiple   Quality selection URL
hls-136      mp4        audio only  136k , mp4a.40.2@128k
hls-audio    mp4        512x288     307k , avc1.4D401E@ 161k, 25.0fps, mp4a.40.2@128k
hls-582      mp4        512x288     582k , avc1.4D401F@ 420k, 25.0fps, mp4a.40.2@128k
rtmp-600     flv        unknown     600k
hls-771      mp4        512x288     771k , avc1.4D401F@ 598k, 25.0fps, mp4a.40.2@128k
rtmp-800     flv        unknown     800k
hls-1040     mp4        896x504    1040k , avc1.4D401F@ 852k, 25.0fps, mp4a.40.2@128k
rtmp-1200    flv        unknown    1200k
rtmp-1500    flv        unknown    1500k
hls-1607     mp4        896x504    1607k , avc1.4D401F@1387k, 25.0fps, mp4a.40.2@128k
rtmp-1800    flv        unknown    1800k  (best)

with the change:
python __main__.py -F http://www.itv.com/hub/emmerdale/1a8694a7740
[ITV] 1a8694a7740: Downloading webpage
[ITV] 1a8694a7740: Downloading XML
[ITV] 1a8694a7740: Downloading JSON metadata
[ITV] 1a8694a7740: Downloading m3u8 information
WARNING: ar subtitles not available for 1a8694a7740
[info] Available formats for 1a8694a7740:
format code  extension  resolution note
hls-meta     mp4        multiple   Quality selection URL
hls-136      mp4        audio only  136k , mp4a.40.2@128k
hls-audio    mp4        512x288     307k , avc1.4D401E@ 161k, 25.0fps, mp4a.40.2@128k
hls-582      mp4        512x288     582k , avc1.4D401F@ 420k, 25.0fps, mp4a.40.2@128k
rtmp-600     flv        unknown     600k
hls-771      mp4        512x288     771k , avc1.4D401F@ 598k, 25.0fps, mp4a.40.2@128k
rtmp-800     flv        unknown     800k
hls-1040     mp4        896x504    1040k , avc1.4D401F@ 852k, 25.0fps, mp4a.40.2@128k
rtmp-1200    flv        unknown    1200k
rtmp-1500    flv        unknown    1500k
hls-1607     mp4        896x504    1607k , avc1.4D401F@1387k, 25.0fps, mp4a.40.2@128k
rtmp-1800    flv        unknown    1800k  (best)

so the idea is to enable both options and let the user to choose what he prefer, and for us we will have to mark the requests that need to apply geo-restriction bypass.

I've been looking for a way to add my own HTTP headers to do just this. Is it possible already to add a custom header (i.e. X-Forwarded-For) or do i need to wait for this patch to be merged?

@hakanw --add-header.

@dstftw exactly, I need that, but from code! I'm using youtube-dl via Python like so:
		with youtube_dl.YoutubeDL({
		        'postprocessors': [{
		                'key': 'FFmpegExtractAudio',
		                'preferredcodec': 'wav'
		        }],
		        ''
		        'verbose':True,
		        'noplaylist': True,
		}) as yt:
			yt.download([my_url])

Is it possible to pass custom headers through this interface?

Add to utils.std_headers.

@remitamine with this patch you still apply X-Forwarded-For to all requests that follow the first geo_verification_headers call. Did you mean something like:
def geo_verification_headers(self, countries=None):
    headers = {}
    geo_verification_proxy = self._downloader.params.get('geo_verification_proxy')
    if geo_verification_proxy:
        headers['Ytdl-request-proxy'] = geo_verification_proxy
    elif countries:
        if not self._x_forwarded_for_ip_2:
            self._x_forwarded_for_ip_2 = GeoUtils.random_ipv4(random.choice(countries))
        headers['X-Forwarded-For'] = self._x_forwarded_for_ip_2
    return headers

Did you mean something like:

with this i think that it will try X-Forwarded-For requests again in case that X-Forwarded-For didn't work(GeoRestrictedError).
the patch is the smallest change to explain what i meant by combining geo_verification_headers with X-Forwarded-For mecanism, it's not complet(it's doesn't respect the new options).

i'm trying to use this mechanism in case when the headers are needed after delegating the extraction to another extractor.
i made it work for telequebec.tv using this code.
diff --git a/youtube_dl/extractor/limelight.py b/youtube_dl/extractor/limelight.py
index a3712665b..a7ffa5c91 100644
--- a/youtube_dl/extractor/limelight.py
+++ b/youtube_dl/extractor/limelight.py
@@ -213,6 +213,8 @@ class LimelightMediaIE(LimelightBaseIE):
     def _real_extract(self, url):
         url, smuggled_data = unsmuggle_url(url, {})
         video_id = self._match_id(url)
+        self._GEO_COUNTRIES = smuggled_data.get('geo_countries', [])
+        self._InfoExtractor__initialize_geo_bypass()

         pc, mobile, metadata = self._extract(
             video_id, 'getPlaylistByMediaId',
diff --git a/youtube_dl/extractor/telequebec.py b/youtube_dl/extractor/telequebec.py
index 4043fcb92..82d73c31d 100644
--- a/youtube_dl/extractor/telequebec.py
+++ b/youtube_dl/extractor/telequebec.py
@@ -2,7 +2,10 @@
 from __future__ import unicode_literals

 from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import (
+    int_or_none,
+    smuggle_url,
+)

 class TeleQuebecIE(InfoExtractor):
@@ -28,7 +31,7 @@ class TeleQuebecIE(InfoExtractor):
         return {
             '_type': 'url_transparent',
             'id': media_id,
-            'url': 'limelight:media:' + media_data['streamInfo']['sourceId'],
+            'url': smuggle_url('limelight:media:' + media_data['streamInfo']['sourceId'], {'geo_countries': ['CA']}),
             'title': media_data['title'],
             'description': media_data.get('descriptions', [{'text': None}])[0].get('text'),
             'duration': int_or_none(media_data.get('durationInMilliseconds'), 1000),

is there a less hacky way to to achieve the same thing(i'm thinking about renaming __initialize_geo_bypass)?

Since e39b5d4ab83de7a466c6d4c9528d385758566b22 _initialize_geo_bypass is allowed to be explicitly called from extractor code.