text:
Unclear documentation/behavior regarding the use of context

When I proposed PR #576, I had some uncertainty about how Preact handles context. Currently, the TypeScript declarations do provide for context?: any in a few locations, so I just followed that convention. That said, it looks like Preact does not(?) support -- or at least make use of -- contextTypes. I searched the documentation and the source to learn more about this, and so far have two issues (that I'll file here as one issue):

I couldn't find anything in the documentation about whether Preact actually does make use of contextTypes. I'm assuming that it doesn't, since it doesn't make use of propTypes. My impression from the source is also that it does not. I think this should probably be documented somewhere (I'm happy to PR it; just want to check that I'm right and that I didn't actually miss some documentation, first).

Also, from looking at the source, it looks like Preact's behavior with respect to context may not be exactly the same as React's. Is this intended? As I understand it, in React, if a component does not define some context on contextTypes, then the component does not receive that context (see here, for example: https://github.com/facebook/react/blob/e452e3374135c116ef687a8bb3a5d277e3cde8fb/src/isomorphic/classic/tests/ReactContextValidator-test.js#L40). But if Preact doesn't use contextTypes at all, then it presumably doesn't have this behavior. Is that right, and is it intended? This might create some subtle issues with migrations from React to Preact, especially if (as in point 1 above) it isn't documented anywhere, so I wanted to check.

Mostly, I'm looking for clarification on these things and seeing whether it would be helpful for me to try to PR some docs and/or some changes to the treatment of context. Thanks!

Both absolutely correct!  The decision to automatically pass context down rather than relying on contextTypes comes from the size constraints placed on Preact.  Since context is an undocumented/hidden (less-documented) API in React, the change has never caused much trouble that I'm aware of.
Definitely lacking in the documentation, though part of that comes from the docs needing to walk a fine line between catering to React devs (who would understand contextTypes) and web devs approach Preact without having written React (who would be fine knowing "context is automatically passed down").  However we can document this such that is explains things to both groups of people would be awesome.  Definitely open to PRs for docs, you seem to be a very good writer!
That said, having preact-compat inject context mutation that does mirror the subscription behavior of React is an issue I've had on the backburner for a while now. I don't think there's a Github issue set up for it, so we might want to open one in preact-compat.  That seems like the type of thing people would submit a PR for (preact-compat is mostly community maintained at this point, which is awesome).

Cool, and thanks for the quick response! That all sounds good. I'll try to take a look at the docs as time permits.

Hi guys, I'm interested in getting started as a contributor and would love to take a shot at this.

@paulsevere I'd say go for it! The "help wanted" label is attached, and I'm not expecting that I will have a lot of time to do this myself any time soon (despite reporting the issue).

We added a section about context starting with Preact X in our docs: https://preactjs.com/guide/v10/context

authors: developit jmrog marvinhagemeister paulsevere

repo: developit/preact


text:
debug: Allow ref to be an object (fixes #1271)

This fixes the issue where preact/debug throws an error when using createRef() (#1271)

/cc @marvinhagemeister @andrewiggins - looks like X already had this fix!

Coverage remained the same at 100.0% when pulling c308a805ccfa2e95d1f07e10a75c4aafc4496f48 on fix-debug-createref into 346c0207896f755ca88873ba8d2e0e65780aa585 on master.

source: gharchive/pull-request

authors: coveralls developit

license: mit

license_type: permissive

license_source: bigquery


text:
Helm - Add support for serviceAccountName

Hey
Small PR to add support for setting a serviceAccountName in the helm chart

🙏 thanks @AndreaGiardini

authors: AndreaGiardini vincentsarago

repo: developmentseed/titiler

license: MIT

license_source: github-api


text:
Select - use slots instead of array

Description
After deciding to use slots in #354 , we need to adjust the select component, so it also uses slots instead of an array.
Ideally we can just add  tags, into the slots, just like in the html select.

Acceptance Criteria

[x] The Select component uses slots instead of an array
[x] Props documentation has been updated in Storybook and in Props Excel (on the All Props page and on the Components page) > ask @angelicahoyss or @thrbnhrtmnn for support here

Background information

...

PR was merged

source: gharchive/issue


text:
Docker Image

https://hub.docker.com/r/devenney/reverie/
Note that this lacks a development docker-compose.yml. An elegant solution will take time as code changes are required to support HTTP~S~ in development.
Entrypoint is incomplete (#44).

Coverage remained the same at 100.0% when pulling d65fd55bdc2b961b53acc643c745d85bb350b926 on feature/docker into 53836b5013267c1607322976e770fb9c3c2079bd on master.

authors: coveralls devenney

repo: devenney/reverie


text:
Move to react-native-community

What do u think of moving this package to react-native-community ?
I think it is used by a lot of people, and there we could have more people contributing.

Some people suggested the same in https://github.com/devfd/react-native-google-signin/issues/324.

authors: AndreiCalazans jozan

repo: devfd/react-native-google-signin


text:
Update readme

Explains the version of the package that is necessary for different react-native versions

Please merge this

Thanks!

authors: Kerumen dannyharding10 guilhermedecampo


text:
Fix redundancy of "additional resources"

Throughout all our documentation, we have "additional resources." For our authoring stacks, we simply link to other devfile docs. For our migration guide, we simply link to GitHub issues.
I don't think either of these approaches offer much value to our users. I suggest we do one of two things:

Eliminate the "additional resources" from our docs for the time being until we have more beneficial resources to direct our users to view.
Create new resources to direct our users from the "additional resources" section.

The second option will obviously take longer to pursue and complete.
Jira Issue: https://issues.redhat.com/browse/RHDEVDOCS-2890

closing as rotten (created > 2 years). Feel free to re-open if it's not a requirement.

authors: jc-berger thepetk

repo: devfile/api


text:
Investigate support for rolling workspace deployments

Description
Currently, the devworkspace operator runs workspaces in deployments with a recreate strategy. This is required because rolling deployments can hang if they mount a RWO volume, but it also means that most modifications to a devworkspace result in a short time where the workspace is offline.
We should look into ways to configure whether rolling deployments should be used, and potentially enable rolling deployments automatically (if e.g. a workspace doesn't mount any PVCs or something like async storage is used).

Closing this as it seems to be a duplicate of https://github.com/devfile/devworkspace-operator/issues/1045 which was resolved in https://github.com/devfile/devworkspace-operator/pull/1057

authors: AObuchow amisevsk

repo: devfile/devworkspace-operator


text:
import useState, useEffect etc... from react in the beginning only

Fix #68

Please resolve conflicts

@prateek3255 Resolved please Check it once more.

repo: devfolioco/react-copy-mailto


text:
Is this a typo?

api-sample.py contains this:
def init_with_tls1(self, *args, **kwargs):
    kwargs['ssl_version'] = ssl.PROTOCOL_TLSv1
    old_init(self, *args, **kwargs)
ssl.SSLSocket.__init__ = init_with_tls1

Is that last line missing an indent. Sure seems to make sense.

If it is correct, then a blank line would clarify that.


text:
Add Quarkus template

Closes https://github.com/devonfw-forge/devonfw-microservices/issues/11

Move to https://github.com/devonfw/devon4j/pull/429


text:
#elif directive is subject to expression evaluations too

ex. this is valid
#if defined(M)
 test;
#elif 1
std::cout << "test " << std::endl;
#endif

interesting, its possible that system dependent bc on my machine it blew up

repo: devosoft/Pepper


text:
Update 토킹 포테이토.md

각 챌린지 미션을 완료 할때 마다 각자 자신의 항목을 수정하는 PR을 생성해 주세요.

챌린저 정보
챌린저의 정보를 아래에 남겨주세요.

팀 이름: 토킹 포테이토

Microsoft Learn 프로필 URL은 https://docs.microsoft.com/ko-kr/users/******와 같이 생겼습니다.

Microsoft Learn 프로필 URL: https://docs.microsoft.com/ko-kr/users/91354922/
GitHub ID: @seoyoung0121

아래는 SNS 챌린지의 경우에만 입력해 주세요.

다양한 SNS가 있지만, 여기서는 트위터, 페이스북, 인스타그램만 인정합니다.

SNS 이름:
SNS ID:

완료된 챌린지

이번에 완료된 챌린지의 내용을 마킹해주세요.

[ ] 애저 정적 웹 앱 챌린지 완료
[ ] 깃헙 액션 챌린지 완료
[ ] 소셜미디어 인증샷 챌린지 완료
[ ] 애저 정적 웹 앱 URL 제출 챌린지 완료
[ ] 애저 정적 웹 앱 리포지토리 제출 챌린지 완료
[o] 블로그 후기 URL 제출 챌린지 완료

@seoyoung0121 올려주신 블로그글 확인했습니다!! 팀원분들이랑 직접 모이셔서 밤샘 코딩하셨다니...너무 멋져요!! 👩🏼💻 👍🏼  챌린지 완료 감사합니다!

/retrosignoff

repo: devrel-kr/HackaLearn


text:
Fix React 18 FunctionalComponent bug

What's been changed

Wrapped WizardProps in Wizard.tsx with React.PropsWithChildren

Why is this needed?
One recent change in React 18 has been an update to the FunctionComponent or FC types as they have now had the optional children property removed (Source).

Thanks! I bumped against the same issue in another project

https://github.com/devrnt/react-use-wizard/releases/tag/v2.1.3

v2.1.3

authors: NuroDev devrnt

repo: devrnt/react-use-wizard


text:
Images.buildKit.Args get ignored while using localRegistry

What happened?
I want to add specific buildKit options (--secret ...) to the image build process, but also deploy to the local registry.
However, enabling the localRegistry weirdly overwrites the complete buildKit stanza in the devspace.yaml and no args are being applied.
What did you expect to happen instead?
That devspace applies images.[imagename].buildKit.args even when enabling localRegistry.
How can we reproduce the bug? (as minimally and precisely as possible)
Create the following three files in a new folder:
Dockerfile
FROM ubuntu

RUN --mount=type=secret,id=mysecret,dst=/secretfile cat /secretfile

secretfile
THIS IS A SECRET

devspace.yaml
version: v2beta1
name: test

vars:
  IMAGE: testimage
  DOCKERFILE: "./Dockerfile"

images:
  testimage:
    image: ${IMAGE}
    dockerfile: "${DOCKERFILE}"
    rebuildStrategy: ignoreContextChanges
    buildKit:
      args:
        - "--progress=plain"
        - "--secret"
        - "id=mysecret,src=./secretfile"

deployments: {}
dev: {}
localRegistry:
  enabled: true

Output on devspace build:
❯ devspace build --debug
12:01:38 info Using namespace 'default'
12:01:38 info Using kube context 'testcluster'
12:01:38 debug Use config:
version: v2beta1
name: test
images:
    testimage:
        name: testimage
        image: testimage
        dockerfile: ./Dockerfile
        rebuildStrategy: ignoreContextChanges
        buildKit:
            args:
                - --progress=plain
                - --no-cache
                - --secret
                - id=mysecret,src=./secretfile
localRegistry:
    enabled: true

12:01:38 debug Run pipeline:
name: build
run: |-
    run_dependencies --all --pipeline build
    build_images --all

12:01:38 run_dependencies --all --pipeline build
12:01:38 Marked project excluded: test
12:01:38 build_images --all
12:01:38 Ensuring image pull secret for registry: hub.docker.com...
12:01:38 Couldn't retrieve username for registry  from docker store
12:01:38 Couldn't retrieve password for registry  from docker store
12:01:39 local-registry: Starting Local Image Registry
12:01:39 local-registry: Namespace default is the default Devspace namespace
12:01:39 local-registry: Wait for local registry node port to be assigned...
12:01:39 local-registry: Check for running local registry
12:01:39 local-registry: Wait for running local registry pod...
12:01:40 build:testimage Rebuild image testimage because tag is missing
12:01:40 build:testimage Building image 'testimage:UIBCLmB' with engine 'localregistry'
12:01:40 build:testimage Sending build context to Docker daemon  4.096kB
12:01:40 build:testimage #1 [internal] load remote build context
12:01:40 build:testimage #1 DONE 0.0s
12:01:40 build:testimage
12:01:40 build:testimage #2 copy /context /
12:01:40 build:testimage #2 DONE 0.0s
12:01:40 build:testimage
12:01:40 build:testimage #3 [internal] load metadata for docker.io/library/ubuntu:latest
12:01:41 build:testimage #3 DONE 0.9s
12:01:41 build:testimage
12:01:41 build:testimage #4 [stage-0 1/2] FROM docker.io/library/ubuntu@sha256:ec050c32e4a6085b423d36ecd025c0d3ff00c38ab93a3d71a460ff1c44fa6d77
12:01:41 build:testimage #4 resolve docker.io/library/ubuntu@sha256:ec050c32e4a6085b423d36ecd025c0d3ff00c38ab93a3d71a460ff1c44fa6d77 done
12:01:41 build:testimage #4 CACHED
12:01:41 build:testimage
12:01:41 build:testimage #5 [stage-0 2/2] RUN --mount=type=secret,id=mysecret,dst=/secretfile cat /secretfile
12:01:41 build:testimage #0 0.053 cat: /secretfile: No such file or directory
12:01:41 build:testimage #5 ERROR: process "/bin/sh -c cat /secretfile" did not complete successfully: exit code: 1
12:01:41 build_images: build images: error building image localhost:30211/testimage:UIBCLmB: failed to solve: process "/bin/sh -c cat /secretfile" did not complete successfully: exit code: 1
12:01:41 fatal exit status

Local Environment:

DevSpace Version: 6.3.2
Operating System: linux
ARCH of the OS: AMD64 | ARM64 | i386
Kubernetes Cluster:
Cloud Provider: other
Kubernetes Version: 1.24.2 (irrelevant since this issue is not interacting with kubernetes)

Anything else we need to know?
I have already debugged the issue in devspace code. The reason is that when you enable the localRegistry, then unintuitively a different docker builder is being used (localregistry vs buildkit). The localregistry builder also uses buildkit (for online builds) or docker (for local builds), but does not reuse the code from the real buildkit or docker builder.
Thus the localregistry builder does not have any access to the images.[imagename].buildKit.args config parameters and cannot apply those to the build. This is also the same when setting localRegistry.localbuild=true.
The problem is: We need a local build with buildkit (which works when disabling localRegistry) AND need to push the image to the local registry. But currently you cannot use both together.
My proposal (but since I do not know the devspace code well you might have different opinions/reasons) would be to isolate the build and push parts of the devspace build pipeline, so any builder can be used with localRegistry. This also makes localRegistry more DRY, since you do not implement the full docker build pipeline there AND in the docker/buildKit builder.
Also: is there a workaround to already use this now? (creating a new pipeline or else)

Just to clarify our usecase:
We need to build an image which uses python and one of the pip packages is inside a private pipy-index. So we need to include the credentials for this during the pip install step of the build. However copying or setting the credentials via envs will leak them in the image layer history. Thus we want to use the intended mechanism of buildkit secrets.
So we need devspace to:

Use the local buildkit builder (otherwise the builder cannot access local files)
Use the buildkit args that we set in devspace.yaml
Push the image to the local registry

All three together are currently not possible, because the upload to local registry is bound to its own set of builders (docker or remote buildkit).

also ran into this and spent a lot of time against it before I realized what was happening

authors: ArcticXWolf jmeickle-theaiinstitute

repo: devspace-sh/devspace


text:
Support the batch operation

[x] I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested
Update the Azure client to support the batch operation.
Additional context & links
The Azure client dynamically updates the path of deployment-based operations to include the deployment name. The deployment name can be supplied to the client in two ways, through the client constructor's deployment option, or through the model property in the request. However, the model property is not accessed in all requests. For example, the audio requests are multi part form data that are streamed and it is not straightforward to access properties on them. This can be remedied by overloading these methods to access the model property before the request is transformed but perhaps it is not worth the effort. Another example is the batch API where there is no model in the request to begin with.
The client behavior can be summarized as follows:

It is aligned with that of Python's where client-level's deployment takes precedence over request-level's model.
If a client-level's deployment is not supplied, and a call is made to batches, audio translations, or audio transcriptions, the request path won't include a deployment name. The service in this case will return an error response.

This change has been merged and ready for release, so closing this.

repo: deyaaeldeen/openai-node


text:
Potential TypeScript issue beyond version 3.6.1

I've setup a small repo here. A simple npm start is enough to have it crashing due to something that is related to this issue. However, it might be the RBX typings since others reported that their issue was fixed by upping the version to upcoming releases - which it doesn't on my machine.

Closing in favor of #116.

repo: dfee/rbx


text:
Enable setting Tenant Header

It has to be possible to set a tenant header (Header key has to be configurable in web.config/app.config with a fallback on a default value Biz-Dfch-Tenant-Id). @dfch suggested to create an additional property on the service reference (which is defined as a partial class) so we can set the header there. This header will then be inserted into the HTTP Request via the existing OnSendingRequest2 event (where we also set the AUTH token)

@afcaJordi is this already done?


text:
feat: crypto nonce randomness

Description
Currently default nonce generation is using Math.random, a pseudorandom source of randomness. We can take advantage of better tools when they are available
Fixes SDK-1194
How Has This Been Tested?
Updated and new unit tests
Checklist:

[x] My changes follow the guidelines in CONTRIBUTING.md.
[x] The title of this PR complies with Conventional Commits.
[x] I have edited the CHANGELOG accordingly.
[x] I have made corresponding changes to the documentation.

I was aiming initially to reproduce the behavior of Math.random, but I agree that yielding a random integer is preferable. I'll simplify, using your recommendations

repo: dfinity/agent-js


text:
feat: on low wasm memory hook

This proposal is based on this forum post and has already been approved by motion proposal 106146.
Canister developers have to actively monitor their canisters to know if they are low on wasm memory. If detected too late, a canister can be completely stuck and forever un-upgradable.
To address this, we introduce a hook called on_low_wasm_memory. When defined, it is triggered whenever the canister's memory usage exceeds some developer-defined threshold.

The hook should not run after an upgrade/reinstall/uninstall/install if the condition is not satisfied after the upgrade (although the condition was satisfied before the upgrade and the hook did not execute yet).

Because the hook condition is checked whenever the canister tries to grow wasm memory, can it ever happen that the canister does not try to grow wasm memory when running upgrade/reinstall/uninstall/install?

Yes, e.g., if the canister does not have any pre- and post-upgrade hooks (in which case there's no wasm execution during canister installation).

repo: dfinity/portal


text:
Unable to read a cell when this one is a list

Hi,
I have some problems with command "Get-CellValue".
I cant extract value text in the cell when cell content is a list :( as you can see in attached :(.
Thanks for your help,

Please could you post a sample Excel file and Powershell script

Looks like this module has been confused with PSExcel which is over here.. https://github.com/RamblingCookieMonster/PSExcel/

Reading cell range that has data validation from list with this module works fine:

$excel=Open-ExcelPackage ..\Temp\Output2.xlsx
$ws=$excel.Workbook.Worksheets[2]
$r=$ws.Cells["d2:d2"]
$r

Oh nice,
Thanks you Robert-i !
Just a wrong command module used so :)

authors: ccoupeau dfinke robert-i

repo: dfinke/ImportExcel


text:
NameError: name 'wall_tile' is not defined

The 'common.py' script throws an error at line 74 as it tries to access the class variable 'wall_tile' without using 'self'.

fixed by 8ca7e3e

Fixed!

authors: BrunoRochaDev dgomes

repo: dgomes/ia-rush


text:
ineffectual assignment to err

We should do something with err :-)
http_example_test.go:57:12: ineffectual assignment to `err` (ineffassign)
	listener, err := net.ListenTCP("tcp", &net.TCPAddr{})

Let's just track this one with #337, so we don't have to manage two.

authors: dgrijalva tegk

repo: dgrijalva/jwt-go


text:
Add CircleCi badge to README

LGTM, feel free to merge :)

authors: graemecode nadavhollander


text:
Update readme

Update readme as follows:

Launcher props chart:

Add 'required' status
Alphabetize and improve grammar
Add links, examples, and specify function params
Remove duplicate

Drop waffle issues link

Check it out at https://github.com/dharness/react-chat-window/tree/update-readme#launcher

Nice looks good! Thanks for doing that. I wonder if we could just use https://github.com/reactjs/react-docgen or something in-code so we don't have to do this every time

Huh, react-docgen looks interesting, but it seems it wouldn't be super helpful - still have to remember to mark if the propType is required, add a description before it, etc.

authors: dharness heatherbooker

repo: dharness/react-chat-window

license: Unlicense


text:
Notify user of new version

User should be notified in case a new version of the app is available. This feature is usefull when an app is not deployed through an application marketplace (such as Google Play).

Using AppUpdater may be a solution.

repo: dhebbeker/memorex-android


text:
Add support for Firmware v17b

Does anyone succeed in running py-opc on a OPC-N2 v.17b?
I got the error Your firmware version could not be automatically detected., so far...

Yes, it should. I used to run it on 17.b. Typically, it means there is a bad connection..? How do you have it wired up?

I use a separate PSU (5V, 1000mA) to power the OPC-N2 and plug the other cables as documented:

SCK =>  CLK
SDO =>MISO
SDI => MOSI
/SS => CE0
GND => GND

Interesting. I will try to find an OPC w/fW 17.b and test myself. You're using the most up-to-date version of the library, I assume? What version of python are you using?
Can you try running the following:
import spidev
import time

spi = spidev.SpiDev(0, 0)
spi.open(0, 0)
spi.mode = 1
spi.max_speed_hz = 500000

info_string = []
spi.xfer([0x3F])
time.sleep(9e-3)

for i in range(60):
    resp = spi.xfer([0x00])
    info_string.append(chr(resp))

''.join(info_string)

I use Python 2.7.9 with the most up-to-date version of your library.
The above code display nothing in the console.

Okay. Is the OPC starting up after about a minute even without sending a command? Have you run any other SPI devices off the RPi? It seems like one of the pins has a poor connection (MOSI, MISO, or CS).
What does lsmod show?

The OPC starts automatically after a minute without sending any command
I never run any other SPI device on the RPi2
Here is the result of lsmod:

Module                  Size  Used by
cfg80211              427855  0
rfkill                 16037  1 cfg80211
ftdi_sio               31193  0
usbserial              22115  1 ftdi_sio
evdev                  11396  3
snd_bcm2835            20511  0
snd_pcm                75698  1 snd_bcm2835
snd_timer              19160  1 snd_pcm
snd                    51844  3 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem         3040  0
spi_bcm2835             7286  0
bcm2835_wdt             3225  0
i2c_bcm2708             4770  0
uio_pdrv_genirq         3164  0
hid_apple               4925  0
uio                     8000  1 uio_pdrv_genirq
i2c_dev                 5859  0
fuse                   83461  1
ipv6                  347530  30

Sorry this has taken so long; I am finally back in the US.
Can you tell me what the command pip freeze prints out?

I have excat the same issue with the difference that my OPC-N2 is running on firmeware version 18. Raspi and OPC are powered by the same PSU (max 3A). Looking forward for your answer. Greetings from Germany .

Hi @gvoelker Have you tried doing the steps I outlined above?
Try running this and let me know what you get:
import spidev
import time
spi = spidev.SpiDev(0, 0)
spi.open(0, 0)
spi.mode = 1
spi.max_speed_hz = 500000

info_string = []
spi.xfer([0x3F])
time.sleep(9e-3)

for i in range(60):
    resp = spi.xfer([0x00])
    info_string.append(chr(resp))

''.join(info_string)

Result of pip freeze:
pi@raspberrypi:~ $ pip freeze
Pillow==2.6.1
RPi.GPIO==0.6.2
RTIMULib==7.2.1
argparse==1.2.1
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
lxkeymap==0.1
mcpi==0.1.1
ndg-httpsclient==0.3.2
numpy==1.8.2
picamera==1.11
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
py-opc==1.0.1
pyOpenSSL==0.13.1
pyasn1==0.1.7
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6
python-apt==0.9.3.12
requests==2.4.3
sense-hat==2.1.0
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2
Result of lsmod:
pi@raspberrypi:~ $ lsmod
Module                  Size  Used by
bnep                   10340  2
hci_uart               17943  1
btbcm                   5929  1 hci_uart
bluetooth             326105  22 bnep,btbcm,hci_uart
hid_logitech_hidpp     10382  0
brcmfmac              186343  0
joydev                  9024  0
evdev                  11396  6
brcmutil                5661  1 brcmfmac
cfg80211              427855  1 brcmfmac
hid_logitech_dj        10016  0
rfkill                 16037  4 cfg80211,bluetooth
snd_bcm2835            20511  1
snd_pcm                75698  1 snd_bcm2835
snd_timer              19160  1 snd_pcm
snd                    51844  5 snd_bcm2835,snd_timer,snd_pcm
i2c_bcm2708             4770  0
spi_bcm2835             7286  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
i2c_dev                 5859  0
fuse                   83461  3
ipv6                  347530  52
Result of the code:
Traceback (most recent call last):
File "/home/pi/Documents/OPC-N2/Programme/error_search_1.py", line 14, in
info_string.append(chr(resp))
TypeError: an integer is required

@gvoelker Can you make sure that MOSI and MISO are hooked up correctly and not switched? Also, try editing the script above to just print out the resp to see why it's not giving an integer?

I checked over the the right wiring an made sure tht MOSI and MISO are hooked up correctly. After editing and running the script, the result was \x00.

@gvoelker What version of Python are you using?

i am using Version 2.7.3

@gvoelker can you pass resp to type() like this
print(type(resp))

to find out what it is.
I wonder whether it is a problem with spidev and python 2 or 3?

It shouldn't be, but still worth a try! I've tested it on both 2.7 and 3.5
and it works great..
On Thu, Sep 22, 2016 at 2:34 PM Andrew Tolmie notifications@github.com
wrote:

@gvoelker https://github.com/gvoelker can you pass resp to type() like
this
print(type(resp))
to find out what it is.
I wonder whether it is a problem with spidev and python 2 or 3?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dhhagan/py-opc/issues/30#issuecomment-248988971, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEKwSHAPgR-xGzZS936jTdIM7INiOtv6ks5qssnzgaJpZM4JXSCw
.

--
Regards,
David H Hagan
PhD Student | Atmospheric Chemistry & Physics
Department of Civil & Environmental Engineering
Massachusetts Institute of Technology
Cambridge, MA 02139
707.227.6695 | dhagan@mit.edu | https://www.davidhagan.me

I am glad to tell you that almost everything is working fine at the moment. The soultion was to use two different PSUs. One for the Raspi and one for the OPC-N2. I don#t know exactly why that error occurs. One last question, even if it is of this topic: How can in Change the sampling rate and what does 'OPCN2' object has no attribute 'read_Histogram'.

@gvoelker Great! Glad you got it working. To change the sampling rate, you simply sample at whatever rate you would like. Essentially, the histogram will continue to increment until you read the histogram again. So if you want a 1 Hz measurement, read the histogram every second. If you want 0.1 Hz data, read the histogram every 10 seconds. For reference, the Alphasense software by default samples once every 1.4 seconds I believe.
As for the second part, it sounds like you are using the new version of the library >1.0 which had some non back-compatible API changes. You can check the new docs for the version you are using, but read_histogram() was changed to histogram(). I will be making some more changes within the next couple weeks after I return from a conference, but everything should still work.

authors: DancingQuanta dhhagan gvoelker rouvoy

repo: dhhagan/py-opc


text:
Improve StackTrace format

Before -

After -

Only change is this, the rest is VS formatted -

    @((MarkupString)Regex.Replace(HttpUtility.HtmlEncode(@data.Items.First().StackTrace ?? string.Empty), "\r?\n|\r", "
"));

Nice! Thank you for contributing.

authors: IeuanWalker dhindrik


text:
You tube link

Change the youtube link on the home page https://www.youtube.com/watch?v=xqyUrPyT0QQ&t=22s

@dhritirajsen . Youtube linked added .
Please mark complete and Close this issue.

repo: dhritirajsen/Spatially-Abled


text:
MODE OF AES

I WAS LOOKING FOR A CODE TO PERFORM AES ENCRYPTION IN C. I CAME ACROSS A DOCUMENT STATING THAT THERE ARE DIFFERENT MODES OF AES (for eg:CBC,ECB). PLEASE TELL ME WHICH MODE OF AES IS BEING IMPLEMENTED THROUGH THIS CODE? IF I RUN THIS CODE IN A MICROCONTROLLER FOR MY PROJECT, WHICH RUNS AT 168Mhz CLOCK, HOW MUCH TIME WILL THE AES ENCRYPTION PART ALONE WILL TAKE TO COMPLETE THE PROCESS. LOOKING FORWARD FOR YOUR REPLY.
THANKS & REGARDS

您的邮件已收到,我将尽快回复，谢谢

repo: dhuertas/AES


text:
Use mktemp for temporary signed.crt file.

Also avoid unnecessary temporary file for the intermediate certificate.
Resolves #112

+1 for using a temporary file in case something goes wrong, but for Apache, you need the intermediate on the filesystem.

ACME v2 now issues certificates with the intermediate, so this step is no longer needed.

authors: anlutro diafygi markus-k

repo: diafygi/acme-tiny


text:
how to remove "Choose an item" text before suggestion

Anytime I add Suggestion to agent, on facebook there's always a text added saying "Choose an item"
how can it be removed or translated?

Same here, how do we change this?

In case anyone's interested, here's my fork and the complete edited file.

hey @naranjja I made the changes in the respective folder (suggestions-response,js) but for some reasons those changes are not being reflected, is there anything more than just saving the file that I need to do ?

I installed your github module itself, it works perfectly. Thanks @naranjja

hey guys, I'm new to this platform, how do I use this @naranjja code in my project? How would they require them?

@TexugoGaio In your project's package.json file, you would edit the version of "dialogflow-fulfillment" to the URL of my repo. Like this:
"dialogflow-fulfillment": "git+https://github.com/naranjja/dialogflow-fulfillment-nodejs.git"

Since this is a platform specific feature, it won't be supported in the library.  If you'd like to use platform-specific responses, I'd recommend using the payload response type

@matthewayne Appreciate the great library, cheers for the great work. The issue with a quick reply payload is the limitation of not being able to send fulfilment messages along with a custom payload. The solution above supplied by @naranjja is a good work around until this functionality is added. There is a pull request pending that elevates this limitation. (#113) Any chance of getting this merge any time soon? Would be very useful for my current use case. Cheers.

@matthewayne I understand what you're saying and the design choice. But the reality of this choice push developers to fork and use their own implementation of your library, which is really not a good thing.
Stepping back a bit, and after using this lib for 2 days, I can tell a proper abstraction of the specificities of each Platform is a must-have. For instance, in my case I need to deal with both Facebook and Web integrations, and I ended up writing wrappers around basic stuff like Text or Suggestion.
If you don't want to write custom integration code in this library, so be it. What do you think about writing a wrapper of your own library, or a bunch of helpers to deal with each platform specificities? It's something the community will need on the long-run.
Also, your link to payload response type is dead.

i solved using a custom payload ad @matthewayne suggested: this way no fork is needed /cc @Vadorequest i'm using somthigng like this
sendOptions(agent, options) {     agent.add("please choose an item...")     options.map(option => agent.add(new Suggestion(option)))     let payload = new Payload(agent.FACEBOOK, {       text: introText,       quick_replies: options         .slice(0, 5)         .map(option => {         return {           content_type: "text",           title: option,           payload: option         }       })     });     agent.add(payload)   }

@magnum I don't understand why you send agent.add("please choose an item...") if you don't actually want it to be displayed. But I'm not so used to Dialogflow, getting started.

@magnum I don't understand why you send agent.add("please choose an item...") if you don't actually want it to be displayed. But I'm not so used to Dialogflow, getting started.

just saying this way you can customize it, for example translate it (that was my need) or for example not use it.

i solved using a custom payload as @matthewayne suggested: this way no fork is needed /cc @Vadorequest i'm using somthing like this
sendOptions(agent, options) {
    agent.add("please choose an item...")
    options.map(option => agent.add(new Suggestion(option)))
    let payload = new Payload(agent.FACEBOOK, {
      text: introText,
      quick_replies: options
        .slice(0, 5)
        .map(option => {
        return {
          content_type: "text",
          title: option,
          payload: option
        }
      })
    });
    agent.add(payload)
  }

Tried this code but it worked only in the Dialogflow simulator not inside Facebook messenger...

let payload = new Payload(agent.FACEBOOK, {
text: introText,
quick_replies: options
.slice(0, 5)
.map(option => {
return {
content_type: "text",
title: option,
payload: option
}
})
});
agent.add(payload)
That works for me in the FB messenger as well.

@TexugoGaio In your project's package.json file, you would edit the version of "dialogflow-fulfillment" to the URL of my repo. Like this:
{
"dialogflow-fulfillment": "git+https://github.com/naranjja/dialogflow-fulfillment-nodejs.git"
}

what is dialogflow-fulfillment version which you editted?
It's 0.6.1 or lower?

So, what I did was go into /src/rich-responses/suggestions-response.js and modified the Suggestion constructor to include this.title besides this.replies:
constructor(suggestion) {
    super();
    this.platform = undefined;
    this.replies = [];
    this.title = "Choose an item:"

Then, I set the value of this.title to the passed in value to the suggestion object:
} else if (typeof suggestion === 'object') {
    this.replies.push(suggestion.reply)
    this.title = suggestion.title

Lastly, I modified the getV2ResponseObject_() function so that it handles this.title for the Facebook response:
} else if (platform === PLATFORMS.FACEBOOK) {
    response = {
        quickReplies: {
            title: this.title,
            quickReplies: this.replies
        }
    }
}

Once that's done, you can make quick replies like this. First, make the first one with a title:
const quickReplies = new Suggestion({
    title: "My custom message",
    reply: "Option 1"
})

And then add the rest of the options like so:
quickReplies.addReply_("Option 2")
quickReplies.addReply_("Option 3")
quickReplies.addReply_("Option 4")

Lastly,
agent.add(quickReplies)

And it works!

what is dialogflow-fulfillment version which you editted?
It's 0.6.1 or lower?

authors: Parau TexugoGaio Vadorequest madhavaspect magnum matthewayne naranjja petept pongpat1 pranavgor


text:
fix: 修复选区插件无法触发鼠标事件的问题，同时兼容 Ctrl + 滚轮事件

本地构建项目失败没能启动项目来测试这个改动是否能真真正正的解决该问题，但在 #1533 提供的示例基础上做过测试，具体来说是：

手动选区，创建选区元素，然后通过 DevTool 取消选区元素的该样式

https://github.com/didi/LogicFlow/blob/bc553cb959aed494a6e52f75634a3bda88f1cd29/packages/core/src/style/index.css#L192

在控制台输入以下代码：

document.querySelector('.lf-multiple-select').addEventListener('wheel', (ev) => {
    ev.preventDefault();
    const newEvent = new WheelEvent('wheel', {
        deltaX: ev.deltaX,
        deltaY: ev.deltaY,
        clientX: ev.clientX,
        clientY: ev.clientY,
        ctrlKey: ev.ctrlKey,
    });

    document.querySelector('div#lf-view').querySelector('.lf-canvas-overlay[name="canvas-overlay"]').dispatchEvent(newEvent);
}, { passive: false });

PR 中的更改与上述操作相似。

本地构建项目失败没能启动项目来测试这个改动是否能真真正正的解决该问题，

由 18.x 换用 16.x 的 NodeJS 能正常构建了，这边测试的结果是能解决该问题，并兼容 Ctrl + 滚轮事件。

@DymoneLewis @boyongjiong cc

authors: ChangeSuger wumail

repo: didi/LogicFlow


text:
x_ops.so: undefined symbol: _ZN10tensorflow8str_util9LowercaseEN4absl11string_viewE

Traceback (most recent call last):
File "local/generate_mock_data.py", line 19, in
from delta.data.utils.test_utils import mock_a_text_file
File "/home/xxx/study/delta/delta/data/utils/init.py", line 17, in
from delta.data.utils.common_utils import *
File "/home/xxx/study/delta/delta/data/utils/common_utils.py", line 26, in
from delta.data.preprocess.text_ops import tokenize_label
File "/home/xxx/study/delta/delta/data/preprocess/text_ops.py", line 22, in
from delta.layers.ops import py_x_ops
File "/home/xxx/study/delta/delta/layers/init.py", line 27, in
from delta.layers.common_layers import *
File "/home/xxx/study/delta/delta/layers/common_layers.py", line 22, in
from delta.data.feat import speech_ops
File "/home/xxx/study/delta/delta/data/feat/init.py", line 17, in
from delta.data.feat import speech_ops
File "/home/xxx/study/delta/delta/data/feat/speech_ops.py", line 25, in
from delta.layers.ops import py_x_ops
File "/home/xxx/study/delta/delta/layers/ops/py_x_ops.py", line 27, in
tf.compat.v1.resource_loader.get_path_to_datafile('x_ops.so'))
File "/home/xxx/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/xxx/study/delta/delta/layers/ops/x_ops.so: undefined symbol: _ZN10tensorflow8str_util9LowercaseEN4absl11string_viewE

Same issue here...

Currently, compilation of custom op with g++ 4.8 may cause this error. Please check your g++ version. If it's not g++ 4.8, please let us know.
You can use conda install -c conda-forge cxx-compiler to update the g++ version under your conda env.
then, compile custom op again：
pushd tools/
./install/install-ops.sh
popd

This issue has been added to our FAQ

We had add this part to our install script now:
https://github.com/didi/delta/blob/b4d659e6dfd5d9a271907a8c96dd464b8c4fa450/tools/install/install-delta.sh#L60

@lorentz-wu  Is the problem fixed? We will close the issue if the problem is fixed. Thank you!

authors: applenob hankun11 lorentz-wu mandubian

repo: didi/delta


text:
feat: 整卷增加基础配置：必填、显示类型、显示序号、显示分割线

改动内容

在问卷配置模块增加整卷配置功能UI
在stores/edit 增加 整卷逻辑组合函数
在初始化问卷，修改问卷更新整卷配置状态(通过问卷长度和每个问卷选中的个数对比计算整卷各项状态)
监听整卷选择更新问卷数据到服务器

Issue

改了
---- 回复的原邮件 ----
| 发件人 | @.> |
| 日期 | 2024年08月12日 19:57 |
| 收件人 | @.> |
| 抄送至 | @.>@.> |
| 主题 | Re: [didi/xiaoju-survey] feat: 整卷增加基础配置：必填、显示类型、显示序号、显示分割线 (PR #391) |
@sudoooooo commented on this pull request.
In web/src/management/pages/edit/modules/questionModule/SetterPanel.vue:

const { changeSchema } = editStore
const handleFormChange = (data: any) => {
const { key, value } = data
const resultKey = ${currentEditKey.value}.${key}
changeSchema({ key: resultKey, value })

editStore.editGlobalBaseConf.updateCounts('MODIFY', { key, value })

可以优化下只有改变特定key的时候才计算
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

repo: didi/xiaoju-survey


text:
Fix crash when the adapter changes its content

PagerAdapterWrappershould call super.notifyDataSetChanged()when a change happens  in the wrapped PageAdapter otherwise you get the following error:

The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged

Thanks a lot! We has this problem and this change fixes it! I hope it gets merged soon!

Unfortunately this does not fix the crash !!!

authors: Ereza Nammari sgc-code

repo: diego-gomez-olvera/RtlViewPager


text:
[ignore] trigger Docker Hub build/push

PR for triggering build/push action. Not meant for merge

:exclamation: before this PR can be merged please make sure that you enable "Allow edits from maintainers".
This is needed for tooling to be able to update this PR in-place so that Github can properly recognize and mark it as merged once its merged into the upstream branch

/canary

/canary

:broken_heart: Test Failed - ci-test

authors: bors-diem jsladerman

repo: diem/diem


text:
[RFC][move][vm] Versioned deserializer

Threaded version information through the VM's deserializer
It was a bit tricky to do this because the deserializer was so light weight
An alternative option would be to stick the whole thing in some sort of deserializer struct/object and add the environment variable as a version, but that felt weird since there was only one thing in the env...

Motivation

We will need to case on the version information for future work

Test Plan

none yet really, the code is not used yet

Theoretically only the initial dispatch needs to be dynamic, based on the version number read from the beginning of the file format and an alternative pattern to support versioning is to make a modified version of every function on an effect path:

However this comes at the cost of code bloat and the performance gain and slight decrease in complexity in each path probably aren't enough to justify the cost. Based on this I'm starting to like the current proposal.
Maybe when const generics becomes stable in the future we could do something like this:
fn deserialize_module(bytes: &[u8]) -> Result<...> {
    let version = read version number;
    if version == V1 {
        deserialize_module::<V1>(bytes)
    }
    else version == V2 {
        deserialize_module::<V2>(bytes)
    }
}

Theoretically only the initial dispatch needs to be dynamic, based on the version number read from the beginning of the file format and an alternative pattern to support versioning is to make a modified version of every function on an effect path:

However this comes at the cost of code bloat and the performance gain and slight decrease in complexity in each path probably aren't enough to justify the cost. Based on this I'm starting to like the current proposal.
Maybe when const generics becomes stable in the future we could do something like this:
fn deserialize_module(bytes: &[u8]) -> Result<...> {
    let version = read version number;
    if version == V1 {
        deserialize_module::<V1>(bytes)
    }
    else version == V2 {
        deserialize_module::<V2>(bytes)
    }
}

@vgao1996 I did a large refactor based on your suggestions, let me know what you think before I land :)

@vgao1996 I did a large refactor based on your suggestions, let me know what you think before I land :)

/land

/land


text:
increase state sync perf test time out

Motivation
Observing some timeouts and willing to see if adding a little bit leeway calms it down.
Have you read the Contributing Guidelines on pull requests?
Y
Test Plan
ct

The failure didn't reproduce, this seems to be unnecessary.


text:
[CI] update the min_tps to 1100 to prevent regressions

Motivation
(Write your motivation for proposed changes here.)
Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan
(Share your test plan here. If you changed code, please provide us with clear instructions for verifying that your changes work.)
Related PRs
(If this PR adds or changes functionality, please take some time to update or suggest changes to the docs at https://developers.diem.com, and link to your PR here.)
If targeting a release branch, please fill the below out as well

Justification and breaking nature (who does it affect? validators, full nodes, tooling, operators, AOS, etc.)
Comprehensive test results that demonstrate the fix working and not breaking existing workflows.
Why we must have it for V1 launch.
What workarounds and alternative we have if we do not push the PR.

/land

/land

@zihaoccc :bulb: This PR is already queued for landing

:broken_heart: Test Failed - ci-test

/land

authors: bors-libra zekun000 zihaoccc


text:
[GHA] bump up timeout to 40mins

Motivation
(Write your motivation for proposed changes here.)
Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan
(Share your test plan here. If you changed code, please provide us with clear instructions for verifying that your changes work.)
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/diem/diem/tree/main/developers.diem.com, and link to your PR here.)
If targeting a release branch, please fill the below out as well

Justification and breaking nature (who does it affect? validators, full nodes, tooling, operators, AOS, etc.)
Comprehensive test results that demonstrate the fix working and not breaking existing workflows.
Why we must have it for V1 launch.
What workarounds and alternative we have if we do not push the PR.

Can you also open an issue for this job? The issue is to look into reducing docker build times (DLC is not leveraged in this job) and build trigger (does it need to build all docker images all the time? if not, can we pull existing images published to GH docker registry?)
ticket is lodged: https://github.com/diem/diem/issues/9674

/land


text:
Document AstPass

Given that implementing QueryFragment is something that we want
plugins to be able to do, this type is part of our public API. I do not
want constructing this type to be part of our public API (it might be
required today by someone who is implementing their own connection
adapter, but we should try to make that unneccessary), so those methods
are hidden. There are also a few methods that care about the current AST
pass which I'd like to refactor out when I have the time. Those methods
are also hidden.

Relevant for anyone outside the core team who may be interested in reviewing this: I'm planning on writing a guide around extending the query builder using this code as the final goal. I'm feeling pretty good about the level of abstraction in that code (maybe not specifically for pagination, but it felt like a good self-contained example. And there will always be use cases that need to drop down to this level). However, AstPass needs to be documented for that guide (and specifically reborrow feels off to me if it's part of our public API. Unfortunately there's no good place that reborrowing for the language is documented that I can link to)

repo: diesel-rs/diesel


text:
add envirnment variable handling

I tested one makeBlah script and it worked with the env variable.
Please especially check the change to oneModel.py

is the path to the directory containing AB Sharp SynDiffix code (the adaptive-buckets-sharp directory)

adaptive-buckets-sharp - we no longer use this term. It should be syndiffix.

Please especially check the change to oneModel.py

Looks good to me. I will verify soon.

repo: diffix/test-syndiffix


text:
README.md: fix typo

s/wold/would/

Ah, missed #3.

Thanks all the same.

repo: digital-fabric/affect


text:
1666: Rename CardBlueprint to Card

Short description

Follow up PR to #1667 to make the naming consistent.
Proposed changes

Rename everything to just card/Card.

Side effects

None.
Testing

Nothing breaks.
Resolved issues

Fixes: #1666

Looks good, thank you 🚀
Tried to test, but i get this error, that seems unrelated to this PR, therefore did not test
/home/steffi/.nvm/versions/node/v16.13.2/bin/npm run start

> start
> set -ae; REACT_APP_APPLICATION_COMMIT=$(./application_commit.sh); ts-node scripts/start.ts
Starting the development server...
Failed to compile.

Module parse failed: Unexpected token (6:7)
File was processed with these loaders:
 * ../node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
 * ../node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| export { default as buildConfigBayern } from "./bayern"
| export { default as buildConfigKoblenz } from "./koblenz"
> export type { DeeplLinkingConfig, BuildConfigType } from "./types"
| export * from "./constants"
|
ERROR in ../frontend/build-configs/index.ts 6:7
Module parse failed: Unexpected token (6:7)
File was processed with these loaders:
 * ../node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
 * ../node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| export { default as buildConfigBayern } from "./bayern"
| export { default as buildConfigKoblenz } from "./koblenz"
> export type { DeeplLinkingConfig, BuildConfigType } from "./types"
| export * from "./constants"
|

webpack compiled with 1 error

Hmmm, interersting, did you try to run npm i and/or npm run ts:check? At least it looks like its not finding something related to build configs that should be there. For me it works without issues.

Yes i even deleted node_modules folder and reinstalled.

@ztefanie No idea if it's related, but your Node version seems outdated (v16). We use v20 in circle ci I think

authors: michael-markl steffenkleinle ztefanie

repo: digitalfabrik/entitlementcard


text:
[2024-11-07] Disallow publishing imported events through version history

Short description

This PR removes the buttons from the version history for imported events from an external calendar.
Proposed changes

Remove buttons

Side effects

I'm not 100% sure if this is the best way to do it, or if maybe some explanatory text would be helpful. What do you think?

Resolved issues

Fixes: #3107

Pull Request Review Guidelines

I think removing the buttons is valid, another option could be to disable them / gray them out?
In both cases, a short help text would probably be nice though, I agree.
However, could you please also add some backend validation to ensure imported events are not published?

However, could you please also add some backend validation to ensure imported events are not published?

Fair point! I'm still trying to evaluate what the most sensible validation would be. Do we just not want some users (like authors) to not publish them or do we not want any user to be able to publish them? If so, wouldn't that defeat the purpose of importing the events in the first place? :thinking: If you have any suggestions, I would be interesting in hearing them :)

However, could you please also add some backend validation to ensure imported events are not published?

Fair point! I'm still trying to evaluate what the most sensible validation would be. Do we just not want some users (like authors) to not publish them or do we not want any user to be able to publish them? If so, wouldn't that defeat the purpose of importing the events in the first place? 🤔 If you have any suggestions, I would be interesting in hearing them :)

Oops, yes, "ensure imported events are not published" was probably an unfortunate way to formulate this 😆
If it's just the authors, I would go ahead and prevent them from publishing imported events, ever, since AFAIK they are not allowed to add external calendars anyways, right?
If it's about noone being able to publish draft events imported from external sources, I would suggest enforcing this for all endpoints, except for the initial import.
But the first one is probably easier and more accurate to the issue description

@charludo & @jarlhengstmengel I'm sorry that it took me so long to get back to this. But finally this PR is ready to be reviewed again :)
Most prominent changes:

background check was added
The button reappears but now is disabled with a title describing why the button is disabled

:)

@JoeyStk
The desired behaviour is that no user can publish or turn imported events into draft or refresh their date, right?

Yes, at least for imported events

authors: JoeyStk MizukiTemma charludo

repo: digitalfabrik/integreat-cms


text:
Device view is empty in 2.3.6

Issue type
[ ] Feature request
[X] Bug report
[ ] Documentation
[ ] Housekeeping

Environment

Python version:  3.5.2
NetBox version:  2.3.6

Description
I just upgraded to version 2.3.6 from version 2.3.5. I executed the upgrade.sh script and the db migration before launching the new version. The Device view is empty as shown in the image below. I have 239 devices.

When a filter is active the device view is populated.

Please post your installed Python packages (pip freeze or pip3 freeze).

I'm not able to replicate this issue with the specified environment. Do you have any unusually named devices? Does this happen with any other object lists?

I'm sorry, it's my bad. I had bad value in one of my devices in one site. It caused a server side error. The whole device list could not be created because of it.

repo: digitalocean/netbox


text:
manage.py migrate unknown command

The install docs refer to running manage.py migrate, but this command does not exist
[root@host netbox]# ./manage.py migrate
Unknown command: 'migrate'
Type 'manage.py help' for usage.

GitHub issues are intended for bug reports and feature requests only. If you'd like assistance with installing NetBox, please post to the mailing list. Thanks!

authors: jeremystretch muggahtee


text:
🛑 eid is down

In d2b3908, eid (https://eid.digitalservicebund.de/actuator/health) was down:

HTTP code: 404
Response time: 744 ms

Shutdown eid

authors: JulianRoesner nfelger

repo: digitalservicebund/uptime-monitor


text:
recent activity -  "dig with digma" link reference to a wrong webpage

TBD link address:

Change to link to our quickstart: https://youtu.be/F1Y0kETn-QQ

authors: doppleware shaykeren

repo: digma-ai/digma-ui


text:
Could not execute the sample tests

Hi, I tried to download the GCode parser and run the
cmake .
make -j
./all-tests

but it returned with a failure:
error.pdf

@Ruka7 I cannot reproduce the error. Could you backtrace the segfault and post the backtrace?

How should I backtrace it? I usually use gdb but it says there are "no debugging symbols found in ./all-tests"

Hi, @Ruka7
The same problem with /* Full sample parsing Parse HAAS sample SIGSEGV - Segmentation violation signal */
Other tests passed.

@childhoodisend could you send more details about your setup? What compiler and OS are you using? What commands did you use to build the project?

@dillonhuff here the compiler, OS info and commands:

gcc / g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

2)NAME="Linux Mint"
VERSION="20.2 (Uma)"
UBUNTU_CODENAME=focal
3)Commands are exactly the same as in repo. Debug and Release mode only.

@childhoodisend could you build the project in debug mode and backtrace the segfault in gdb and then post the backtrace?

authors: Ruka7 childhoodisend dillonhuff

repo: dillonhuff/gpr


text:
Inappropriate safety claim

You should avoid claiming that this project allows you to "safely" combine recreational drugs. You do have some disclaimers on here but I think it's inappropriate to have that tagline.
Some of these drugs have the potential to kill, and you can't really make the determination that these combinations are ever safe.

Thank you for the suggestion. I agree the word "safely" might not be my best word choice, especially when dealing in this area.
As for your other point regarding some drugs potential to kill, I subscribe to the "dose makes the poison" school of thought. All of these drugs have the potential to kill if your dose is too much. All of them also have less than lethal doses for all other kinds of purposes.
I've replaced all references implying this tool has anything to do with safety. It really is for education, anyway.

authors: dillonjohnbrown postcasio

repo: dillonjohnbrown/the-drugulator


text:
🛑 android-10.0.0_r47 is down

In 97f301d, android-10.0.0_r47 (http://aospxref.com/android-10.0.0_r47/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: android-10.0.0_r47 is back up in 974f94e after 12 minutes.

repo: dimenspace/aosp-uptime


text:
🛑 babis Apartments is down

In 5bdea1a, babis Apartments (https://www.babisapartments.gr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: babis Apartments is back up in 1bd0a31 after 9 minutes.

repo: dimitrisdervas/upptime


text:
feature: add functions to extract addresses from tx outputs (cc, non-cc, p2sh) and to check if output is mine

add functions to extract addresses from tx outputs, cc, non-cc, p2sh, (like they exist in the daemon)
add IsMine function to check if output is mine

added

repo: dimxy/bitgo-komodo-cc-lib


text:
How to add success to every responce?

Hello!
I want to add success responce to every API call. If we have an error, success: false and if all is OK, then success: true.
Final responce must looke like this:
{
"success":true,
"data": [{}, {}]
}

How to do that?

@Sogl,I have same problem , Have you reached a result?

I guess (!!!), that you need to write your own transformer.. Take a look at this wiki entry here!
Custom Transformers
It may help you?!

@johannesschobel All transfomer manipulation add lines into "data" JSON section, but I need "success" near this section.

yeah, but would that be a problem?
Your JSON response would look like this:
{
   "data" : {
      "success" : true,
      "foo" : "bar",
   }
}

another way of doing this, would be to use the setMeta() function of the response. Using this method, you can apply a meta block. In this block, for example, pagination information (what page are you on, how many items are displayed on one page, ...) is stored..
You can simply append your own meta information either by using setMeta() (overwrite the meta block) or by using addMeta() (append to meta block)...

but would that be a problem?

@johannesschobel , To simplify More. in most of major API that I checked there is comes a simple key like ok or success with a boolean value that shown result status In short. in the other hand, front-end developer has a simpler task too

@johannesschobel So... I use setMeta now where pagination also present and in my frontend framework I set check meta.success.
But things gets complicated. Why I can't simple change server responce in my own way, without hacking?
I need to put the same code in every responce... can I do that in one place when success and no errors?

@ahmadbadpey and @Sogl
that is - at least in my opinion - not good practice, because you should use HTTP status codes for this case.. e.g. 200 means ok (or in your case success), if there is an error in the request (e.g., the requestor asks for an entity that is not available) you should throw a 404 (not found) and so on!
You are trying to "rebuild" functionality, which is already available through common HTTP standards. Why not check the HTTP status of the response?!

It's additional data, not for replace status codes.
ExtJS frontend framework need that data.

then put it in the meta block, as it does not belong to your original data you want to transfer!

Question was "how to put new data near the data block?", not into meta block.

@Sogl how are you letting the response(s) be generated? Just returning models and letting the framework / dingo handle it?

@hskrasek I don't understand what you talking about.. can you rephrase, please?
I explained what I want in the 1st message.

You can follow this article https://github.com/dingo/api/wiki/Responses#morphing-and-morphed-events
Listen to the event and check their status code (or whatever data that you defined) and add what you want to response, example with "AddPaginationLinksToResponse" is clear and you can follow it

i have the same question , Have you reached a result?

I do have some doubt, is anyone knows how we can achieve this?

@Sogl You can use
return $this->response->array(['success' => true, 'data' => $data]);

authors: Sogl ahmadbadpey anil1712 beaplat-61f hskrasek johannesschobel tantam tosslife

repo: dingo/api


text:
[feat][store] serial refactor for coprocessor and dingo-sdk

serial refactor.
1. libexpr (other repo)
2. dingo-serial (other repo)
3. dingo-store  (this commit)

discard as submodule issues.

repo: dingodb/dingo-store


text:
fix: compound v3 polygon market id

[x] fix compound v3 market id
[x] yarn changeset

LGTM

LGTM

authors: Jeff-CCH LuPoYi zodahu

repo: dinngo/protocolink-logics


text:
allow comparator functions to work with string or file handle

this can be implemented by having the functions check their input for hasattr(read) and calling it automatically to get the string if present. should make #15 easier to implement.

closing this since v2.0 will read exclusively from files.

repo: direct-phonology/direct


text:
Exporter crashes with index out of range

What happened?
Hello,
while trying to use minecraft-exporter for docker-hosted modded [modpack: Multiblock Madness, hosted via Pterodactyl Panel] Minecraft server I've encountered following error while scraping from Prometheus hosted on another machine:
ts=2022-08-17T23:43:55.773Z caller=main.go:43 level=info msg="Starting minecraft_exporter" version="(version=0.16.0, branch=HEAD, revision=df4d15fe643b0104a0729a08f5340ff3285a6c9d)"
ts=2022-08-17T23:43:55.773Z caller=main.go:44 level=info msg="Build context" build="(go=go1.19, user=goreleaser, date=2022-08-09T05:58:33Z)"
ts=2022-08-17T23:43:55.774Z caller=main.go:53 level=info msg="Disabling collection of exporter metrics (like go_*)" value=true
ts=2022-08-17T23:43:55.774Z caller=main.go:81 level=info msg="Listening signals..."
ts=2022-08-17T23:43:55.774Z caller=main.go:69 level=info msg="Listening on address" address=:9150
ts=2022-08-17T23:43:55.774Z caller=tls_config.go:195 level=info msg="TLS is disabled." http2=false
ts=2022-08-17T23:44:49.024Z caller=exporter.go:897 level=error msg="Failed to get player stats" err=EOF
panic: runtime error: index out of range [1] with length 0

goroutine 39 [running]:
github.com/minecraft-exporter/pkg/exporter.(*Exporter).getServerStats(0xc000128240, 0xc000230040?)
        /home/runner/work/minecraft-prometheus-exporter/minecraft-prometheus-exporter/pkg/exporter/exporter.go:786 +0xb52
github.com/minecraft-exporter/pkg/exporter.(*Exporter).Collect(0xc000128240, 0xc00038a760?)
        /home/runner/work/minecraft-prometheus-exporter/minecraft-prometheus-exporter/pkg/exporter/exporter.go:900 +0x2c5
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
        /home/runner/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/registry.go:453 +0x10d
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
        /home/runner/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/registry.go:545 +0xbac

How can we reproduce this?
Based on README, I've created following docker-compose which I used to run exporter:
version: '3'

services:
  mmad-exporter:
    container_name: mmad-exporter
    image: ghcr.io/dirien/minecraft-exporter
    restart: unless-stopped
    networks:
      - pterodactyl_nw
    volumes:
      - /var/lib/pterodactyl/volumes/cebf950d-e27a-4a7a-a2d5-9d5952c7bb08/world:/minecraft/world:ro
    environment:
      - WEB_DISABLED_EXPORTER_METRICS=true
      - MC_RCON_ADDRESS=${SERVER}:25665
      - MC_RCON_PASSWORD=${RCON_PASS}
      - MC_NAME_SOURCE=mojang
      - MC_MOD_SERVER_STATS=forge
    ports:
      - 9150:9150
    expose:
      - 9150

networks:
  pterodactyl_nw:
    external:
      name: pterodactyl_nw

[part] prometheus.yml
  - job_name: minecraft_exporter
    scrape_interval: 1m
    scrape_timeout: 45s
    static_configs:
      - targets: ["#REDACTED-IP#:9150"]

minecraft-exporter --version
v0.16.0

Search

[X] I did search for other open and closed issues before opening this.

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Additional context
No response

hi @Kamisoi,
thanks for reporting the issue! Looks like there is a space in the Overall Tick RCON output:
[07:41:07] [Server thread/INFO] [minecraft/DedicatedServer]: Overall : Mean tick time: 5.203 ms. Mean TPS: 20.000

The version, I tested with (1.16) has no space:
07:48:49] [Server thread/INFO] [minecraft/DedicatedServer]: Overall: Mean tick time: 0,441 ms. Mean TPS: 20,000

I fixed it, with v0.16.1.
Looking forward for your feedback!

Created an issue #275 for the TPS from the dimensions.

authors: Kamisoi dirien

repo: dirien/minecraft-prometheus-exporter


text:
Have to edit script to parse # baubles?

Would like to pass in the GUI / terminal how many baubles I have as they are used frequently and should not be edited in scripts (or am I doing this wrong).

I think this is a cool idea / I do believe it could be done.. It may be tricky trying to OCR the # of baubles? But I could also see it working by asking for a screenshot of 0 baubles and using them if SSIM doesn't match.
It may also work as a dumb function / trying to use baubles even if you have none.. but I haven't tested how this would work in the game.
In practice, I was being lazy and usually just set mine to 60/90 and always bought that many baubles before I left the bot going, bit I certainly think it should be moved to a config at the very least!

(Unfortunately I'm not sure if my WoW subscription is active anymore, so I don't know if I will be making any further improvements at this time -- I, however, welcome any improvements either submitted as Pull Requests, or if you just wanted to make your own fork and run with it! =D)

I would rather require the User to pass the # of baubles at the start of the script (heavily reduces complexity and OCR is really prone to errors).
I'll add that when I have time. Might provide a little GUI while I'm at it

authors: HiddevH disarmyouwitha


text:
Migration to JSON::Serializable

I've migrated all structs to the new JSON::Serializable in Crystal 0.35.0

No problem! I'm glad I could help :smile:
I was doing a lot of find and replace magic, so I missed some mistakes.
Will fix that tomorrow morning.

@MineBartekSA You should able to run crystal tool format which will take care of any formatting issues for you.

Oh, right, I totally forgot that this tool exists. Thanks for the tip

Done, but still needed to add some new lines by hand

repo: discordcr/discordcr


text:
[WIP]: fix(ArgumentTypes): Update TypeResolver for future DataStore removal

Updates to support the pending change from DataStores to Managers in discordjs/discord.js#3696

implemented in https://github.com/discordjs/Commando/commit/154e16a04b61caf2cfe58b6d8f7430edb89f8ae7, https://github.com/discordjs/Commando/commit/a4892a2065a295a26cd10abd7f520be70370b1da, https://github.com/discordjs/Commando/commit/f80823ed6fc3887a8cfb74a9345c59c6c2658545 and https://github.com/discordjs/Commando/commit/bdbd84e2a978322f3af12c21e729eb7b7cd4a3dc

repo: discordjs/Commando


text:
No "exports" main defined

今天尝试在自己的服务端部署，遇到一个新的问题：
No "exports" main defined in /home/www/discuss_comment/node_modules/discuss/package.json
执行 node index.js后报错：

系统环境：

package.json :
{
  "name": "discuss_comment",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "discuss": "1.2.6"
  }
}

index.js
const discuss = require('discuss')

// 选择以什么方式运行
discuss.server() // 服务器使用 (Server)

discuss.main() // 无服务器使用 (ServerLess)

.env

看上去貌似是没问题的，但是index.js里你因该删除掉discuss.main() // 无服务器使用 (ServerLess)，因为他是为无服务器准备的，你不能同时使用两种运行方式
至于报错的原因我分析出可能是因为,npm install的时候没有完整安装，可以尝试清理以下npm缓存npm cache clean --force，删除 node_modules 文件夹 rm -rf node_modules，重新安装依赖npm install
如果按照以上步骤操作后仍然有错误的话，你可以试试将index.js内容改为
// index.js
const discuss = require('./node_modules/discuss/src/server/index')

discuss()

修改成
const discuss = require('./node_modules/discuss/src/server/index')
discuss()
生效了。

现在又遇到一个新的问题，需要请教一下。
我是用hexo + volantis主题搭建的个人博客。
volantis版本：6.0。
_config.volantis.yml的配置：
comments:
  title: <i class='fa-solid fa-comments'></i> 评论
  subtitle:
  service: discuss

  # Discuss
  # https://discuss.js.org
  discuss:
    serverURLs: http://sunlogging.com:6870
    # serverURLs: sunlogging-9gtu1k9tfcf66f5d-1312201416.ap-shanghai.app.tcloudbase.com
    visitStat: true # 是否显示文章阅读数

测试请求时会报下面这个错。

我看discuss的网站说是支持Volantis主题的： https://discuss.js.org/support/Hexo.html#hexo-theme-mengd-萌典
不知道是不是我的配置哪里不对。

测试页面：http://sunlogging.com/about/message_board/

现在又遇到一个新的问题，需要请教一下。
发布评论请求时，提示： Database connect fault。是我的数据库配置有什么问题吗？

discuss.server()

你好~ 修改之后还会报错，服务器的log如下，知道是什么问题吗？

HTTP返回的错误码是200，但是前端提示“评论失败”。服务器查了一下数据库，是空的，说明添加成功。

看log提示应该是：从d_admin表里查不到管理员数据，这个管理员账号需要怎么初始化呢？

你得初始化管理员账号

你好~ 根据你的提示，我把discuss系统部署起来了。但是发现一个问题：
初始化管理员账户后，后台管理系统只有第一次登录是成功的，后面每次登录都是失败的，提示“用户名或密码错误”，但是我的密码确定是对的。

最开始我以为是密码错了，但是我做了以下的测试：

登录我的服务器系统，登录我的mysql，通过 DELETE FROM d_admin WHERE id = 'XXX'; 删除我的管理员账户。
重启discuss服务，重新访问我的网站（公网IP:6870），重新初始化我的管理员账户。
再次重启discuss服务，再次访问我的网站（公网IP:6870），这时会跳转登录页面，重新用户名和密码进行登录。
发现还是提示“用户名或密码错误”，但是我的密码确定是对的。

然后用浏览器调试，发现返回的错误码是403, 发起登录请求时密码竟然是明文传输的。

你好~ 根据你的提示，我把discuss系统部署起来了。但是发现一个问题：
初始化管理员账户后，后台管理系统只有第一次登录是成功的，后面每次登录都是失败的，提示“用户名或密码错误”，但是我的密码确定是对的。

最开始我以为是密码错了，但是我做了以下的测试：

登录我的服务器系统，登录我的mysql，通过 DELETE FROM d_admin WHERE id = 'XXX'; 删除我的管理员账户。
重启discuss服务，重新访问我的网站（公网IP:6870），重新初始化我的管理员账户。
再次重启discuss服务，再次访问我的网站（公网IP:6870），这时会跳转登录页面，重新用户名和密码进行登录。
发现还是提示“用户名或密码错误”，但是我的密码确定是对的。

然后用浏览器调试，发现返回的错误码是403, 发起登录请求时密码竟然是明文传输的。

我本地现搭了一个，我这边确实是正常的，没有任何问题。
盲猜可能是你nginx配置了什么东西吧？你可以自己本地启动一个试试

repo: discussjs/discuss


text:
Typo in section 3

"the objective function can be propagated also trough the CPPN"
should be "through the CPPN", I believe
https://github.com/distillpub/post--differentiable-parameterizations/blob/5d495567d2be035ac1bafaa350852221554338fd/src/index.ejs#L347

Will take a while to be on website, but is fixed in source! :-)

authors: jonahweissman ludwigschubert


text:
🛑 Acadia is down

In 05d597e, Acadia ($ACADIA) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Acadia is back up in 4e06911 after 51 minutes.

repo: diveliastudio/upptime


text:
🛑 HIAS is down

In 2f3d76e, HIAS ($HIAS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: HIAS is back up in df54c5f after 10 minutes.


text:
PRNG using Multiply With Carry

Motivation
Using keccak256 to generate pseudorandom numbers can be quite expensive and thus not feasible for some applications. Although cheaper MWC generators are not cryptographically safe, they provide suitable alternatives for many use-cases.
Implementation Summary

Rename the old library implementation PRNG -> CSPRNG
Implement an 128bit MWC generator in the PRNG library
Adapt the PRNG testing suite to cover multiple similar implementations
Extend the testing suite by a

Monobit frequency test
Monobit cusum test

Nice!!! Thank you! This will take a bit of time to review thoroughly, but I'm excited :)

Is there a way to mark *CSPRNG.sol as being renamed instead of entirely new files?

Unfortunately no. Git interprets it as a new file because I also slightly changed its content (PRNG -> CSPRNG).

Done.

authors: cxkoda divergencetech

repo: divergencetech/ethier


text:
Fixed publish button / dropdown interaction

When all the children of the dropdown were publish buttons it showed up empty menu instead of hiding it. This PR fixes that

Coverage increased (+0.06%) to 82.688% when pulling cdfff9dd33045db1be4c4276f81455d6d3e889b8 on vxsx:bugfix/dropdown-publish into 3e3a34f81e221192096a0fb761b3f0b3c7df5927 on divio:release/3.4.x.

authors: coveralls vxsx

repo: divio/django-cms


text:
userparameter in hiera

Hello,
I've installed your puppet module in my environment. I'm using exported_resources and my nodes are automatically added to zabbix thanks to your module.
I'm following the instructions in https://github.com/dj-wasabi/puppet-zabbix#usage-zabbix-userparameters and configured some userparemeters in hiera:
zabbix::userparameter::data:
    DiskIO_userparameters:
    source: 'puppet:///modules/zabbix/diskio.conf'
    template: 'DiskIO'

But the userparameter is not copied to the client.
I've hardcoded manage_reosurces=true in the module.
If I call it as zabbix:userparameters:
zabbix::userparameters { 'diskIO' :
    source   => 'puppet:///modules/zabbix/diskio.conf',
    template => 'DiskIO',
}

It works as expected.
So, at this point I'm not sure if I faced a bug in the zabbix/hiera usage or in the doc or something wrong in my code.
Am I doing something wrong? Do you have any working example?
Many thanks for your great work in this module.
Cheers,
A

Hi pelacables,
Thank you for making time to create this issue.
Thats an good question that I can't answer right now. Will take a look at it.
I'll let you know when I found it.
Kind regards,
Werner

YAML is indentation-sensitive.  Try this:
zabbix::userparameter::data:
    DiskIO_userparameters:
        source: 'puppet:///modules/zabbix/diskio.conf'
        template: 'DiskIO'

Solution provided by @lamawithonel, so I'll close this issue.

authors: dj-wasabi lamawithonel pelacables

repo: dj-wasabi/puppet-zabbix


text:
shell_plus --notebook gives bad configuration error

I am getting the following error when trying to use shell_plus --notebook:
[C 04:28:24.002 NotebookApp] Bad config encountered during initialization:
[C 04:28:24.003 NotebookApp] Unrecognized flag: '--ext'
This is my pip environment:
backports.ssl-match-hostname==3.4.0.2
certifi==14.5.14
Django==1.7.4
django-account==0.1.14
django-appconf==1.0.1
django-bootstrap-form==3.1
django-debug-toolbar==1.2.2
django-extensions==1.5.0
django-jsonfield==0.9.13
django-registration==1.0
django-suit==0.2.12
django-urlauth==0.1.8
django-user-accounts==1.0.1
djangorestframework==3.0.5
docutils==0.12
eventlog==0.10.0
gnureadline==6.3.3
ipython==3.0.0
Jinja2==2.7.3
jsonschema==2.4.0
MarkupSafe==0.23
metron==1.3.5
mistune==0.5
MySQL-python==1.2.5
nose==1.3.4
numpydoc==0.5
pinax-theme-bootstrap==5.7.1
psycopg2==2.6
ptyprocess==0.4
Pygments==2.0.2
pytz==2014.10
PyYAML==3.11
pyzmq==14.5.0
requests==2.5.3
sh==1.11
simplejson==3.6.5
six==1.9.0
Sphinx==1.2.3
sqlparse==0.1.14
terminado==0.5
tornado==4.1

This is something to do with ipython 3.0.0 - I upgraded to this and got the same error. After downgrading to 2.4.0 at it works again.

Skimming over the backwards-incompatible-changes list of the IPython 3.0 release I could not find the culprit. But assuming either the '--ext' option has been renamed or loading extensions has been changed all together I am assuming this should be relatively easy to fix.

This cause seems to be diagnosed here: https://github.com/ipython/ipython/issues/7913

Hopefully it is still possible to tell the notebook to load those extension for Python notebooks some other way.
IPython 3, as part of the language-agnostic kernel starting changes, no longer relays the notebook's CLI arguments to the kernel.
Otherwise it might be the end of shell_plus --notebook

I don't think it's possible directly at the command line, but it should still be possible by writing a config file. I was discussing this with @minrk earlier; we're trying to come up with the best way to do it so that it won't break again with IPython 4, when there will be a load more changes because we're splitting up IPython into several pieces.

What about doing a %%magic_command to generate all the context shell_plus adds?
Maybe is not the optimal solution, but it'll allow some people to use IPython 3.0 with Django

Trouble is, best way to define an extra magic is with an extension, and specifying an extension to load is already the issue. You could tell all your users to do %load_ext django_admin, at a pinch.

The --ext CLI arg here is equivalent to calling %load_extension django_extensions.management.notebook_extension at runtime, so if you either create a notebook pre-populated with this, or instruct users to call it themselves, you will get the same result.
We are still trying to figure out the easiest way to configure the kernel when the notebook server is in between you and it.
Current options I see:

create ipython_config.py next to manage.py with c.InteractiveShell.extensions = ['django...'] (this only works if notebooks are only created adjacent to manage.py, not exactly robust)
specify a local IPython config directory with IPYTHONDIR env variable, containing ipython_config.py above (works same as above, but in a robust way). This one overrides any other config the user might have.
pass the --ext arg to the kernel via a django kernelspec. IPython-3.0 specific, but relatively simple, and the closest to what you were doing before.

None of these are great, frankly. I'll sketch out the kernelspec version, as that's the 'new way' to do things, if nothing else than to see if we should improve anything on that API.

Just want to say: Thanks for all your efforts picking this up guys !
I know a lot of people (including me) love IPython and it's notebook and also like the convenience of auto loading Django specific modules.

The solution @minrk suggested works
%load_ext django_extensions.management.notebook_extension

It's just a little verbose, since it outputs everything we used to see in the terminal in IPython 2.

Drawback is that that does not happen automatically right ? (But it's at the least a good workaround until we have something better)
@minrk Looking a bit into kernel specs it seems it have some additional nice properties like a way to define "display_name", would be cool to see "Python 2 - Django" in the notebook interface :)

You can see one version of the kernelspec way in #634.

Really nice code @minrk thank you very much.

@trbs @kutenai, with this *powerfull *code we may also can load automatically the extension without any configuration in the settings with something like this:
# IPython >= 3 uses kernelspecs to specify kernel CLI args
                if release.version_info[0] >= 3:
                    ipython_arguments.append('--ext=django_extensions.management.notebook_extension')
                    install_kernel_spec(app, ipython_arguments)

Like this, the IPYTHON_ARGUMENTS is just optionnal to add more ipython options.

@benjaminabel yeah definitely.

I extended the commit to use notebook extension by default see this branch.

Following @minrk  and @D3f0's comments, I got this to work for Django==1.6, ipython==3.0.0, django-extensions==1.5.2 as follows:
# add this to your ipython_config
# (typically ~/.ipython/profile_default/ipython_config.py)
import os
if os.environ.get('DJANGO_SETTINGS_MODULE'):
  c.InteractiveShellApp.extensions = ['django_extensions.management.notebook_extension']

This way manage.py shell_plus [--notebook]  works as before with IPython 2.4, and IPython also works without Django. It's a hack, but it works, follows DRY & is less verbose than running %load_ext in every notebook.

authors: D3f0 benjaminabel davecoates kutenai minrk miraculixx pebreo takluyver trbs

repo: django-extensions/django-extensions


text:
"Copies To" field is unobviously ignored for queues without "Notify contacts when email updates arrive" set

This behaviour is confusing because people still adding CC users and may be surprised why emails don't arrive to them.
A proposed solution is just to hide that field if the queue has it turned off anyway. I don't think it's worth adding much checks around it and just don't render it will be fine.
Another alternative is to make it readonly with a popover describing why it can't be changed.
Please say your thoughts about that; the functionality is pretty simple to implement.

IMO, second alternative is better because the user won't have to search for this field if we were to make it hidden, and he will understand why it is read-only thanks to the popover.

The read-only idea sounds reasonable to me.

authors: Benbb96 gwasser koriaf

repo: django-helpdesk/django-helpdesk


text:
Fix response content assertions

Tests were using str(response.content) to converts bytes values to strings. But this method converts to string using repr(), giving the associated b prefix, quotes, and escaping:
In [1]: str(b'<!doctype html>...')
Out[1]: "b'<!doctype html>...'"

This PR adjusts all such conversion in tests to use the correct method, bytes.decode().
(Spotted whilst working on #1882.)

coverage: 100.0%. remained the same
when pulling f44792d63851310cf760d1f227e08e87726438f6 on adamchainz:fix_response_content_decoding
into 4fddf0e011a28b097fa8d7a3b0f0d0f350df1f73 on django-import-export:main.

authors: adamchainz coveralls


text:
Inspect Server Error On Set Exceptions

When we switched over to twemproxy I started getting a lot of exceptions whenever a backend server was unavailable.
The cause was this line: https://github.com/jbalogh/django-pylibmc/blob/master/django_pylibmc/memcached.py#L131
len(value) will throw a TypeError if value is an int.

It looks like this code changed w/ https://github.com/django-pylibmc/django-pylibmc/commit/6296b26bfc216032a792e4870bff63d7da332d09
https://github.com/django-pylibmc/django-pylibmc/blob/master/django_pylibmc/memcached.py#L131
try:
    return self._cache.set(key, value,
                           self._get_memcache_timeout(timeout),
                           **COMPRESS_KWARGS)
except pylibmc.ServerError:
    log.error('ServerError saving %s (%d bytes)' % (key, len(str(value))),
              exc_info=True)
    return False

Can this ticket be closed?

It looks like this was left open after the code was committed.  Closing.

authors: jamescarr jwhitlock

repo: django-pylibmc/django-pylibmc


text:
fixed #29572 -- Use pymysql instead of mysqldb to solve the compatibility problem that python3 can't use mysqldb package.

Use pymysql instead of mysqldb to solve the compatibility
problem that python3 can't use mysqldb package.
fixed #29572 -- Use pymysql instead of mysqldb to solve the
compatibility problem that python3 can't use mysqldb package.

Closing as per Claude's comment on the ticket.
(mysqlclient-python is a fork of the original MySQLdb, which may explain the confusion.)
Ping: @adamchainz: Do you think a go at using pymysql is on the cards now? (I didn't look too deeply here but no failures...?)

I think we should support it. I had a try a while back and there were failures but nice that there were none on this PR - maybe pymysql changed enough. I'd like to use it natively though rather than with install_as_MySQLdb. It will need a more formal change too, and perhaps we should use pymysql only if mysqldb isn't installed. From historical tickets it seems we need a post on django-developers ?

... it seems we need a post on django-developers ?

Well the last post there was yours... — I think you could open a new one (or re-open https://code.djangoproject.com/ticket/22391, if appropriate) with your plan, and that would be reasonable. (Perhaps a post to django-developers mentioning the new developments etc).
(Personally not sure on the state of play here, or on how it ties-in with MariaDB support, so abdicating all responsibility to you 🙂)

@carltongibson @adamchainz
I think django sa a web framework for perfectionists with deadlines should friendly enough to the average developer.
But if django uses the MySQLdb package, then it obviously won't match this.
When we want to use MySQLdb in python 3,we must pip install mysqlclient then import MySQLdb .
Now, more and more developer use pysql not MySQLdb.
And the MySQLdb and pymysql both comply with PEP 249 Python Database API Specification v2.0.
SO, they have the common API normal, We only need very little work to complete the migration.
Can you consider moving it officially? I want to get more ideas from core developers.

Hi @Bob-Du.
Yes. All good points. And it is underconsideration.

We only need very little work to complete the migration.

What would this look like? (The required doc changes are important here.) If you wanted to follow-up with a fuller PR, or a follow-up on django-developers, that would help push this forwards.
If (as perhaps it looks like) the situation has changed since this was last looked at then there is no reason why it can't be re-reviewed.

I think we should support it...

This is promising. 👍

authors: Bob-Du adamchainz carltongibson

repo: django/django


text:
Refs #27795 -- Removed force_bytes() usage in contrib/staticfiles/storage.py.

https://code.djangoproject.com/ticket/27795

Please let me know if it would be preferable for me to squash this with #10429, #10431, and #10432.


text:
Fixed #32798 -- Fixed ASGIHandler to run response iterators in sync context

I did some quick performance tests to make sure this isn't significantly slower. I set up a view with a streaming response yielding 100 items. timeit reports "3.04 msec per loop," compared to "3.64 msec per loop" on the main branch, so pretty much the same. The alternative implementations I tried are much slower (using async_to_sync(Queue.put)() instead of Queue.put_nowait() is 21 msec per loop; not using a queue is 15.5 msec per loop).

I pushed a commit with sentinel value implementation, bounded queue size, and limited bytes in the queue.

Sentinel value - I like this change. It does indeed make the code simpler.
Bounded queue size - Instead of sleeping, I just used async_to_sync(q.put), which should be better than an arbitrary sleep time because the thread will actually get woken up when a slow is available.
Limited bytes in queue - I put an actual sleep in here. I'm a bit unsure about this. It seems like it would be possible to have this thread wait on a future whose result is set by the async thread, since that's how the Queue implementation works under the hood. I can work on this if it feels like the right direction.

Another issue is that asyncio.Queue isn't thread-safe. Maybe it's okay here in practice since we have only one producer and one consumer? If we're worried about the queue being threadsafe, it's probably best to just wrap the for part in response loop in sync_to_async, as suggested earlier.
Sorry for all the back and forth on this PR. I guess I need more guidance on this than I thought.... getting async code right is hard.

Limited bytes in queue

As long as the queue is limited to a size that's a small number (say 5 or less), it doesn't seem like counting and limiting the bytes should be necessary. The reason is that the streaming response object already needs to / has the ability to limit the size of the items it yields. So the total bytes would already be limited to the size of the queue times that, which is the same order of magnitude. I would actually be more worried about the items yielded by the iterator being too small. To address that, I think making the size customizable e.g. by a class attribute would be good enough. That way people will have two options: (1) changing the class attribute, and (2) altering the streaming response object to yield bigger items. Note that currently, the handler chunks responses into pieces of size 2**16 = 65536 by default, which is configured via a class attribute: https://github.com/django/django/blob/225d96533a8e05debd402a2bfe566487cc27d95f/django/core/handlers/asgi.py#L129-L130
(The handler may have a separate issue worth addressing of not combining items together for sending when the items are small. For example, the Django docs have an example of streaming a large CSV file, where the response items are the individual lines. In that case, the lines are likely much smaller than the chunk size, so sending via the async handler might be inefficient -- but I can't say for sure because I didn't look closely.)

I've been working with Michael to find a better way to use sync iterators in an async context. The problem with the above implementation is:

Slow, probably due to the overhead in the sync/async transitions, or uses unbounded memory due to use of an unbounded asyncio.Queue
Possibly not thread-safe due to use of asyncio.Queue.put_nowait() from a separate thread.

Making a sync-to-async iterator that uses bounded memory and supports backpressure (blocks the sync side if the async side is slow) turns out to be pretty tricky. I put some thought into a more general approach and came up with this:
class SyncIteratorToAsync:

    def __init__(self, iterator, queue_size=50, thread_sensitive=True):
        self.iterator = iterator
        self.q = collections.deque()
        self.loop = asyncio.get_running_loop()
        self.full_event = threading.Event()
        self.empty_event = asyncio.Event()
        self.sentinel = object()
        self.task = asyncio.create_task(
            sync_to_async(self._sync_iterator, thread_sensitive=thread_sensitive)()
        )
        self.queue_size = queue_size
        self.should_exit = False

    def _sync_iterator(self):
        try:
            for item in self.iterator:
                if len(self.q) >= self.queue_size:
                    # Queue is full, block waiting for an item to be removed
                    self.full_event.wait()
                # Queue has at least one free slot
                self.full_event.clear()
                # Check if we should exit after clearing the Event, to avoid a race condition if this
                # runs after the exit flag was set but before the Event was set.
                if self.should_exit:
                    break
                was_empty = len(self.q) == 0
                self.q.append(item)
                if was_empty:
                    # Signal that the Q is no longer empty
                    self.loop.call_soon_threadsafe(self.empty_event.set)
        finally:
            self.q.append(self.sentinel)
            self.loop.call_soon_threadsafe(self.empty_event.set)

    async def __aiter__(self):
        try:
            while True:
                if len(self.q) == 0:
                    # Queue is empty, await for an item to be added
                    await self.empty_event.wait()
                # Queue has at least one item
                self.empty_event.clear()
                was_full = len(self.q) >= self.queue_size
                item = self.q.popleft()
                if was_full and len(self.q) < self.queue_size:
                    # Signal that the queue is no longer full
                    self.full_event.set()

                if item is self.sentinel:
                    break
                yield item

            # Raise any errors that may have occurred in the sync thread
            await self.task
        finally:
            self.should_exit = True
            # Wake up the thread if it was waiting
            self.full_event.set()
            self.task.cancel()

While this adds quite a bit of more complexity, it's also quite a bit faster. Here's the highlights:

Uses a queue of adjustable size to buffer items when producer and consumer are different speeds
Uses a collections.deque() to pass the items, and handles the backpressure of full/empty queues itself, since neither asyncio.Queue nor queue.Queue are designed for use in the others' contexts. Plus we can simplify by assuming only a single producer and consumer.
Uses an asyncio.Event to signal the async side (consumer) when a previously empty queue has an item added
Uses a threading.Event to signal the sync side (producer) when a previously full queue becomes non-full
Setting a threading.Event from an async context should be safe, as this is a non-blocking operation
Setting the asyncio.Event from a sync thread uses loop.call_soon_threadsafe(), which avoids the overhead of async_to_sync
By experimentation, a queue size of 50 has better performance than a small queue (<10) but more than that doesn't seem to benefit. At least from our quick benchmark script. I'd guess this lets the two threads do less context switching overall.

If this approach sounds good, we can update the PR. This may also be a handy utility to include in asgiref.

Gosh, that's a lot of code. The idea seems better - I would want to see it in an actual PR with the current tests passing and more tests, though, as well as finding a weekend to review it in the excruciating detail any async bridge code ends up needing!

I understand, and having had a chance to think this over further, I'm not sure I like my solution due to its complexity. Michael and I ended up side-stepping this issue by using asgiref.wsgi.WsgiToAsgi in development, and by deploying our sync and async code in separate servers in production.
Using WsgiToAsgi wraps the wsgi app in sync_to_async and then uses a call via sync_to_async to send the response, so the async-sync transition pattern is similar to Michael's earlier suggestion of doing something like this, with all the performance implications mentioned:
            def process_sync_response():
                # Access `__iter__` and not `streaming_content` directly in
                # case it has been overridden in a subclass.
                for part in response:
                    for chunk, _ in self.chunk_bytes(part):
                        async_to_sync(send)({
                            'type': 'http.response.body',
                            'body': chunk,
                            # Ignore "more" as there may be more parts; instead,
                            # use an empty final closing message with False.
                            'more_body': True,
                        })
            await sync_to_async(process_sync_response)()

For us, that ends up being okay since it's only for development convenience to run a single dev server. To be clear, this means I probably won't have time to work the above into an actual PR with tests, sorry.

That's fine - as you can tell, I am not blessed with a lot of time at the moment either, hence my slow reply. This is not the sort of thing that's an immediate awful bug, so it's not super pressing.

What do you think about me opening a new PR with the simple solution of wrapping the streaming response code in sync_to_async? It's slower, but it will fix the issue and it's easy to see that it's correct. We can still improve the performance later when somebody has time. SyncIteratorToAsync could even be included into asgiref as a general tool after it's properly reviewed and well tested.

A simpler but slower solution beats one that doesn't work, if you ask me, so I think that's a decent idea.

Closing in favour of #14652 as a simpler, albeit slower, fix seems to be the consensus. (It was also mentioned that providing a more performant general helper in asgiref might be preferable to implementing something in Django.)


text:
Refs #32559 -- Added selenium test for FloatField client-side validation.

step="any" is required for non-integer values.
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step
Covers behaviour added in 7ec2a21be15af5b2c7513482c3bcfdd1e12782ed.
Fails with this diff:
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 65d6a9ec82..6e11b53c66 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -317,8 +317,8 @@ class FloatField(IntegerField):

     def widget_attrs(self, widget):
         attrs = super().widget_attrs(widget)
-        if isinstance(widget, NumberInput) and 'step' not in widget.attrs:
-            attrs.setdefault('step', 'any')
+#         if isinstance(widget, NumberInput) and 'step' not in widget.attrs:
+#             attrs.setdefault('step', 'any')
         return attrs

buildbot, test on selenium.

Hmm.
https://djangoci.com/job/pull-requests-selenium/database=sqlite3,label=bionic-pr,python=python3.10/356/testReport/junit/admin_views.test_autocomplete_view/SeleniumTests/test_select_multiple/
That failure is not my test. Oh selenium. (I shall have a look later.)

@carltongibson Thanks :+1:

buildbot, test on selenium.

buildbot, test on selenium.

buildbot, test on selenium.

authors: carltongibson felixxm


text:
Fixed #33633 -- Skipped some test_utils tests on databases that don't support transactions.

The testing framework has some different behaviors for backends not supporting transactions. Mostly in TestCase._fixture_setup and TestCase.setUpClass. Skip them.

@zhangyangyu Thanks :+1: Welcome aboard :boat:

authors: felixxm zhangyangyu